[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2009-01-19 Thread Daniel Franke

Changes by Daniel Franke :


--
components: +Extension Modules -Library (Lib)

___
Python tracker 
<http://bugs.python.org/issue5004>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13156] _PyGILState_Reinit assumes auto thread state will always exist which is not true.

2012-05-15 Thread Daniel Franke

Daniel Franke  added the comment:

Just FYI, I've lately been trying to track down a different threading-related 
bug, and I think the fix for this one also fixed that one by accident.

Leave the following program running for a while under python-2.7.2:

---snip---
import subprocess
import threading
import random

class Forkfuzz(threading.Thread):
def run(self):
while random.randint(0,100) > threading.active_count():
Forkfuzz().start()

p = subprocess.Popen(['/bin/sleep', '1'])
p.communicate()

if __name__ == "__main__":
while True:
Forkfuzz().run()
---snip---

Eventually, you'll see a bunch of python process that are deadlocked in the 
following state:

#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
#1  0x004e02ad in PyThread_acquire_lock (lock=, 
waitflag=) at Python/thread_pthread.h:321
#2  0x004e0447 in find_key (key=1, value=0x0) at Python/thread.c:268
#3  0x004e053b in PyThread_get_key_value (key=38356064) at 
Python/thread.c:360
#4  0x004cb2f8 in PyGILState_GetThisThreadState () at 
Python/pystate.c:598
#5  _PyGILState_Reinit () at Python/pystate.c:547
#6  0x004e43f9 in PyOS_AfterFork () at ./Modules/signalmodule.c:979
...

The problem happens when one thread forks while another thread holds a lock on 
the TLS mutex. The child process then tries to acquire this mutex, and can 
never do so because the thread that holds it only exists in the parent.

When the same program is run under python-2.7.3, the problem goes away.

--
nosy: +dfranke

___
Python tracker 
<http://bugs.python.org/issue13156>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23199] libpython27.a in amd64 release is 32-bit

2015-02-21 Thread Daniel Franke

Daniel Franke added the comment:

I've downloaded and installed python-2.7.9.amd.msi and spent some hours trying 
to understand the myriad of i386/x86-64 related linker errors I get when 
attempting to build an extension module. Now that I found this report I can at 
least stop doubting my sanity.

As I take it that there won't be an updated package any time soon, would 
someone knowledgeable please be so kind and place copy-paste ready step-by-step 
instructions here on what to do to get a working 64bit .a file for the 2.7.9 
amd64 package? This would be much appreciated. Thanks.

--
nosy: +franke-daniel

___
Python tracker 
<http://bugs.python.org/issue23199>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com