Multicore busy loop #25

Closed jonmsterling.com
Closed opened by jonmsterling.com
assigned to kento.tngl.sh

Currently when I try to build my forest using the latest commit (b3ea2c4a), it gets stuck after rendering 50 trees and uses OCaml 5's lovely multicore facilities to consume all of my CPU while doing nothing. I'd like to be able to give a more detailed report, but I don't get any more details with forester build --verbose either...

You can increase verbosity by passing -vvv. Is your forest public? That will help with debugging.

No, this is my personal forest unfortunately.

The last lines I get with -vvv are

[http://localhost/] [forester.compiler] [DEBUG] planting resource http://localhost/2025-10-03-note/
[http://localhost/] [forester.compiler] [DEBUG] planting resource http://localhost/ocl-0023/
[http://localhost/] [forester.compiler] [DEBUG] planting resource http://localhost/ocl-001O/
[http://localhost/] [forester.frontend] [DEBUG] copying contents of directory /home/o/.forester/6.0-b3ea2c4a/share/forester/themes/default to ./output/.

Which OS are you on?

Does the build progress when you run forester build --no-theme?

Scratch that, it has nothing to do with the theme, it's a concurrency safety issue.

@jonmsterling.com Would you be open to vendor datalog? I have found that protecting the calls to datalog from the outside with a mutex comes with quite a severe performance penalty. I can try to eventually upstream the changes, but for now vendoring would be the best option to fix these issues. We would only need to vendor the top-down implementation.

We can vendor.

(Update: Kento has now merged that onto the 'performance' branch, which is what you should try now.)

I am going to close this ticket as Kento has re-architected the likely suspects for a deadlock, and we have not had any further confirmation of the issue. But please feel free to comment here if a deadlock is observed.

Sign up or Sign in to add to the discussion.