Process hang while executing logging.warning under specific circumstances
See original GitHub issueI identified a kernel hang when calling the python logging facility under certain circumstances. The hang is specific for usage of function in jupyter, i.e. it does not happen in a ipython command shell.
The hang happens when I import a specific module form this repository: https://github.com/secdev/scapy/ (the issue can be reproduced with the version from pip as well).
from scapy.route6 import *
The hang happens in line 234 when this method is called
warning("No route found for IPv6 destination %s (no default route?)" % dst)
warning() is a wrapper that calls
logging.getLogger("scapy.runtime").logging(x)
where x is the message. I am not able to reproduce this issue in a smaller test case, i.e. I cannot find other situations where a call to logging.warning() hangs the kernel.
The reason why I open this issue with jupyter is that the jupyter notebook is the only environment where this results in a hang. The code works without issues in the standard python2.7 interpreter, and in the ipython command shell
I experience the issue on Mac OS X with the following python, and package versions
$ python --version
Python 2.7.10
ipython and jupyter versions are:
ipykernel==4.3.1
ipython==4.2.0
ipython-genutils==0.1.0
ipywidgets==5.1.2
jupyter==1.0.0
jupyter-client==4.2.2
jupyter-console==4.1.1
jupyter-core==4.1.0
Is there any additional information that I can provide to further debug this problem?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top GitHub Comments
On Windows I’d guess that the issue is trying to write to a nonexistant stderr; once some buffer fills up, the next write call will block. We’ve seen this before on Windows. This issue was reported on a Mac, so I doubt it’s the same, but the cause may be similar.
@takluyver do you think this is the same issue, and does it help identify what’s going wrong? Thanks!
https://github.com/ipython/ipyparallel/issues/161