[ python-Bugs-1740599 ] python: Modules/gcmodule.c:240: update_refs: Assertion `gc->

SourceForge.net noreply at sourceforge.net
Thu Jun 21 07:41:45 CEST 2007


Bugs item #1740599, was opened at 2007-06-20 14:24
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1740599&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Sean (stuffduff)
Assigned to: Nobody/Anonymous (nobody)
Summary: python: Modules/gcmodule.c:240: update_refs: Assertion `gc->

Initial Comment:
Extension module loads and runs correctly.
When exiting python the following error occurrs:

GNU gdb Red Hat Linux (6.5-15.fc6rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: python2.4

...

<ctrl-d>

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208243504 (LWP 12884)]
collect (generation=2) at Modules/gcmodule.c:241
241     Modules/gcmodule.c: No such file or directory.
        in Modules/gcmodule.c
(gdb) bt
#0  collect (generation=2) at Modules/gcmodule.c:241
#1  0x080e1ec5 in PyGC_Collect () at Modules/gcmodule.c:1196
#2  0x080da88a in Py_Finalize () at Python/pythonrun.c:353
#3  0x08055176 in Py_Main (argc=0, argv=0xbfb8dae4) at Modules/main.c: 513
#4  0x08054962 in main (argc=-1208273400, argv=0x812ed68) at Modules/python.c:23

Debug build of python2.4.4 gives:

python: Modules/gcmodule.c:240: update_refs: Assertion `gc->gc.gc_refs == (-3)' failed. 



----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2007-06-20 22:41

Message:
Logged In: YES 
user_id=33168
Originator: NO

I forgot to mention about the putenv()s.  Are those necessary?  The
directories won't exist on any one else's box.  If those are not necessary
to cause the assertion, remove those too from the minimal test case.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2007-06-20 22:40

Message:
Logged In: YES 
user_id=33168
Originator: NO

I looked at the attachment and it's not clear how you are using this given
there is a main().  The main() doesn't have a Py_Initialize() either.  So
I'm guessing that was left over and you are really using this as a module. 
Can you reduce it to the minimal test case?  Remove the main() and all the
methods that are not used and will cause the crash.  Also what is the
python code that you execute.  Basically can you demonstrate a complete
scenario (how to build and execute) to cause the problem.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1740599&group_id=5470


More information about the Python-bugs-list mailing list