Open marius311 opened 1 year ago
Hmm, I don't see usage_request
in the Jupyter protocol docs. @minrk, is this something new?
There was a PR to add a usage_request
message, but it was apparently rejected: https://github.com/jupyterlab/jupyterlab/pull/11285
Looks like it might be a kernel extension? https://github.com/jupyter-server/jupyter-resource-usage
I guess we should simply ignore messages we don't understand?
For example, we could replace https://github.com/JuliaLang/IJulia.jl/blob/74e3e09d266f92af8f80737b9b18bf97217203dd/src/eventloop.jl#L8
with
invokelatest(get(handlers, msg.header["msg_type"], default_handler), socket, msg)
where default_handler
does nothing.
We could additionally add support for the https://github.com/jupyter-server/jupyter-resource-usage extension, I guess, similar to how it is handled in ipykernel
: https://github.com/ipython/ipykernel/blob/6bf3fe9e44f1caf4bc371f700ac0c2e9c9c3bd84/ipykernel/kernelbase.py#L996-L1027
Though that would seem to require a Julia equivalent of the Python psutil
package, and I'm not sure that exists?
Don't know how these things work but as a first thing maybe just output it to the Jupyter log instead of the cell stderr? (or ofc your suggestion of do nothing) I don't actually use that extension, although looks like the cluster does comes with it preinstalled so that seems like a good theory its that.
Some more context: we see this on jupyter.nersc.gov -- It's intermittent, and seems to vary over time. Due to this, I thought it might be related to other issues we're having at NERSC. However, based in this new information, I am going to revise my theory:
It's possible that this kernel extension was added/changed recently. It makes sense to have something like this on shared nodes. I therefore suggest that:
Ping'ing @rcthomas
Responding to usage_data requests properly is much more difficult since we don't have the analogue of psutil
, and pulling out the relevant information/code seems to be quite complicated to do cross-platform (https://github.com/giampaolo/psutil/issues/2296).
May I ask whether there will be a patch release soon for solving this KERNEL EXCEPTION
?
The error messages keeps popping out in the jupyter-lab, which is a bit annoying lol.
Is https://github.com/JuliaLang/IJulia.jl/pull/1092 ready to be merged? It would be nice to have a patch release that at least silences these messages. Many thanks!
On some particular cluster's Jupyterlab, I keep geting these messages periodically in random cells: