This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: NetBSD build with --with-pydebug causes SIGSEGV
Type: crash Stage: resolved
Components: Documentation, Tests Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: ajaksu2, georg.brandl, gregory.p.smith, mfleming, nnorwitz, ocean-city, skrah, splitscreen
Priority: normal Keywords: patch

Created on 2006-08-02 13:00 by splitscreen, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
README-trunk.diff splitscreen, 2006-08-09 10:23 trunk README patch
README-24.diff splitscreen, 2006-08-09 10:24 2.4 README patch
Messages (12)
msg29424 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-02 13:00
The testInfiniteRecursion test in
Lib/test/test_exceptions.py causes Python to segfault
if it has been compiled on NetBSD with --with-pydebug.
This is due to the fact that the default stack size on
NetBSD is 2MB and Python tries to allocate memory for
debugging information on the stack.

The documentation (README under 'Setting the
optimization/debugging options'?) should be updated to
state that if you want to run the test suite with
debugging enabled in the interpreter, you are advised
to increase the stack size, probably to 4096.

This issue is also in release24-maint.

Matt
msg29425 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-08-09 05:40
Logged In: YES 
user_id=33168

Matt, can you make a patch?  Doc changes are fine to go into
2.5 (and 2.4).
msg29426 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-09 10:23
Logged In: YES 
user_id=1126061

Patches for trunk and 2.4 attached.
msg29427 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2006-08-18 09:49
Logged In: YES 
user_id=1200846

Sorry for interruption. I encountered this problem on VC6
debug build too. Is there any chance to supress recursion
limit for this test like this?

Index: Lib/test/test_exceptions.py
===================================================================
--- Lib/test/test_exceptions.py	(revision 51370)
+++ Lib/test/test_exceptions.py	(working copy)
@@ -306,16 +306,25 @@
         self.assertEquals(x.fancy_arg, 42)
 
     def testInfiniteRecursion(self):
+        def run(f):
+            import sys
+            limit = sys.getrecursionlimit()
+            sys.setrecursionlimit(400) # supress for debug mode
+            try:
+                self.assertRaises(RuntimeError, f)
+            finally:
+                sys.setrecursionlimit(limit)
+
         def f():
             return f()
-        self.assertRaises(RuntimeError, f)
+        run(f)
 
         def g():
             try:
                 return g()
             except ValueError:
                 return -1
-        self.assertRaises(RuntimeError, g)
+        run(g)
 
 def test_main():
     run_unittest(ExceptionTests)
msg29428 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-18 09:55
Logged In: YES 
user_id=1126061

Hmm.. perhaps this problem is more widespread that I'd
realised. Apparently the default stack size on windows is
1MB (someone correct me if I'm wrong). Perhaps there should
be an option with the configure script to change the stack
size? 

Alternatively we could stop allocating space for debug error
messages on the stack ;-)
msg84494 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 04:22
Hirokazu-san, does this still happen in 2.6?
msg84518 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-03-30 06:40
It seems not happening on VC6. Stack size modification was checked in
r65663 to workaround this issue, but SEGV doesn't occur even if I
reverted this change on working copy. But when I lowered stack size of
python_d.exe too much, SEGV occurred.

Please ask original poster about NetBSD.
msg110497 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-16 21:02
msg29427 gives an inline patch to code.  The patches attached are strictly to docs.  Can we please have a staement as to the status of this issue so that we can go forward.
msg110552 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-07-17 13:37
Matt, if you still follow this: Does this problem exist in 2.6/2.7/NetBSD?

I think this should be set to pending.
msg111179 - (view) Author: Matt Fleming (mfleming) Date: 2010-07-22 14:40
I'm not really tracking this anymore but i can certainly try to
recreate the issue sometime this week if required?

On 17 July 2010 14:37, Stefan Krah <report@bugs.python.org> wrote:
>
> Stefan Krah <stefan-usenet@bytereef.org> added the comment:
>
> Matt, if you still follow this: Does this problem exist in 2.6/2.7/NetBSD?
>
> I think this should be set to pending.
>
> ----------
> nosy: +skrah
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1533105>
> _______________________________________
>
msg118909 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2010-10-17 00:38
I don't see this issue on netbsd 5.0.2 i386 in the py3k branch.
msg217388 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-04-28 17:28
Given msg84518 and msg118909 I think this can be closed.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43760
2014-04-28 17:28:58skrahsetstatus: open -> closed
resolution: out of date
messages: + msg217388

stage: patch review -> resolved
2014-02-03 19:41:11BreamoreBoysetnosy: - BreamoreBoy
2010-10-29 10:07:21adminsetassignee: georg.brandl -> docs@python
2010-10-17 00:38:39gregory.p.smithsetnosy: + gregory.p.smith
messages: + msg118909
2010-07-22 14:40:31mflemingsetnosy: + mfleming
messages: + msg111179
2010-07-17 13:37:53skrahsetnosy: + skrah
messages: + msg110552
2010-07-16 21:02:00BreamoreBoysetnosy: + BreamoreBoy
messages: + msg110497
2009-03-30 06:40:13ocean-citysetmessages: + msg84518
2009-03-30 04:22:54ajaksu2setassignee: georg.brandl
type: crash
components: + Tests

keywords: + patch
nosy: + ajaksu2, georg.brandl
messages: + msg84494
stage: patch review
2008-01-05 19:46:03christian.heimessetversions: + Python 2.6
2006-08-02 13:00:21splitscreencreate