Programs using threading tend to lock up consistently -- it seems that some threads are either never unblocked, or they never exit. Same code on rhl-7.3 (python2) runs without locking issues. Could this be caused by NPTL? Here is the code I'm using: #!/usr/bin/python2 -tt import threading import socket import random class TestThread(threading.Thread): def __init__(self, ip, semaphore): threading.Thread.__init__(self) self.ip = ip self.semaphore = semaphore def run(self): self.semaphore.acquire() try: host = socket.gethostbyaddr(self.ip) self.host = host[0] except: self.host = self.ip print '%s resolves to %s' % (self.ip, self.host) self.semaphore.release() semaphore = threading.Semaphore(50) threads = [] for i in range(0, 100): a = random.randint(1, 250) b = random.randint(1, 250) ip = '152.3.%d.%d' % (a, b) t = TestThread(ip, semaphore) threads.append(t) t.start() hosts = {} for t in threads: t.join() hosts[t.ip] = t.host print 'Results:' print hosts
As a temporary workaround: LD_ASSUME_KERNEL=2.4.19 This fixes the lockup issues. Which makes NPTL highly suspect. :)
Thanks for the bug report, I'll run it through the glibc people.
Can you please try ftp://people.redhat.com/jakub/glibc/errata/9/ ?
Yes, those do fix the lock-up problem. I'm still running some tests, but so far it's been running smoothly. :D
If you are satisfied with the result, can you please close the bug?