spkenv / spk

A Package Manager for high velocity software environments, built on spfs.
https://spkenv.dev
Apache License 2.0
40 stars 6 forks source link

Track and display pids in spfs runtime info #1059

Open dcookspi opened 4 months ago

dcookspi commented 4 months ago

Is your feature request related to a problem? Please describe.

Sometimes we see a lot of stopping runtimes on a host when using spfs runtime list. Particularly on renderfam hosts that launch many subprocesses inside each /spfs runtime.

spfs-monitor is running for those runtimes, but the owner process and original /spfs mounstspawn process are not running (according to spfs runtime list). But some other processes are still running in/using that /spfs mount.

Unless you have root permissions and wade through the /proc/fs looking for the mounts you can't tell what processes are still keeping that /spfs alive.

Describe the solution you'd like Have spfs runtime list, or spfs runtime info, show which pid/s are still using a runtime's /spfs so we can see which processes spfs-monitor and /spfs are waiting on and see what's keeping the mount active.

Additional context This probably involves keeping more pid info in the runtime and having spfs-monitor update it periodically as processes die/start. That needs some discusson and sanity checking.

rydrman commented 2 months ago

From the meeting today: