CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
56 stars 67 forks source link

CellProfiler crash upon RunCellPose on CPU #162

Closed julieaaj closed 1 year ago

julieaaj commented 1 year ago

Hi!

I have been trying to run CellProfiler from source to be able to use the RunCellPose plugin. Previously, I have been able to both run CellProfiler (regular program) and CellPose (GUI from Python) from my computer using CPU only. However, when I tried to run the CellPose plugin with my own pretrained model in CellProfiler from source, CellProfiler crashed everytime I tried to choose the input image in the module.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000010809010a, pid=77585, tid=63519
#
# JRE version: OpenJDK Runtime Environment JBR-11.0.13.7-1751.21-jcef (11.0.13+7) (build 11.0.13+7-b1751.21)
# Java VM: OpenJDK 64-Bit Server VM JBR-11.0.13.7-1751.21-jcef (11.0.13+7-b1751.21, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C  [libiomp5.dylib+0xf510a]  __kmp_suspend_initialize_thread+0x1a
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/julieaarmojohannessen/Downloads/CellProfiler-plugins-master/Instructions/hs_err_pid77585.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp

I then tried to test some of the built-in models (cyto2), and then I was actually able to start a test run of the module. However, after downloading the cyto2 model it also crashed without finishing the segmentation, as shown here:

Downloading: "https://www.cellpose.org/models/cyto2torch_1" to /Users/julieaarmojohannessen/.cellpose/models/cyto2torch_1

100%|████████████████████████████████████████████████████████| 25.3M/25.3M [01:58<00:00, 224kB/s]
Downloading: "https://www.cellpose.org/models/cyto2torch_2" to /Users/julieaarmojohannessen/.cellpose/models/cyto2torch_2

100%|████████████████████████████████████████████████████████| 25.3M/25.3M [01:18<00:00, 339kB/s]
Downloading: "https://www.cellpose.org/models/cyto2torch_3" to /Users/julieaarmojohannessen/.cellpose/models/cyto2torch_3

100%|████████████████████████████████████████████████████████| 25.3M/25.3M [00:49<00:00, 541kB/s]
Downloading: "https://www.cellpose.org/models/size_cyto2torch_0.npy" to /Users/julieaarmojohannessen/.cellpose/models/size_cyto2torch_0.npy

100%|████████████████████████████████████████████████████████| 3.54k/3.54k [00:00<00:00, 5.50MB/s]
cellprob_threshold and dist_threshold are being deprecated in a future release, use mask_threshold instead
--- FINDING MASKS --- 
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000010ecda10a, pid=77744, tid=133167
#
# JRE version: OpenJDK Runtime Environment JBR-11.0.13.7-1751.21-jcef (11.0.13+7) (build 11.0.13+7-b1751.21)
# Java VM: OpenJDK 64-Bit Server VM JBR-11.0.13.7-1751.21-jcef (11.0.13+7-b1751.21, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C  [libiomp5.dylib+0xf510a]  __kmp_suspend_initialize_thread+0x1a
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/julieaarmojohannessen/Downloads/CellProfiler-plugins-master/Instructions/hs_err_pid77744.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
/opt/anaconda3/envs/CellProfiler_plugins/bin/pythonw: line 3: 77744 Abort trap: 6           /opt/anaconda3/envs/CellProfiler_plugins/python.app/Contents/MacOS/python "$@"
/opt/anaconda3/envs/CellProfiler_plugins/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Crash log from when I tried to load my own model: hs_err_pid77455.log

Crash log from when I tried to run cyto2: hs_err_pid77744.log

I have already tried to reduce number of worker threads in CP to 1, without success. I am planning on moving to another computer with GPU for the actual analysis run, but it would be nice to optimize and test the pipeline on my own computer first, so any help on this would be greatly appreciated.

Thanks, Julie

fefossa commented 1 year ago

Hi @julieaaj, So sorry about the delay. We updated the RunCellpose plugin and the instructions to use the plugins. If you still have this issue, could you use our new instructions with the more recent version of RunCellpose? Please find the instructions here. Let us know about any new issues!