Author ryan.petrello
Recipients ryan.petrello
Date 2019-06-27.12:47:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561639674.19.0.58582136818.issue37429@roundup.psfhosted.org>
In-reply-to
Content
Here's the stack of one the hung child processes under py2.7:

(gdb) py-bt
#4 Waiting for a lock (e.g. GIL)
#5 Waiting for a lock (e.g. GIL)
#7 Frame 0x7f346a925430, for file /usr/lib64/python2.7/Queue.py, line 118, in put (self=<Queue(unfinished_tasks=147, queue=<collections.deque at remote 0x7f346a908ec0>, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7f346aa74230>, acquire=<built-in method acquire of thread.lock object at remote 0x7f346aa74230>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x7f346aa74230>) at remote 0x7f3467df4150>, mutex=<thread.lock at remote 0x7f346aa74230>, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7f346aa74230>, acquire=<built-in method acquire of thread.lock object at remote 0x7f346aa74230>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0x7f346aa74230>) at remote 0x7f3467df4110>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0x7f346aa74230>, acquire=<built-in method acquire of thread.lock object ...(truncated)
    self.not_full.acquire()
#11 Frame 0x1ae6ae0, for file /tmp/foo/lib/python2.7/site-packages/concurrent/futures/thread.py, line 129, in submit (self=<ThreadPoolExecutor(_shutdown_lock=<thread.lock at remote 0x7f346aa74270>, _shutdown=False, _max_workers=2, _thread_name_prefix='Thread---Type <return> to continue, or q <return> to quit---
PoolExecutor-0', _threads=set([<...>, <...>]), _work_queue=<...>) at remote 0x7f3467df0f90>, fn=<instancemethod at remote 0x7f3467e01e10>, args=(<LogRecord(threadName='MainThread', name='example', thread=139863104821056, created=<float at remote 0x1a7d580>, process=1155, processName='Process-74', args=(), module='hang', filename='hang.py', levelno=20, exc_text=None, pathname='/tmp/hang.py', lineno=25, msg='exiting', exc_info=None, funcName='exit', relativeCreated=<float at remote 0x1a7d568>, levelname='INFO', msecs=<float at remote 0x1a7d550>) at remote 0x7f346a972490>,), kwargs={}, f=<Future(_exception=None, _result=None, _condition=<_Condition(_Condition__lock=<_RLock(_Verbose__verbose=False, _RLock__owner=None, _RLock__block=<thread.lock at remote 0x7f346aa...(truncated)
    self._work_queue.put(w)
#15 Frame 0x7f3467df15a8, for file /tmp/hang.py, line 16, in handle (self=<ThreadPoolLogger(executor=<ThreadPoolExecutor(_shutdown_lock=<thread.lock at remote 0x7f346aa74270>, _shutdown=False, _max_workers=2, _thread_name_prefix='ThreadPoolExecutor-0', _threads=set([<...>, <...>]), _work_queue=<...>) at remote 0x7f3467df0f90>) at remote 0x7f3467df0f50>, record=<LogRecord(threadName='MainThread', name='example', thread=139863104821056, created=<float at remote 0x1a7d580>, process=1155, processName='Process-74', args=(), module='hang', filename='hang.py', levelno=20, exc_text=None, pathname='/tmp/hang.py', lineno=25, msg='exiting', exc_info=None, funcName='exit', relativeCreated=<f---Type <return> to continue, or q <return> to quit---
loat at remote 0x1a7d568>, levelname='INFO', msecs=<float at remote 0x1a7d550>) at remote 0x7f346a972490>)
    self.executor.submit(self.send, record)
#19 Frame 0x7f346a925240, for file /usr/lib64/python2.7/logging/__init__.py, line 1318, in callHandlers (self=<Logger(name='example', parent=None, handlers=[<ThreadPoolLogger(executor=<ThreadPoolExecutor(_shutdown_lock=<thread.lock at remote 0x7f346aa74270>, _shutdown=False, _max_workers=2, _thread_name_prefix='ThreadPoolExecutor-0', _threads=set([<...>, <...>]), _work_queue=<...>) at remote 0x7f3467df0f90>) at remote 0x7f3467df0f50>], level=10, disabled=0, propagate=1, filters=[]) at remote 0x7f3467de1a90>, record=<LogRecord(threadName='MainThread', name='example', thread=139863104821056, created=<float at remote 0x1a7d580>, process=1155, processName='Process-74', args=(), module='hang', filename='hang.py', levelno=20, exc_text=None, pathname='/tmp/hang.py', lineno=25, msg='exiting', exc_info=None, funcName='exit', relativeCreated=<float at remote 0x1a7d568>, levelname='INFO', msecs=<float at remote 0x1a7d550>) at remote 0x7f346a972490>, c=<...>, found=1, hdlr=<...>)
    hdlr.handle(record)
#22 Frame 0x7f3467df13e0, for file /usr/lib64/python2.7/logging/__init__.py, line 1278, in handle (self=<Logger(name='example', parent=None, handlers=[<ThreadPoolLogger(executor=<ThreadPoolExecutor(_shutdown_lock=<thread.lock at remote 0x7f346aa74270>, _shut---Type <return> to continue, or q <return> to quit---
down=False, _max_workers=2, _thread_name_prefix='ThreadPoolExecutor-0', _threads=set([<...>, <...>]), _work_queue=<...>) at remote 0x7f3467df0f90>) at remote 0x7f3467df0f50>], level=10, disabled=0, propagate=1, filters=[]) at remote 0x7f3467de1a90>, record=<LogRecord(threadName='MainThread', name='example', thread=139863104821056, created=<float at remote 0x1a7d580>, process=1155, processName='Process-74', args=(), module='hang', filename='hang.py', levelno=20, exc_text=None, pathname='/tmp/hang.py', lineno=25, msg='exiting', exc_info=None, funcName='exit', relativeCreated=<float at remote 0x1a7d568>, levelname='INFO', msecs=<float at remote 0x1a7d550>) at remote 0x7f346a972490>)
    self.callHandlers(record)
#25 Frame 0x1ae60e0, for file /usr/lib64/python2.7/logging/__init__.py, line 1268, in _log (self=<Logger(name='example', parent=None, handlers=[<ThreadPoolLogger(executor=<ThreadPoolExecutor(_shutdown_lock=<thread.lock at remote 0x7f346aa74270>, _shutdown=False, _max_workers=2, _thread_name_prefix='ThreadPoolExecutor-0', _threads=set([<...>, <...>]), _work_queue=<...>) at remote 0x7f3467df0f90>) at remote 0x7f3467df0f50>], level=10, disabled=0, propagate=1, filters=[]) at remote 0x7f3467de1a90>, level=20, msg='exiting', args=(), exc_info=None, extra=None, fn='/tmp/hang.py', lno=25, func='exit', record=<LogRecord(threadName='MainThread', name='example', thread=139863104821056, created=<float at remote 0x1a7d580>, process=1155, processName='Process-74', args=(...), ---Type <return> to continue, or q <return> to quit---

Here's the similar stack under py3.6:

(gdb) bt
#0  0x00007f208166cadb in futex_abstimed_wait (cancel=true, private=<optimized out>,
    abstime=0x0, expected=0, futex=0x88bbf0)
    at ../nptl/sysdeps/unix/sysv/linux/sem_waitcommon.c:43
#1  do_futex_wait (sem=sem@entry=0x88bbf0, abstime=0x0)
    at ../nptl/sysdeps/unix/sysv/linux/sem_waitcommon.c:223
#2  0x00007f208166cb6f in __new_sem_wait_slow (sem=0x88bbf0, abstime=0x0)
    at ../nptl/sysdeps/unix/sysv/linux/sem_waitcommon.c:292
#3  0x00007f208166cc0b in __new_sem_wait (sem=<optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:28
#4  0x00007f2081a05a80 in PyThread_acquire_lock_timed (lock=0x88bbf0,
    microseconds=microseconds@entry=-1, intr_flag=intr_flag@entry=0)
    at /usr/src/debug/Python-3.6.8/Python/thread_pthread.h:386
#5  0x00007f2081a05c34 in PyThread_acquire_lock (lock=<optimized out>,
    waitflag=waitflag@entry=1)
    at /usr/src/debug/Python-3.6.8/Python/thread_pthread.h:595
#6  0x00007f2081918797 in _enter_buffered_busy (self=self@entry=0x7f2081e29b48)
    at /usr/src/debug/Python-3.6.8/Modules/_io/bufferedio.c:292
#7  0x00007f2081a1f131 in buffered_flush (self=0x7f2081e29b48, args=<optimized out>)
    at /usr/src/debug/Python-3.6.8/Modules/_io/bufferedio.c:852
---Type <return> to continue, or q <return> to quit---
#8  0x00007f2081962dd0 in _PyCFunction_FastCallDict (
    func_obj=func_obj@entry=0x7f207eb1cb88, args=args@entry=0x0, nargs=0,
    kwargs=kwargs@entry=0x0)
    at /usr/src/debug/Python-3.6.8/Objects/methodobject.c:209
#9  0x00007f2081924c46 in _PyObject_FastCallDict (func=func@entry=0x7f207eb1cb88,
    args=args@entry=0x0, nargs=nargs@entry=0, kwargs=kwargs@entry=0x0)
    at /usr/src/debug/Python-3.6.8/Objects/abstract.c:2313
#10 0x00007f2081925c66 in callmethod (is_size_t=1, va=0x7ffee1ce4ef0, format=0x0,
    func=0x7f207eb1cb88) at /usr/src/debug/Python-3.6.8/Objects/abstract.c:2583
History
Date User Action Args
2019-06-27 12:47:54ryan.petrellosetrecipients: + ryan.petrello
2019-06-27 12:47:54ryan.petrellosetmessageid: <1561639674.19.0.58582136818.issue37429@roundup.psfhosted.org>
2019-06-27 12:47:54ryan.petrellolinkissue37429 messages
2019-06-27 12:47:53ryan.petrellocreate