Skip to content

Report an issue to the bugtracker

Engil edited this page Sep 10, 2021 · 1 revision

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.

Multicore OCaml build version

You can fetch the build version by running ocamlc -version or strings your_binary.exe | grep OCAML_RUNTIME_BUILD_GIT_HASH_IS.

Debug runtime with heap verification on

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 are using dune to build your executable

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"))

Stacktrace

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

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

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 >