Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening a comm using a target that does not exist makes the kernel crash #419

Open
martinRenou opened this issue Jan 31, 2025 · 2 comments
Labels

Comments

@martinRenou
Copy link
Member

It crashes upon trying to register the comm on the comm manager:

Error: signal 11:
/home/martin/micromamba/envs/jupytergis/bin/../lib/libxeus-python.so.0(_ZN4xpyt15sigsegv_handlerEi+0x2b) [0x7f3a5c352b8b]
/lib64/libc.so.6(+0x1a090) [0x7f3a5ba10090]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libxeus.so.11(_ZN4xeus13xcomm_manager13register_commENS_19xbasic_fixed_stringIcLm55ELi5ENS_13string_policy12silent_errorESt11char_traitsIcEEEPNS_5xcommE+0x12) [0x7f3a5c1bcac2]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libxeus-python.so.0(+0x4f419) [0x7f3a5c2fb419]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libxeus-python.so.0(+0x50a05) [0x7f3a5c2fca05]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libxeus-python.so.0(+0x45573) [0x7f3a5c2f1573]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libpython3.10.so.1.0(+0x13f4cd) [0x7f3a5bf3f4cd]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libpython3.10.so.1.0(_PyObject_MakeTpCall+0x2eb) [0x7f3a5bf3864b]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libpython3.10.so.1.0(+0x14b163) [0x7f3a5bf4b163]
/home/martin/micromamba/envs/jupytergis/bin/../lib/libpython3.10.so.1.0(PyVectorcall_Call+0xce) [0x7f3a5bf4bbce

We should either:

  • follow ipykernel's behavior to not complain at all (automatically create the target)
  • raise a proper human readable error
@JohanMabille
Copy link
Member

According to the protocol, if the target does not exist, the kernel should reply with a comm_close message. Therefore, the target must be created before opening a comm.

However, this code is supposed to send the comm_close message, so the crash must be investigated.

@JohanMabille
Copy link
Member

Ok the bug is due to this function which instantiates a default xtarget if not found in the map. The default constructor of xtarget cannot initialize its comm manager and I think xtarget should not be default constructible at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants