Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: Modules/gcmodule.c:240: update_refs: Assertion `gc-> #45117

Closed
stuffduff mannequin opened this issue Jun 20, 2007 · 5 comments
Closed

python: Modules/gcmodule.c:240: update_refs: Assertion `gc-> #45117

stuffduff mannequin opened this issue Jun 20, 2007 · 5 comments
Labels
extension-modules C modules in the Modules dir

Comments

@stuffduff
Copy link
Mannequin

stuffduff mannequin commented Jun 20, 2007

BPO 1740599

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2007-06-26.01:18:33.000>
created_at = <Date 2007-06-20.21:24:45.000>
labels = ['extension-modules']
title = 'python: Modules/gcmodule.c:240: update_refs: Assertion `gc->'
updated_at = <Date 2007-06-26.01:18:33.000>
user = 'https://bugs.python.org/stuffduff'

bugs.python.org fields:

activity = <Date 2007-06-26.01:18:33.000>
actor = 'stuffduff'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Extension Modules']
creation = <Date 2007-06-20.21:24:45.000>
creator = 'stuffduff'
dependencies = []
files = []
hgrepos = []
issue_num = 1740599
keywords = []
message_count = 5.0
messages = ['32372', '32373', '32374', '32375', '32376']
nosy_count = 2.0
nosy_names = ['nnorwitz', 'stuffduff']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1740599'
versions = ['Python 2.4']

@stuffduff
Copy link
Mannequin Author

stuffduff mannequin commented Jun 20, 2007

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.

@stuffduff stuffduff mannequin closed this as completed Jun 20, 2007
@stuffduff stuffduff mannequin added the extension-modules C modules in the Modules dir label Jun 20, 2007
@stuffduff stuffduff mannequin closed this as completed Jun 20, 2007
@stuffduff stuffduff mannequin added the extension-modules C modules in the Modules dir label Jun 20, 2007
@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Jun 21, 2007

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.

@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Jun 21, 2007

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.

@stuffduff
Copy link
Mannequin Author

stuffduff mannequin commented Jun 21, 2007

Very stripped down, but complex instructions. See the README file. PUTENV replaces the need for an environment variable.
File Added: pyGTMbug.tar.gz

@stuffduff
Copy link
Mannequin Author

stuffduff mannequin commented Jun 26, 2007

Close this. I found the error. Sorry.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir
Projects
None yet
Development

No branches or pull requests

0 participants