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: python: Modules/gcmodule.c:240: update_refs: Assertion `gc->
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: nnorwitz, stuffduff
Priority: normal Keywords:

Created on 2007-06-20 21:24 by stuffduff, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg32372 - (view) Author: Sean (stuffduff) Date: 2007-06-20 21:24
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. 

msg32373 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-06-21 05:40
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.
msg32374 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-06-21 05:41
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.
msg32375 - (view) Author: Sean (stuffduff) Date: 2007-06-21 20:55
Very stripped down, but complex instructions.  See the README file.  PUTENV replaces the need for an environment variable.
File Added: pyGTMbug.tar.gz
msg32376 - (view) Author: Sean (stuffduff) Date: 2007-06-26 01:18
Close this. I found the error.  Sorry.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45117
2007-06-20 21:24:45stuffduffcreate