Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392883 - app-office/libreoffice-3.5.0.0: python segfault on pyuno
Summary: app-office/libreoffice-3.5.0.0: python segfault on pyuno
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-02 03:09 UTC by Egor Y. Egorov
Modified: 2012-01-16 07:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
strace.out (strace.out,140.21 KB, text/plain)
2011-12-06 03:26 UTC, Egor Y. Egorov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Y. Egorov 2011-12-02 03:09:40 UTC
I install libreoffice-3.5.0.0 with USE=odk/ But python segfault when executing this script:

$ cat test.py 
#!/usr/bin/env python                                                           
# -*- coding: utf-8 -*-                                                         
import sys                                                                      
sys.path.append('/usr/lib/libreoffice/program')
import os
import uno

#a UNO struct later needed to create a document
from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
from com.sun.star.text.TextContentAnchorType import AS_CHARACTER


I enter a bug on freedesktop.org: https://bugs.freedesktop.org/show_bug.cgi?id=43447

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-04 04:26:36 UTC
1) Please post your `emerge --info' output too.
2) Please attach the entire build log, compressed if need be.
Comment 2 Egor Y. Egorov 2011-12-05 05:31:01 UTC
# emerge --info
Portage 2.2.0_alpha79 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.12.2-r0, 3.1.4-zen+ x86_64)
=================================================================
System uname: Linux-3.1.4-zen+-x86_64-Pentium-R-_Dual-Core_CPU_E6300_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Sun, 04 Dec 2011 16:00:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1                                                                                           
sys-devel/binutils:       2.21.1-r1                                                                                                          
sys-devel/gcc:            4.5.3-r1                                                                                                           
sys-devel/gcc-config:     1.4.1-r1                                                                                                           
sys-devel/libtool:        2.4-r1                                                                                                             
sys-devel/make:           3.82-r1                                                                                                            
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)                                                                                        
sys-libs/glibc:           2.12.2                                                                                                             
Repositories: gentoo crossdev-overlay rion java-overlay qting-edge mellon aidecoe systemd gamerlay-stable x11 kde enlightenment-niifaq perl-experimental local NavSystem crg-slepnoga                                                                                                     
Installed sets: @my-e, @navsys-meta, @system                                                                                                 
ACCEPT_KEYWORDS="amd64"                                                                                                                      
ACCEPT_LICENSE="*"                                                                                                                           
CBUILD="x86_64-pc-linux-gnu"                                                                                                                 
CFLAGS="-O2 -pipe -march=native"                                                                                                             
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/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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="-O2 -pipe -march=native"                                                                                                           
DISTDIR="/usr/portage/distfiles"                                                                                                             
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ ftp://xeon.gentoo.ru/"
LANG="ru_RU.UTF-8"
LC_ALL="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="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 --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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3gp 7zip X a52 aac acl acpi ads alsa amd64 amr apache2 apm assistant bash-completion berkdb bineditor bittorrent bluetooth branding bzip2 cairo cdda cdr cleartype cli clucene cluster consolekit 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 gdu gif git gles glitz gnutls gpm gps gsm gstreamer handbook hdf5 iconv icq icu ipv6 ithreads jabber jingle jpeg kde kerberos lame laptop latex lcdfilter lcms ldap lib32 libkms libnotify lm_sensors lxde lzma mad maps matroska melt mercurial midi mikmod mmx mng modules mozilla mp3 mp4 mpeg mpi mssql mudflap multilib mysql ncurses networkmanager nls nptl nptlonly nspluginwrapper objc objc++ odbc odk ogg okteta opengl openmp pam pango pcre pdf pdfimport plasma plymouth png policykit postgres ppds ppp pppd private-headers ps python2 python3 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 startup-notification subversion svg sysfs system-libvncserver systemd tcpd threads thunar thunderbird tiff tk tordns truetype type1 udev udisks unicode usb userlocales v4l v4l2 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="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa nouveau intel radeon i915 i965 r100 r200 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
Comment 3 Egor Y. Egorov 2011-12-05 05:34:23 UTC
I can not attach build.log now because libreoffice assembled without error a few days ago
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-05 12:39:43 UTC
(In reply to comment #3)
> I can not attach build.log now because libreoffice assembled without error a
> few days ago

Yes, of course. Sorry for the automated request.
Comment 5 Matthias Liebig 2011-12-05 19:14:51 UTC
I can't reproduce this on ~amd64. However, I had to change /usr/lib64/libreoffice/program/uno.py as discussed in bug #379227:

import os

sys.path.append('/usr/lib64/libreoffice/program')
if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
    os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:/usr/lib64/libreoffice/program/fundamentalrc"

import pyuno


My useflags:

# emerge -pv1 libreoffice

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-office/libreoffice-3.5.0.0  USE="branding dbus graphite gstreamer gtk java jemalloc kde mysql opengl pdfimport svg vba webdav xmlsec (-aqua) -binfilter -debug -eds -gnome -gtk3 (-kdeenablefinal) -nsplugin -odk -postgres -test" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB


If python is producing a segfault, you probably need to provide the strace output, or a gdb backtrace from the coredump. But I am not a Gentoo dev.
Comment 6 Egor Y. Egorov 2011-12-06 03:26:39 UTC
Created attachment 294925 [details]
strace.out

strace python2.7 test.py -f &> /tmp/strace.out
Comment 7 Egor Y. Egorov 2011-12-06 03:44:10 UTC
(In reply to comment #5)
> I can't reproduce this on ~amd64. However, I had to change
> /usr/lib64/libreoffice/program/uno.py as discussed in bug #379227:
> 
> import os
> 
> sys.path.append('/usr/lib64/libreoffice/program')
> if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
>     os.environ['URE_BOOTSTRAP'] =
> "vnd.sun.star.pathname:/usr/lib64/libreoffice/program/fundamentalrc"
> 
> import pyuno
> 
> 
> My useflags:
> 
> # emerge -pv1 libreoffice
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild   R    ] app-office/libreoffice-3.5.0.0  USE="branding dbus graphite
> gstreamer gtk java jemalloc kde mysql opengl pdfimport svg vba webdav xmlsec
> (-aqua) -binfilter -debug -eds -gnome -gtk3 (-kdeenablefinal) -nsplugin -odk
> -postgres -test" 0 kB
> 
> Total: 1 package (1 reinstall), Size of downloads: 0 kB
> 
> 
> If python is producing a segfault, you probably need to provide the strace
> output, or a gdb backtrace from the coredump. But I am not a Gentoo dev.
In my case USE=odk is set.
Comment 8 Egor Y. Egorov 2012-01-16 02:29:04 UTC
Not reproduced on 3.4.99.3
Comment 9 Tomáš Chvátal (RETIRED) gentoo-dev 2012-01-16 07:11:34 UTC
Great I just pointed others (upstream) to this bug but nobody told me that they actually fixed it. :)

Closing as per last comment.