-
Notifications
You must be signed in to change notification settings - Fork 68
Report an issue to the bugtracker
Thank you very much for taking interest into improving Multicore OCaml!
Before reporting an issue, it would be preferable if you could take time and run through the following steps, to allow us to troubleshoot more efficiently the problem you are facing.
When creating a new issue, you will be faced with a template, in which you can fill the result of the following steps, when possible.
You can fetch the build version by running ocamlc -version
or strings your_binary.exe | grep OCAML_RUNTIME_BUILD_GIT_HASH_IS
.
One useful thing when facing a problem with Multicore OCaml, is to run your program with the debug runtime and heap verification mode.
This can help you catch heap corruption issues, and trigger assertions in the runtime's code.
This can be done by linking your testcase against the debug runtime using the -runtime-variant=d
parameter to ocamlopt
Once your build is ready, you can start your program as follow to enable heap verification:
OCAMLRUNPARAM=v=0,V=1 ./a.out
If you do not invoke the OCaml compiler yourself, but use dune
to build your executable, you can link your program against the debug runtime like this:
(executable
(name file)
(modules file)
(flags "-runtime-variant=d"))
It would be useful as well to obtain a stacktrace using tools like gdb
or rr
in order for us to identify where the crash happens.
gdb a.out
(gdb) run # run the program until it crashes
(gdb) t a a bt # once at the crashsite, get the backtrace for all running threads
< stacktrace to copy >
rr record -c 12500 -h ./a.out # record the program's execution
rr replay # play the latest generated profile
(rr) continue # run the profile until crash
(rr) t a a bt # get a backtrace for all running threads
< backtrace to copy >