xpdAcq / shed-streaming

Streaming Heterogeneous Event Data
https://xpdacq.github.io/shed-streaming/
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

'import shed' *stops* (but does not crash) python #198

Closed danielballan closed 4 years ago

danielballan commented 4 years ago

We ran into this issue trying to deploy at PDF. Please advise.

To reproduce:

$ conda create -n test-shed python=3.7 shed -c nsls2forge
$ conda activate test-shed
$ python
Python 3.7.7 (default, May  7 2020, 21:25:33) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import shed

[1]+  Stopped                 python

Resuming the process shows that shed is indeed imported. Some code that runs during import must be stopping the process.

$ %1
python
>>> shed
<module 'shed' from '/home/dallan/.conda/envs/test-shed/lib/python3.7/site-packages/shed/__init__.py'>

By watching the output from python -v, we observed debug messages about what is imported . It seems that some xonsh modules come in just before the stop, but we did not have time to investigate further so take that as a suggestion that could be completely off. Excerpt:

$python -v
<snipped>
>>> import shed
<snipped>
import 'xonsh.lib.subprocess' # <xonsh.__amalgam__.XonshImportHook object at 0x7f2886ee0110>
# /home/dallan/.conda/envs/test-shed/lib/python3.7/__pycache__/shlex.cpython-37.pyc matches /home/dallan/.conda/envs/test-shed/lib/python3.7/shlex.py
# code object from '/home/dallan/.conda/envs/test-shed/lib/python3.7/__pycache__/shlex.cpython-37.pyc'
import 'shlex' # <_frozen_importlib_external.SourceFileLoader object at 0x7f28860dab90>
# /home/dallan/.conda/envs/test-shed/lib/python3.7/__pycache__/pty.cpython-37.pyc matches /home/dallan/.conda/envs/test-shed/lib/python3.7/pty.py
# code object from '/home/dallan/.conda/envs/test-shed/lib/python3.7/__pycache__/pty.cpython-37.pyc'
# /home/dallan/.conda/envs/test-shed/lib/python3.7/__pycache__/tty.cpython-37.pyc matches /home/dallan/.conda/envs/test-shed/lib/python3.7/tty.py
# code object from '/home/dallan/.conda/envs/test-shed/lib/python3.7/__pycache__/tty.cpython-37.pyc'
# extension module 'termios' loaded from '/home/dallan/.conda/envs/test-shed/lib/python3.7/lib-dynload/termios.cpython-37m-x86_64-linux-gnu.so'
# extension module 'termios' executed from '/home/dallan/.conda/envs/test-shed/lib/python3.7/lib-dynload/termios.cpython-37m-x86_64-linux-gnu.so'
import 'termios' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7f28860e9310>
import 'tty' # <_frozen_importlib_external.SourceFileLoader object at 0x7f28860e1e10>
import 'pty' # <_frozen_importlib_external.SourceFileLoader object at 0x7f28860e1650>

[2]+  Stopped                 python -v

We leave the rest to the xpdacq team. Please let us know if you cannot reproduce.

cc @tacaswell, @gwbischof, @DanOlds, @mrakitin

st3107 commented 4 years ago

Fix in PR #199

danielballan commented 4 years ago

Thanks for the fast turnaround.

sbillinge commented 4 years ago

Thanks Songsheng!

On Tue, Aug 25, 2020 at 6:40 PM Dan Allan notifications@github.com wrote:

Thanks for the fast turnaround.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xpdAcq/SHED/issues/198#issuecomment-680304408, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAOWUNL5SACLE3RZGM34ZDSCQ4W3ANCNFSM4QJ5FIJQ .

-- Professor Simon Billinge Columbia University