473,809 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Test error with Python 2.3.4c1

Hello,

The error desribed in SF error report No. 870120 (segmentation fault
in test_re) still persists for me in 2.3.4c1.

Regards
Berthold
--
bh***@web.de / http://starship.python.net/crew/bhoel/
Jul 18 '05 #1
9 1831
In article <m2************ @pchoel.psh>, Berthold Höllmann <bh***@web.de > wrote:

The error desribed in SF error report No. 870120 (segmentation fault
in test_re) still persists for me in 2.3.4c1.


Is there a patch for it? Bugfix releases are mostly low-effort
collections of patches that already exist -- there's not much attempt
made to call for new patches before the release goes out. All that
bugfix release candidates are intended to do is make sure that no new
bugs have been created.
--
Aahz (aa**@pythoncra ft.com) <*> http://www.pythoncraft.com/

Adopt A Process -- stop killing all your children!
Jul 18 '05 #2
aa**@pythoncraf t.com (Aahz) writes:
In article <m2************ @pchoel.psh>, Berthold Höllmann <bh***@web.de > wrote:

The error desribed in SF error report No. 870120 (segmentation fault
in test_re) still persists for me in 2.3.4c1.
Is there a patch for it? Bugfix releases are mostly low-effort
collections of patches that already exist -- there's not much attempt
made to call for new patches before the release goes out. All that
bugfix release candidates are intended to do is make sure that no new
bugs have been created.


The patch working for me is to reduce the default USE_RECURSION_L IMIT

diff Modules/_sre.c~ Modules/_sre.c
98c98
< #define USE_RECURSION_L IMIT 10000
--- #define USE_RECURSION_L IMIT 6835

Regards
Berthold
--
bh***@web.de / http://starship.python.net/crew/bhoel/
Jul 18 '05 #3
In article <m2************ @pchoel.psh>, Berthold Höllmann <bh***@web.de > wrote:
aa**@pythoncra ft.com (Aahz) writes:
In article <m2************ @pchoel.psh>, Berthold H=F6llmann <bh***@web.de =
wrote:

The error desribed in SF error report No. 870120 (segmentation fault
in test_re) still persists for me in 2.3.4c1.


Is there a patch for it? Bugfix releases are mostly low-effort
collections of patches that already exist -- there's not much attempt
made to call for new patches before the release goes out. All that
bugfix release candidates are intended to do is make sure that no new
bugs have been created.


The patch working for me is to reduce the default USE_RECURSION_L IMIT

diff Modules/_sre.c~ Modules/_sre.c
98c98
< #define USE_RECURSION_L IMIT 10000
---
#define USE_RECURSION_L IMIT 6835


In that case, you should check against the CVS version of Python; I
believe there've been some changes that affect this kind of thing. If
that fixes your problem, please close the bug report.
--
Aahz (aa**@pythoncra ft.com) <*> http://www.pythoncraft.com/

Adopt A Process -- stop killing all your children!
Jul 18 '05 #4
aa**@pythoncraf t.com (Aahz) writes:
In article <m2************ @pchoel.psh>, Berthold Höllmann <bh***@web.de > wrote:
aa**@pythoncr aft.com (Aahz) writes:
In article <m2************ @pchoel.psh>, Berthold H=F6llmann <bh***@web.de =
wrote:
....> In that case, you should check against the CVS version of Python; I
believe there've been some changes that affect this kind of thing. If
that fixes your problem, please close the bug report.
OK, I just checked the latest CVS and test_re succeeds. But should't
this fixed for 2.3.4 as well?

Another problem not there in the CVS version is an error in test_sax,
that fails for me on 2.3.4c1 with
echo test_sax > tests
make test TESTOPTS="-l -ftests -v"

case $MAKEFLAGS in \
*-s*) LD_LIBRARY_PATH =/home/devel/compile/Python-2.3.4c1:/usr/local/pgsql/lib:/usr/teTeX/lib CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \
*) LD_LIBRARY_PATH =/home/devel/compile/Python-2.3.4c1:/usr/local/pgsql/lib:/usr/teTeX/lib CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \
esac
running build
running build_ext
running build_scripts
find ./Lib -name '*.py[co]' -print | xargs rm -f
LD_LIBRARY_PATH =/home/devel/compile/Python-2.3.4c1:/usr/local/pgsql/lib:/usr/teTeX/lib ./python -E -tt ./Lib/test/regrtest.py -l -ftests -v
test_sax
Failed test_attrs_empt y
Failed test_attrs_watt r
Failed test_double_quo teattr
Failed test_escape_all
Failed test_escape_bas ic
Failed test_escape_ext ra
Failed test_expat_attr s_empty
Failed test_expat_attr s_wattr
Failed test_expat_dtdh andler
Failed test_expat_enti tyresolver
Failed test_expat_file
Failed test_expat_inco mplete
Failed test_expat_incr emental
Failed test_expat_incr emental_reset
Failed test_expat_inps ource_filename
Failed test_expat_inps ource_location
Failed test_expat_inps ource_stream
Failed test_expat_inps ource_sysid
Failed test_expat_loca tor_noinfo
Failed test_expat_loca tor_withinfo
Failed test_expat_nsat trs_empty
Failed test_expat_nsat trs_wattr
Failed test_filter_bas ic
Failed test_make_parse r
Failed test_make_parse r2
Failed test_nsattrs_em pty
Failed test_nsattrs_wa ttr
Failed test_quoteattr_ basic
test test_sax crashed -- exceptions.Type Error: int argument required
Traceback (most recent call last):
File "./Lib/test/regrtest.py", line 394, in runtest
the_package = __import__(abst est, globals(), locals(), [])
File "/home/devel/compile/Python-2.3.4c1/Lib/test/test_sax.py", line 689,in ?
confirm(value() , name)
File "/home/devel/compile/Python-2.3.4c1/Lib/test/test_sax.py", line 502,in test_sax_parse_ exception_str
DummyLocator(No ne, 1)))
File "/usr/local/lib/python2.3/site-packages/_xmlplus/sax/_exceptions.py" , line 94, in __str__
return "%s:%d:%d: %s" % (sysid, self.getLineNum ber(),
TypeError: int argument required
1 test failed:
test_sax
make: [test] Error 1 (ignored)
....

self.getLineNum ber() is None if I check using pdb, but what
disconcerts me is the

File "/usr/local/lib/python2.3/site-packages/_xmlplus/sax/_exceptions.py" , line 94, in __str__

line. Why is sax taken from the installed version instead of the
2.3.4c1 version.

Regards
Berthold
--
bh***@web.de / http://starship.python.net/crew/bhoel/
Jul 18 '05 #5
In article <m2************ @pchoel.psh>, Berthold Höllmann <bh***@web.de > wrote:
aa**@pythoncra ft.com (Aahz) writes:

In that case, you should check against the CVS version of Python; I
believe there've been some changes that affect this kind of thing. If
that fixes your problem, please close the bug report.


OK, I just checked the latest CVS and test_re succeeds. But should't
this fixed for 2.3.4 as well?


Nope. Bugfix releases (see PEP 6) are required to have essentially zero
behavioral changes, and IIRC the series of fixes that fixed your bug
caused some changes to the way sre operates, so it was a non-starter for
the 2.3.x series.

Anyway, please close your bug with a note about it being fixed in 2.4
CVS. As for the other issue, I don't have enough time/energy to even
understand what the issue is. Given that it's about SAX, I suggest you
start a new thread and hopefully someone else will pick it up.
--
Aahz (aa**@pythoncra ft.com) <*> http://www.pythoncraft.com/

Adopt A Process -- stop killing all your children!
Jul 18 '05 #6
> self.getLineNum ber() is None if I check using pdb, but what
disconcerts me is the

File "/usr/local/lib/python2.3/site-packages/_xmlplus/sax/_exceptions.py" , line
94, in __str__
line. Why is sax taken from the installed version instead of the
2.3.4c1 version.

I raised a bug report (864379) back in December or a similar problem with
2.3.3 on HP-UX - except there it caused a core dump.

I too was surprised that it was accessing code in the current installation.

The last response to the bug report suggested an incompatibility with
PyXML-0.8.3, but since then there have been no further responses.
Jul 18 '05 #7
aa**@pythoncraf t.com (Aahz) writes:
In article <m2************ @pchoel.psh>, Berthold Höllmann <bh***@web.de > wrote:
aa**@pythoncr aft.com (Aahz) writes:

In that case, you should check against the CVS version of Python; I
believe there've been some changes that affect this kind of thing. If
that fixes your problem, please close the bug report.


OK, I just checked the latest CVS and test_re succeeds. But should't
this fixed for 2.3.4 as well?


Nope. Bugfix releases (see PEP 6) are required to have essentially zero
behavioral changes, and IIRC the series of fixes that fixed your bug
caused some changes to the way sre operates, so it was a non-starter for
the 2.3.x series.

Anyway, please close your bug with a note about it being fixed in 2.4
CVS. As for the other issue, I don't have enough time/energy to even
understand what the issue is. Given that it's about SAX, I suggest you
start a new thread and hopefully someone else will pick it up.


OK, I closed the bug, but still would like to see USE_RECURSION_L IMIT
default reduced to something like 6500 (3000 seems to be OK for
FreeBSD on sparc64, so I guess this can't be a behavioral change).

Regards
Berthold
--
bh***@web.de / http://starship.python.net/crew/bhoel/
Jul 18 '05 #8
On Sun, 16 May 2004, Berthold Höllmann wrote:
caused some changes to the way sre operates, so it was a non-starter for
the 2.3.x series.

Anyway, please close your bug with a note about it being fixed in 2.4
CVS. As for the other issue, I don't have enough time/energy to even
understand what the issue is. Given that it's about SAX, I suggest you
start a new thread and hopefully someone else will pick it up.


OK, I closed the bug, but still would like to see USE_RECURSION_L IMIT
default reduced to something like 6500 (3000 seems to be OK for
FreeBSD on sparc64, so I guess this can't be a behavioral change).


Prior to 2.4, sre is recursive. Recent versions of gcc (in particular)
at higher optimisation levels are generating much larger stack frames than
used to be the case. This is even moreso the case with 64-bit platforms.

In the particular case of FreeBSD 4.x, in the presence of threads (the
default build choice, using libc_r) there is a hard coded stack size of
1MB, which leaves this environment especially sensitive to stack frame
size. The alternative threads libraries (libkse/libthr) available on 5.x
are less affected, but I don't know to what extent (& Python's configure
script doesn't know about them that I've heard).

I've seen reference to the problem on Linux, but I don't know why that
platform is (apparently) short on stack.

This is a highly platform/compiler dependant issue, which is why the maze
of #ifdef'ery for USE_RECURSION_L IMIT - something that has only happened
since about Python 2.3.1 as I recall.

The most effective solution with recent gcc versions is to recompile sre.c
with -Os (instead of -O3). It is unfortunately awkward to implement with
autoconf. The non-recursive sre in 2.4 is a complete fix, but is too
extensive/invasive a change for back-porting for a bug-fix release.

--
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullsey e.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.or g.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia

Jul 18 '05 #9
Andrew MacIntyre <an*****@bullse ye.apana.org.au > writes:
On Sun, 16 May 2004, Berthold Höllmann wrote:
> caused some changes to the way sre operates, so it was a non-starter for
> the 2.3.x series.
>
> Anyway, please close your bug with a note about it being fixed in 2.4
> CVS. As for the other issue, I don't have enough time/energy to even
> understand what the issue is. Given that it's about SAX, I suggest you
> start a new thread and hopefully someone else will pick it up.


OK, I closed the bug, but still would like to see USE_RECURSION_L IMIT
default reduced to something like 6500 (3000 seems to be OK for
FreeBSD on sparc64, so I guess this can't be a behavioral change).


Prior to 2.4, sre is recursive. Recent versions of gcc (in particular)
at higher optimisation levels are generating much larger stack frames than
used to be the case. This is even moreso the case with 64-bit platforms.

In the particular case of FreeBSD 4.x, in the presence of threads (the
default build choice, using libc_r) there is a hard coded stack size of
1MB, which leaves this environment especially sensitive to stack frame
size. The alternative threads libraries (libkse/libthr) available on 5.x
are less affected, but I don't know to what extent (& Python's configure
script doesn't know about them that I've heard).

I've seen reference to the problem on Linux, but I don't know why that
platform is (apparently) short on stack.

This is a highly platform/compiler dependant issue, which is why the maze
of #ifdef'ery for USE_RECURSION_L IMIT - something that has only happened
since about Python 2.3.1 as I recall.

The most effective solution with recent gcc versions is to recompile sre.c
with -Os (instead of -O3). It is unfortunately awkward to implement with
autoconf. The non-recursive sre in 2.4 is a complete fix, but is too
extensive/invasive a change for back-porting for a bug-fix release.


But the current value for USE_RECURSION_L IMIT is a problem on (some)
Linux Platforms. Why is reducing the default value a problem, when
setting it to a smaller value on some platforms is not a problem. I
thought everything causing segmentation faults from Python is to be
avoided.

Regards
Berthold
--
Dipl.-Ing. Berthold Höllmann __ Address:
ho**@GL-Group.com G / \ L Germanischer Lloyd
phone: +49-40-36149-7374 -+----+- Vorsetzen 32/35 P.O.Box 111606
fax : +49-40-36149-7320 \__/ D-20459 Hamburg D-20416 Hamburg
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3091
by: Berthold Hoellmann | last post by:
Hello, When I use ./configure --with-thread --with-fpectl --with-signal-module \ --with-pymalloc --enable-shared --with-cxx=g++ make test on 2.3.3 I get
15
2474
by: Aubrey Hutchison | last post by:
### this will test if your version of IDLE on windows is a MATURE program design ### print "Hello world, If Python IDLE is a mature program design it will output this" Save this simple single line program as "select.py" and try to run it. Then exit IDLE and try to restart IDLE.
12
4064
by: Kamilche | last post by:
I was looking for a way to speed up detecting invalid characters in my TCP string, and thought of yet another use for the translate function! If you were to 'translate out' the bad characters, and compare string lengths afterwards, you would know whether or not the line contained invalid characters. The new method is more than 10x faster than the standard 'if char in string' test! So - here's the code plus sample timings: ''' Translate...
0
1258
by: Sven Hilmahr | last post by:
Hello, I tried to do a Python 2.3.4 framework installation on my Mac OS X 10.3.5. I configured as described in /Mac/OSX/ReadMe: ../configure --enable-framework But on make test, one test failed: test test_macostools failed -- Traceback (most recent call last): File "/Users/sven/Downloads/Python-2.3.4/Lib/test/test_macostools.py",
1
3292
by: Iván Cabria | last post by:
Hi, I am a new user of python. I ran a python script and I got the following message: sh: test: argument expected I found that this error came from a line in the script:
8
2724
by: StepH | last post by:
Hi, I've this module : from optparse import OptionParser import re _version = "P1" def writeVar(f, line):
4
9374
by: arotem | last post by:
Hi, I am trying to call an unbound method (PrintInput) with the object instance as the first argument but getting the following error: "TypeError: unbound method PrintInput() must be called with test instance as first argument (got test instance instead)" Below is the sample code (test) for this purpose (two files). Any help is greatly appreciated.
2
2189
by: Adam Smith | last post by:
Hello, Installing Python 2.4.2 on UNIX platform Running FreeBSD O/S 4.9-STABLE FreeBSD 4.9-STABLE #0: Using distro from python's official site untar ../configure make make install
2
2439
by: Netkiller | last post by:
#!/usr/bin/python # -*- coding: utf-8 -*- """ Project: Network News Transport Protocol Server Program Description: 基于数æ®åº“的新闻组,实现BBSå‰ç«¯ä½¿ç”¨NNTPåè®®æ¥è®¿é—®è´´å­ Reference: NNTPå议: http://www.mibsoftware.com/userkt/0099.htm 正则表达å¼ï¼š http://wiki.woodpecker.org.cn/moin/RegExpInPython#head-2358765384844ed72f01658cbcde24613d941e9d
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10383
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.