<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>190388</bug_id>
          
          <creation_ts>2007-08-27 11:10 0000</creation_ts>
          <short_desc>dev-libs/libxslt dumps core in python apps since upgrade to python 2.5</short_desc>
          <delta_ts>2007-08-30 17:23:19 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>sgala@apache.org</reporter>
          <assigned_to>python@gentoo.org</assigned_to>
          <cc>gnome@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>sgala@apache.org</who>
            <bug_when>2007-08-27 11:10:55 0000</bug_when>
            <thetext>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&apos;t want to. &quot;Violación de segmento&quot; means &quot;segment violation&quot;. 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 &lt;return&gt; to continue, or q &lt;return&gt; 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 &lt;return&gt; to continue, or q &lt;return&gt; 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 &lt;return&gt; to continue, or q &lt;return&gt; to quit---
#65 0x0000000000400699 in _start ()


This libxslt has been rebuilt with debug, which doesn&apos;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 &quot;import libxslt&quot; 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)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pythonhead@gentoo.org</who>
            <bug_when>2007-08-27 14:34:26 0000</bug_when>
            <thetext>Hi Santiago, I&apos;m trying runtests.py and it doesn&apos;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 &apos;emerge --info&apos; and let us know which version of dev-libs/libxml2 you have.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-27 17:32:26 0000</bug_when>
            <thetext>Also: have you run python-updater?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eva@gentoo.org</who>
            <bug_when>2007-08-29 08:05:56 0000</bug_when>
            <thetext>I couldn&apos;t reproduce this bug as well. Could you attach your emerge --info please ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sgala@apache.org</who>
            <bug_when>2007-08-29 09:09:15 0000</bug_when>
            <thetext>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&apos;m aware of that is failing is this test (which succeeeds with command line xsltproc, as I said)
d) my emerge --info

re: Gilles&apos;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 &quot;import libxslt&quot; 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=&quot;amd64&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=nocona -O2 -pipe -ftree-vectorize&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/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&quot;
CONFIG_PROTECT_MASK=&quot;/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&quot;
CXXFLAGS=&quot;-march=nocona -O2 -pipe -ftree-vectorize&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;distlocks metadata-transfer parallel-fetch sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo&quot;
LANG=&quot;es_ES.UTF-8&quot;
LDFLAGS=&quot;-Wl,-O1&quot;
LINGUAS=&quot;es es_ES en&quot;
MAKEOPTS=&quot;&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--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-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/layman/voip /usr/local/layman/sunrise /usr/local/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;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&quot; ALSA_CARDS=&quot;hda-intel&quot; ALSA_PCM_PLUGINS=&quot;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&quot; DVB_CARDS=&quot;usb-wt220u&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;synaptics mouse evdev keyboard&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;es es_ES en&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;vesa i810 intel&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-29 15:13:33 0000</bug_when>
            <thetext>Okay, I&apos;ve fixed the core in 1.1.20-r1, but there&apos;s a test in that suite that still fails.  I didn&apos;t investigate why.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sgala@apache.org</who>
            <bug_when>2007-08-29 21:36:03 0000</bug_when>
            <thetext>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 &lt;?xml version=&quot;1.0&quot;?&gt;
&lt;entry xmlns=&quot;http://www.w3.org/2005/Atom&quot;&gt;
  &lt;category term=&quot;OnE&quot;/&gt;
&lt;/entry&gt;

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&apos;t match.

further, while
$ sudo sh -c &quot;FEATURES=test emerge -av --oneshot =libxslt-1.1.20-r1&quot;

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 &quot;clean&quot; CFLAGS)

Any clue?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sgala@apache.org</who>
            <bug_when>2007-08-29 21:57:55 0000</bug_when>
            <thetext>Even stranger, after 

 $ sudo sh -c &quot;FEATURES=test emerge -av --oneshot python&quot;

suceeds,

 $ python  /usr/lib64/python2.5/test/test_pyexpat.py

still dumps core
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-30 00:28:00 0000</bug_when>
            <thetext>I&apos;m sorry, but what does failing pyexpat tests have to do with libxslt? 

I don&apos;t actually know anything about xslt processing, so I can&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sgala@apache.org</who>
            <bug_when>2007-08-30 05:22:30 0000</bug_when>
            <thetext>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&apos;m not sure how the fix was done for libxslt, I&apos;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&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-30 17:23:19 0000</bug_when>
            <thetext>3 definitely deserves it&apos;s own bug; libxslt is maintained by gnome, python is maintained by python.

1 is this bug.

I&apos;d prefer 2 got it&apos;s own bug, so as not to confuse this one.  If you really prefer, you can re-open this one instead.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>