libreoffice segfault: $ libreoffice --version /usr/bin/libreoffice: line 166: 8055 Segmentation fault (core dumped) "$sd_prog/soffice.bin" --version Simple command $ libreoffice work fine In dmesg 493903.651934] soffice.bin[8055]: segfault at 34 ip 000000380e81942c sp 00007fffc0b18e40 error 4 in libuno_cppu.so.3[380e800000+4a000] eegorov@egorov-ey ~ $ emerge -pv libreoffice These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] app-office/libreoffice-3.6.1.2 USE="branding cups dbus gtk java kde mysql odk opengl postgres svg vba webdav (-aqua) -binfilter -binfilterdebug -eds -gnome -gstreamer -jemalloc -test" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer scripting-beanshell scripting-javascript wiki-publisher -pdfimport" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB eegorov@egorov-ey ~ $ emerge --info Portage 2.2.0_alpha125 (default/linux/amd64/10.0/desktop, gcc-4.7.1, glibc-2.15-r2, 3.5.3-zen+ x86_64) ================================================================= System uname: Linux-3.5.3-zen+-x86_64-Pentium-R-_Dual-Core_CPU_E6300_@_2.80GHz-with-gentoo-2.2 Timestamp of tree: Mon, 10 Sep 2012 19:00:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.7 [disabled] app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.3-r2, 3.2.3 dev-util/ccache: 3.1.7 dev-util/cmake: 2.8.8-r3 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.10.5 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.7.1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo crossdev-overlay rion java-overlay mellon aidecoe systemd gamerlay-stable x11 enlightenment-niifaq perl-experimental lcd-filtering maksbotan local NavSystem Installed sets: @navsys-dev, @navsys-misc, @system ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-flto -march=native -mtune=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/lib/redmine/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml" CXXFLAGS="-flto -march=native -mtune=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ ftp://xeon.gentoo.ru/" LANG="C" LC_ALL="C" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru ru_RU" MAKEOPTS="-j4" PKGDIR="/home/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/package.skip" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/overlays/crossdev-overlay /var/overlays/layman/rion /var/overlays/layman/java-overlay /var/overlays/layman/mellon /var/overlays/layman/aidecoe /var/overlays/layman/systemd /var/overlays/layman/gamerlay /var/overlays/layman/x11 /var/overlays/layman/enlightenment-niifaq /var/overlays/layman/perl-experimental /var/overlays/layman/lcd-filtering /var/overlays/layman/maksbotan /var/overlays/local /var/overlays/NavSystem" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3gp 7zip X a52 aac acl acpi ads alsa amd64 amr apache2 apm assistant avahi bash-completion berkdb bineditor bittorrent bluetooth branding bzip2 cairo cdda cdr cleartype cli clucene cluster cracklib crypt cups cxx dbus debugger declarative dirac directfb djvu dri dts dvd dvdr dvi emboss emerald encode eps exif fam fbcon fbcondecor fbsplash festival ffmpeg fftw firefox flac fontconfig fortran freetds ftdi fts3 gallium gd gdbm gif git gles glitz gnutls gpm gps graphite gsm gstreamer gudev handbook hdf5 iconv icq icu ipv6 ithreads jabber jingle jpeg kde kerberos lame laptop latex lcdfilter lcms ldap lib32 libkms libnotify lm_sensors lto lxde lzma mad maps matroska mdnsresponder-compat melt mercurial midi mikmod mmx mng modemmanager modules mozilla mp3 mp4 mpeg mpi mssql mudflap multilib mysql ncurses networkmanager nls nptl nspluginwrapper ntfsprogs objc objc++ odbc odk ogg okteta opengl openmp oscar pam pango pcre pdf pdfimport phonon plasma plymouth png policykit postgres postscript ppds ppp pppd private-headers ps python2 python3 qml qt qt3support qt4 qthelp qtscript quicktime radio rar rdesktop rdp rdpusb readline resolvconf romio samba sasl sdl secure-delete semantic-desktop session smb spell spice sql sqlite sqlite3 sse sse2 sse3 ssl ssse3 subversion svg system-libvncserver system-sqlite systemd tcpd threads thunar thunderbird tiff tk tordns truetype type1 udev udisks unicode unlock-notify upower usb userlocales v4l v4l2 valgrind vdpau video virtuoso vnc vorbis webkit wicd winbind wxwidgets x264 xcb xcomposite xine xml xmpp xorg xulrunner xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon krita sheets stage words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth btrfs systemd" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver scripting-beanshell scripting-javascript wiki-publisher" LINGUAS="ru ru_RU" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vesa intel i915 i965 radeon r300 r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON Maybe it's because -flto in CFLAGS. Today I'll try to build it with CFLAGS = "-O2-march = native" Reproducible: Always
Same with CFLAGS="-march=native -mtune=native -O2 -pipe"
Without backtrace from gdb with debug symbols this report is no use.
$ gdb /usr/lib/libreoffice/program/soffice.bin GNU gdb (Gentoo 7.3.1 p2) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/lib64/libreoffice/program/soffice.bin...(no debugging symbols found)...done. (gdb) run --version Starting program: /usr/lib64/libreoffice/program/soffice.bin --version warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] [New Thread 0x7ffff7cdd700 (LWP 24538)] Program received signal SIGSEGV, Segmentation fault. 0x000000305a41957c in uno_type_any_assign () from /usr/lib64/libreoffice/program/../ure-link/lib/libuno_cppu.so.3 (gdb) bt #0 0x000000305a41957c in uno_type_any_assign () from /usr/lib64/libreoffice/program/../ure-link/lib/libuno_cppu.so.3 #1 0x000000305d85fde4 in ?? () from /usr/lib64/libreoffice/program/libutllo.so #2 0x000000305d860968 in utl::ConfigManager::getProductName() () from /usr/lib64/libreoffice/program/libutllo.so #3 0x000000306121235f in ?? () from /usr/lib64/libreoffice/program/libsofficeapp.so #4 0x0000003061237020 in ?? () from /usr/lib64/libreoffice/program/libsofficeapp.so #5 0x000000306124ab6a in soffice_main () from /usr/lib64/libreoffice/program/libsofficeapp.so #6 0x00000000004006eb in ?? () #7 0x0000003df98246c5 in __libc_start_main (main=0x4006e0, argc=2, ubp_av=0x7fffffffd468, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd458) at libc-start.c:226 #8 0x0000000000400721 in ?? () #9 0x00007fffffffd458 in ?? () #10 0x0000000000000000 in ?? () (gdb)
Is it enough to build libreoffice with CFLAGS="-O2 -march=native -g"?
-g should be enough
Also from the trace it seems like some garbage in config, would you mind trying wiping .libreoffice .config/libreoffice ?
I tried to run this under test user with with empty home-folder. Same problem.
Created attachment 323582 [details] strace.log $ strace -f /usr/lib/libreoffice/program/soffice.bin --version &>/tmp/strace.user555
Same problem on my home PC: Installed versions: 3.6.1.2^t(15:02:45 01.09.2012)(branding cups dbus gstreamer gtk java kde libreoffice_extensions_nlpsolver libreoffice_extensions_presenter-console libreoffice_extensions_presenter-minimizer libreoffice_extensions_scripting-beanshell libreoffice_extensions_scripting-javascript mysql odk opengl postgres svg vba webdav -aqua -binfilter -binfilterdebug -eds -elibc_FreeBSD -gnome -jemalloc -libreoffice_extensions_pdfimport -libreoffice_extensions_wiki-publisher -test) With -g I'll test tomorow.
https://bugs.freedesktop.org/show_bug.cgi?id=54385
(In reply to comment #10) > https://bugs.freedesktop.org/show_bug.cgi?id=54385 fixed in 3.6.2
egorov-ey ~ # libreoffice --version LibreOffice 3.6 egorov-ey ~ # emerge -pv libreoffice These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] app-office/libreoffice-3.6.2.2 USE="branding cups dbus gtk java kde mysql odk opengl postgres svg vba webdav (-aqua) -binfilter -binfilterdebug -eds -gnome -gstreamer -jemalloc {-test}" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer scripting-beanshell scripting-javascript wiki-publisher -pdfimport" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB Fixed :)
Great, closing :-)