Summary: | Python hangs when you attempt to use os._exit in a thread | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Julian Krause <gentoo> |
Component: | [OLD] Development | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Example testcase
This testcase is actually the one that fails |
Description
Julian Krause
2006-02-02 22:03:52 UTC
Created attachment 78788 [details]
Example testcase
On both my ~x86 and my x86 hardened box the test program exits immediately with exit status 3 (after changing os.exit to os._exit). So cannot reproduce. Wild guess: both systems have nptl in USE. If someone has a -nptl box around to test with: can you test if this is nptl-related? Comment on attachment 78788 [details]
Example testcase
import os, threading
def run():
os._exit(3)
t = threading.Thread(target=run)
t.start()
(In reply to comment #2) > On both my ~x86 and my x86 hardened box the test program exits immediately with > exit status 3 (after changing os.exit to os._exit). So cannot reproduce. Wild > guess: both systems have nptl in USE. If someone has a -nptl box around to test > with: can you test if this is nptl-related? My box was -nptl. I turned on nptl and nptlony and the testcase now passes as well as the program that was failing. Does this mean the bug should be moved to UPSTREAM? Created attachment 78820 [details]
This testcase is actually the one that fails
It does look like this is a bug, but I'm not sure if it's a python or a glibc bug. You said gentoo was the only os this happened on? Are the non-gentoo systems this works on using nptl or not (you should be able to run /lib/libc.so.6 and look for "Native POSIX Threads Library" in the output to find out)? The only other person I knew who had the problem was also running Gentoo but he also compiles Python from source himself. After reemerging glibc with nptl and nptlonly, his issue was fixed as well. I'm going to resolve this bug and move it upstream as it seems like it is not a Gentoo issue. |