-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fractal Dimension creates thousands of zombie threads that crash ImageJ #637
Comments
This issue has been mentioned on Image.sc Forum. There might be relevant details there: |
Anisotropy uses a similar Fractal Dimension may be using a messy approach to thread creation and is not tidying up after itself. |
PR #624 should be applied as well becuase it has a better threading model for |
BoneJ's Fractal Dimension plugin uses an Op to do the box-counting maths. On larger images with many boxes to count, it adopts a multithreading approach, using a standard call to get the number of available processors:
imagej-ops/src/main/java/net/imagej/ops/topology/BoxCount.java
Line 196 in 9dad3f9
Fractal Dimension crashes ImageJ after a few iterations of a batch job.
Only sometimes a stack trace is printed to the console, like this one:
Profiling active threads looks like this:
3000 - 5000 threads are created on each iteration but are not completed or removed or terminated.
Setting
processors = 1
to make it a single-threaded algorithm fixes the bug, but also means that large images are slow to analyse.A safer way to multithread is needed for box counting.
See also:
https://forum.image.sc/t/memory-issues-with-bonej/53589
The text was updated successfully, but these errors were encountered: