Pluto "Process Exited" due to segmentation fault on macos

Everytime I restart the same notebook I got “Process Exited - Restart”.
In the log I found

From worker 2: signal (11): Segmentation fault: 11

Worker 2 terminated.

Unhandled Task ERROR: EOFError: read end of file

This seems to happens on cells where I plot something (using plot jl and stats plots).
I have to comment all the cells, kill pluto and julia, start julia again, execute Pluto.run() and then execute the cells one by one to make it works.

But this make julia unusable on my macos.
I’m using macOS Monterey on M1 Chip and 1.7.1

You’re probably hitting similar problems as I reported last November ( Pluto intermittently needs to be restarted on Julia-1.7-RC3 (arm version, MacOS Monterey 16" M1) when attempting to plot. · Discussion #1686 · fonsp/Pluto.jl · GitHub ).

I now only use it with JULIA_NUM_THREADS<=4 and occasionally it wants a restart, typically less and less after a few restarts. Not ideal, but for now I can live with it. Still, running such a notebook in the REPL always works, so it is likely a Pluto issue.

1 Like

Thank you so much!
Tried with JULIA_NUM_THREADS=4 but it didn’t work. Then tried with JULIA_NUM_THREADS=3 and seems to work.

Have you also found that the notebooks always seem fine in the REPL?

Yes, with REPL it seems working fine.
I noticed that by default Threads.nthreads() return 1. I didn’t expect that.