Bug 190388 - dev-libs/libxslt dumps core in python apps since upgrade to python 2.5
|
Bug#:
190388
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: AMD64
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: python@gentoo.org
|
Reported By: sgala@apache.org
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: dev-libs/libxslt dumps core in python apps since upgrade to python 2.5
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2007-08-27 11:10 0000
|
runtests, from http://intertwingly.net/code/venus/
$ python runtests.py
.............................................................................Violación
de segmento
again, verbose:
test_updated (tests.test_filter_tmpl.FilterTmplTest) ... ok
test_addsearch_filter (tests.test_filter_xslt.XsltFilterTests) ... ok
test_xslt_filter (tests.test_filter_xslt.XsltFilterTests) ... Violación de
segmento
sorry for not being able to make it report in English, stupid i18n in libc
doesn't want to. "Violación de segmento" means "segment violation". gdb is
more explicit:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47614749397296 (LWP 2779)]
0x00002b4e2be674d5 in free () from /lib/libc.so.6
(gdb) bt
#0 0x00002b4e2be674d5 in free () from /lib/libc.so.6
#1 0x00002b4e2eda106e in libxslt_xsltApplyStylesheet ()
from /usr/lib64/python2.5/site-packages/libxsltmod.so
#2 0x00002b4e2bb3b327 in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#3 0x00002b4e2bb3ae6e in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#4 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#5 0x00002b4e2bb39b25 in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#6 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#7 0x00002b4e2bb39b25 in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#8 0x00002b4e2bb3ae6e in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#9 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#10 0x00002b4e2baea35f in ?? () from /usr/lib/libpython2.5.so.1.0
#11 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#12 0x00002b4e2bb394dd in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#13 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#14 0x00002b4e2baea3c6 in ?? () from /usr/lib/libpython2.5.so.1.0
#15 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#16 0x00002b4e2bad66a4 in ?? () from /usr/lib/libpython2.5.so.1.0
#17 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#18 0x00002b4e2bb0fe9a in ?? () from /usr/lib/libpython2.5.so.1.0
#19 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
---Type <return> to continue, or q <return> to quit---
#20 0x00002b4e2bb388fc in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#21 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#22 0x00002b4e2baea35f in ?? () from /usr/lib/libpython2.5.so.1.0
#23 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#24 0x00002b4e2bb394dd in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#25 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#26 0x00002b4e2baea3c6 in ?? () from /usr/lib/libpython2.5.so.1.0
#27 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#28 0x00002b4e2bad66a4 in ?? () from /usr/lib/libpython2.5.so.1.0
#29 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#30 0x00002b4e2bb0fe9a in ?? () from /usr/lib/libpython2.5.so.1.0
#31 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#32 0x00002b4e2bb388fc in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#33 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#34 0x00002b4e2baea35f in ?? () from /usr/lib/libpython2.5.so.1.0
#35 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#36 0x00002b4e2bb394dd in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#37 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#38 0x00002b4e2baea3c6 in ?? () from /usr/lib/libpython2.5.so.1.0
#39 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#40 0x00002b4e2bad66a4 in ?? () from /usr/lib/libpython2.5.so.1.0
#41 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#42 0x00002b4e2bb0fe9a in ?? () from /usr/lib/libpython2.5.so.1.0
---Type <return> to continue, or q <return> to quit---
#43 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#44 0x00002b4e2bb388fc in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#45 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#46 0x00002b4e2baea35f in ?? () from /usr/lib/libpython2.5.so.1.0
#47 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#48 0x00002b4e2bb394dd in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#49 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#50 0x00002b4e2baea3c6 in ?? () from /usr/lib/libpython2.5.so.1.0
#51 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#52 0x00002b4e2bad66a4 in ?? () from /usr/lib/libpython2.5.so.1.0
#53 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#54 0x00002b4e2bb0fe9a in ?? () from /usr/lib/libpython2.5.so.1.0
#55 0x00002b4e2bad090f in PyObject_Call () from /usr/lib/libpython2.5.so.1.0
#56 0x00002b4e2bb388fc in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#57 0x00002b4e2bb3ae6e in PyEval_EvalFrameEx ()
from /usr/lib/libpython2.5.so.1.0
#58 0x00002b4e2bb3bc3b in PyEval_EvalCodeEx () from
/usr/lib/libpython2.5.so.1.0
#59 0x00002b4e2bb3bced in PyEval_EvalCode () from /usr/lib/libpython2.5.so.1.0
#60 0x00002b4e2bb53661 in ?? () from /usr/lib/libpython2.5.so.1.0
#61 0x00002b4e2bb53711 in PyRun_FileExFlags () from
/usr/lib/libpython2.5.so.1.0
#62 0x00002b4e2bb54a4e in PyRun_SimpleFileExFlags ()
from /usr/lib/libpython2.5.so.1.0
#63 0x00002b4e2bb5cefe in Py_Main () from /usr/lib/libpython2.5.so.1.0
#64 0x00002b4e2be18374 in __libc_start_main () from /lib/libc.so.6
---Type <return> to continue, or q <return> to quit---
#65 0x0000000000400699 in _start ()
This libxslt has been rebuilt with debug, which doesn't seem to make any
differencre re: line numbers.
Reproducible: Always
Steps to Reproduce:
1. download venus
2. install libxslt with python bindings
3. enjoy
(note that commenting the "import libxslt" for it to use command line xsltproc
makes it pass tests again, which actually points towards a bug in the python
interface rather than in libxslt proper)
Hi Santiago, I'm trying runtests.py and it doesn't segfault for me on that
test. It looks like it segfaults from simply importing libxslt, is that
correct?
Could you please try libxslt-1.1.22? It emerged fine for me by just copying the
1.1.20 ebuild to libxslt-1.2.22.ebuild.
If that fails, please post the output of 'emerge --info' and let us know which
version of dev-libs/libxml2 you have.
Also: have you run python-updater?
I couldn't reproduce this bug as well. Could you attach your emerge --info
please ?
a) here it segfaults in the tests, not on import
b) I tried the version 1.1.22 with exactly the same results
c) Yes, I ran python-updater, I had a fairly broken system for a while, as
gentoo depends heavily on python. Now the only thing I'm aware of that is
failing is this test (which succeeeds with command line xsltproc, as I said)
d) my emerge --info
re: Gilles's comment, I guess it is a 64bitism, i.e., only visible in 64 bits
architectures. Also, it will only happen with libxslt installed with python
binding. venus will use command line xslt if "import libxslt" fails.
$ emerge --info
Portage 2.1.2.12 (default-linux/amd64/2007.0/desktop, gcc-4.2.0, glibc-2.5-r4,
2.6.23-rc3-hrt2 x86_64)
=================================================================
System uname: 2.6.23-rc3-hrt2 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Wed, 29 Aug 2007 05:30:01 +0000
app-shells/bash: 3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python: 2.4.4-r5, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool: 1.5.24
virtual/os-headers: 2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo
/etc/texmf/web2c"
CXXFLAGS="-march=nocona -O2 -pipe -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="es_ES.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES en"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/layman/voip /usr/local/layman/sunrise
/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi aiglx alsa amd64 apache2 arts avahi avi bash-completion
berkdb bitmap-fonts bluetooth bonjour cairo cdr cli cracklib crypt cups curl
dbus dlloader dri dvd dvdr dvdread eds emboss encode esd evdev evo fam firefox
fortran galago gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv icu iproute2
ipv6 isdnlog java jpeg kde kdehiddenvisibility kerberos lcms ldap libg++
libnotify logrotate lucene mad midi mikmod mmx mono mouse mp3 mpeg mudflap
ncurses nls nptl nptlonly nsplugin obex ogg opengl openmp oss pam pcre pdf
pdflib perl png ppds pppd python qt3 qt3support qt4 quicktime readline
reflection sdl session spell spl sse sse2 ssl svg tcpd theora threads tiff
truetype truetype-fonts type1-fonts udev unicode v4l v4l2 vorbis xinerama xml
xorg xrandr xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw
asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa
lfloat linear meter mulaw multi null plug rate route share shm softvol"
DVB_CARDS="usb-wt220u" ELIBC="glibc" INPUT_DEVICES="synaptics mouse evdev
keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216
lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en" USERLAND="GNU"
VIDEO_CARDS="vesa i810 intel"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Okay, I've fixed the core in 1.1.20-r1, but there's a test in that suite that
still fails. I didn't investigate why.
The test is failing, and this means that the python binding is broken, as
xsltproc --stringparam in aeiou --stringparam out AEIOU
tests/data/filter/translate.xslt tests/data/filter/category-one.xml <?xml
version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<category term="OnE"/>
</entry>
which is the expected output, So command line xslt works, python binding has
problems in parameter passing (the result I get now means the pattern matching
didn't match.
further, while
$ sudo sh -c "FEATURES=test emerge -av --oneshot =libxslt-1.1.20-r1"
succeeds,
$ python /usr/lib64/python2.5/test/test_pyexpat.py
(...)
Testing constructor for proper handling of namespace_separator values:
Legal values tested o.k.
Caught expected TypeError:
ParserCreate() argument 2 must be string or None, not int
Caught expected ValueError:
namespace_separator must be at most one character, omitted, or None
Violación de segmento
dumps core here too. (even after rebuilding with "clean" CFLAGS)
Any clue?
Even stranger, after
$ sudo sh -c "FEATURES=test emerge -av --oneshot python"
suceeds,
$ python /usr/lib64/python2.5/test/test_pyexpat.py
still dumps core
I'm sorry, but what does failing pyexpat tests have to do with libxslt?
I don't actually know anything about xslt processing, so I can't fix the
failure in the bindings; I do know about 64-bit cleanliness issues, so I was
able to fix the core. Someone else will have to figure out why the test is
failing and propose a patch.
The only relations is that
a) libxslt was not failing under python2.4
b) python2.4 passes its own test suite without dumping core
c) python2.5 dumps core at it
As I'm not sure how the fix was done for libxslt, I'm not sure if there is a
relation, other than, when I started running test suites in related packages,
both libxml2 and libxslt passed, but python fails (when run in isolation, when
run in the ebuild either it is ignored or it does not happen)
I'm not sure where to go from here:
a) the segfault got fixed
b) libxslt python binding is failing, at least in the parameter passing area
c) I discovered an additional segfault in one standard python test
3 definitely deserves it's own bug; libxslt is maintained by gnome, python is
maintained by python.
1 is this bug.
I'd prefer 2 got it's own bug, so as not to confuse this one. If you really
prefer, you can re-open this one instead.