-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fatal error: debugger does not support channel locks #10517
Description
I originally posted this on Stackoverflow, thinking it a problem with my code or some library incompatibility.
https://stackoverflow.com/questions/68394075/fatal-error-debugger-does-not-support-channel-locks
I had a reply there suggesting it was likely an issue with ocamldebug and macos and I should report it here, so I'll reproduce details below.
Firstly I am on macOS Catalina (10.15.7) on an Intel cpu.
I initially set up my project by:
brew install ocaml opam
opam switch create . ocaml-base-compiler.4.12.0
eval $(opam env)I have added (modes byte exe) to my dune file.
When I run dune build I can see the bytecode file output, alongside the exe, as _build/default/bin/cli.bc
When I pass this to ocamldebug I get the following error:
ocamldebug _build/default/bin/cli.bc
OCaml Debugger version 4.12.0
(ocd) r
Loading program... done.
Fatal error: debugger does not support channel locks
Lost connection with process 33035 (active process)
between time 170000 and time 180000
Restart from time 170000 and try to get closer of the problem ? (y or n)If I choose y the console seems to hang indefinitely.
I found the source of the error here:
Line 144 in f68acd1
| caml_fatal_error("debugger does not support channel locks"); |
/* The code in this file does not bracket channel I/O operations with
Lock and Unlock, so fail if those are not no-ops. */
if (caml_channel_mutex_lock != NULL ||
caml_channel_mutex_unlock != NULL ||
caml_channel_mutex_unlock_exn != NULL)
caml_fatal_error("debugger does not support channel locks");...but I don't know what might be triggering it.
My project is using cmdliner and lwt ...I thought "channel I/O operations" might have something to do with either of those libraries.
But the replier on SO seemed to think it was more likely an OS-level issue with my install of ocamldebug itself.