How do I connect to the kernel using lldb -p <pid> without jupyter immediately restarting the kernel

54 views
Skip to first unread message

Christian Schafmeister

unread,
Nov 3, 2017, 12:55:43 PM11/3/17
to Project Jupyter

When I connect to my kernel using  lldb -p <pid> to debug a crash, the jupyter notebook system immediately thinks the kernel crashed and restarts it.

Is there a jupyter notebook command line option or configuration setting that will prevent this from happening?

[Shell] top of main loop
[Shell] top of main loop
[Shell] top of main loop
[Shell] top of main loop
<STARTING lldb -p <pid> here>
[I 12:47:11.831 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 719da16d-fbe0-48ce-840f-8f9472233114 restarted

I'm implementing a new kernel for jupyter notebooks and I need to trap segfaults occasionally and this notebook restarting behavior is getting in my way.

Best,

Christian Schafmeister
Professor
Chemistry Department
Temple University



Roland Weber

unread,
Nov 6, 2017, 2:23:22 AM11/6/17
to Project Jupyter
When debugging, you could change the KernelRestarter class. I'm not sure if it's configurable, but you certainly can hack the code. It's in the jupyter_client package.

hope that helps,
  Roland

Matthias Bussonnier

unread,
Nov 6, 2017, 2:03:08 PM11/6/17
to jup...@googlegroups.com
I think you should be able to set `c.KernelRestarter.time_to_dead` to
an arbitrary large value. I don't think it allow infinity of negative
value to never consider the kernel dead, though if you are poking at
the code and want to submit a Pull-request to enable that I guess that
would be accepted.

Let us know of your experience in using LLDB to debug kernels.

Thanks,
--
Matthias
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/0bbaa1ea-5498-404c-8e37-af752e768eff%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages