[issue38884] __import__ is not thread-safe on Python 3

2020-02-26 Thread Ryan Petrello
Ryan Petrello added the comment: I believe I'm also encountering some version of this bug while importing code from the kombu library within a multi-threaded context. For what it's worth, I'm able to reproduce the reported deadlock (https://bugs.python.org/file48737/issue38884.zip) using

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: Actually, I think I *am* seeing this on 3.7: (gdb) bt #0 0x7f130d530adb in futex_abstimed_wait (cancel=true, private=, abstime=0x0, expected=0, futex=0x142c6d0) at ../nptl/sysdeps/unix/sysv/linux/sem_waitcommon.c:43 #1 do_futex_wait (sem=sem@entry

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: Also, for what it's worth, I'm *not* able to reproduce this hang in Python 3.7.0. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: 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=, maxsize=0, all_tasks_done

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
Ryan Petrello added the comment: This issue seems _very_ similar to https://bugs.python.org/issue6721, but I wasn't able to encounter the exact stack I've been seeing on my end. Specifically, when I run the reproducer script in this issue (hang.py) for a few minutes, hung child processes

[issue37429] Python hangs on fork when a logger is in use in a background thread

2019-06-27 Thread Ryan Petrello
New submission from Ryan Petrello : It's possible to cause Python child processes to encountered a deadlock and hang on fork by: 1) Spawning one or more threads in a parent process 2) Have one of those threads emit log lines 3) Have the main thread use os.fork() 4) In the child, log

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2018-10-30 Thread Ryan Petrello
Ryan Petrello added the comment: Any chance this patch was every applied to Python3? It looks to me like 3.6 has the old code: https://github.com/python/cpython/blob/3.6/Modules/_multiprocessing/semaphore.c#L448 -- nosy: +ryan.petrello

[issue28466] SIGALRM fails to interrupt time.sleep() call on Python 3.6

2016-10-17 Thread Ryan Petrello
New submission from Ryan Petrello: I may have found a bug in SIGALRM handling in Python3.5. I've not been able to reproduce the same issue in Python2.7 or 3.4. Here's a simple example that illustrates the issue (which I'm able to reproduce on OS X 10.11.3 El Capitan and Ubuntu 14.04

[issue28466] SIGALRM fails to interrupt time.sleep() call on Python 3.5

2016-10-17 Thread Ryan Petrello
Changes by Ryan Petrello <r...@ryanpetrello.com>: -- title: SIGALRM fails to interrupt time.sleep() call on Python 3.6 -> SIGALRM fails to interrupt time.sleep() call on Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http

[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-23 Thread Ryan Petrello
Ryan Petrello added the comment: Nick, That seems reasonable to me :) I've updated my library to just use inspect.getfullargspec for Py3. Thanks for taking the time to walk through this with me! -- ___ Python tracker <rep...@bugs.python.

[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-22 Thread Ryan Petrello
Ryan Petrello added the comment: Nick, My main reasoning for not using it is that it's marked as deprecated in the docstring, and I want to avoid relying on it if disappears in the future :) Warnings or not, the shim that I wrote doesn't use any deprecated code, so that's why I took

[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-22 Thread Ryan Petrello
Ryan Petrello added the comment: Nick, My use case is an issue of backwards compatibility and multiple Python version support for a library that makes prolific use of the legacy argspec (args, varargs, varkw, defaults) namedtuple, *including* the bound self argument behavior. argspec

[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-20 Thread Ryan Petrello
Ryan Petrello added the comment: Yury/Nick, Any word on this? I know it's minor, but I'd love to see this make it into Python3.6. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-01 Thread Ryan Petrello
Changes by Ryan Petrello <r...@ryanpetrello.com>: Added file: http://bugs.python.org/file43090/signature-from-callable-skip-bound-arg.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-01 Thread Ryan Petrello
Changes by Ryan Petrello <r...@ryanpetrello.com>: Added file: http://bugs.python.org/file43089/signature-from-callable-skip-bound-arg.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-01 Thread Ryan Petrello
Changes by Ryan Petrello <r...@ryanpetrello.com>: Added file: http://bugs.python.org/file43087/signature-from-callable-skip-bound-arg.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python