kylebarron / stata_kernel

A Jupyter kernel for Stata. Works with Windows, macOS, and Linux.
https://kylebarron.dev/stata_kernel/
GNU General Public License v3.0
262 stars 55 forks source link

Kernel does not recover after stata process is killed #410

Open matuskosut opened 2 years ago

matuskosut commented 2 years ago

Problem description

Kernel does not recover after stata process is killed.

Running stata_kernel in jupyter invokes this process, that I suppose is control process:

python -m stata_kernel -f ~/.local/jupyter/kernel-52386dec-3b41-429d-badc-548772e60645.json

This process should then invoke stata (stata-mp):

/usr/bin/stata16/stata-mp

which I suppose executes stata code from the notebook cells.

There are cases when stata-mp process gets killed (e.g. OOM killer - running out of memore). Control process does not seem to notice this, there are no error logs reported to user side (e.g. error logs below the cell). The cell appears to be executing ([*]), but it never reports back. Control process does not attempt to start a new stata-mp process either.

Debugging log

no information regarding kill event logged

Expected Output

Expecting error log or notification, or any kind of information about stata-mp process being killed (not present anymore).

Other information

If you didn't attach the debugging log, please provide: