-
Notifications
You must be signed in to change notification settings - Fork 410
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
Failure to build with TSan #10553
Failure to build with TSan #10553
Comments
@OlivierNicole and I previously bumped into this one. The problem is that this line dune/otherlibs/stdune/src/wait4_stubs.c Line 63 in d19d928
uses a local variable v_pid without the runtime lock in place, which is against the rules.For integer values, sometimes the rules are bent, but that practice has been overruled by Xavier here: ocaml/ocaml#12737 (comment) |
Thanks for the quick answer @jmid. If I understand correctly, the fix is to move the |
That’s correct. |
Fixes ocaml#10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
Fixes ocaml#10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
There seem to be other similar cases, e.g. dune/src/fswatch_win/fswatch_win_stubs.c Lines 467 to 470 in cd67b01
How does tsan work, will it always warn when such code is executed or is there a random factor? |
There is a luck factor on some programs as TSan remembers only the last 4 memory accesses to every memory location. In addition, the memory location needs to be effectively accessed without synchronization. However, this looks like Windows code, and TSan is not supported on Windows as of today. |
Fixes #10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
Fixes ocaml#10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
Fixes ocaml#10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
Fixes #10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
CHANGES: ### Fixed - Fix interpretation of `exists_if` predicate in `META` files of installed libraries containing more than one element. (ocaml/dune#10564, fixes ocaml/dune#10563, @dbuenzli, @nojb) - Fix TSAN warning in wait4 stubs (ocaml/dune#10554, fixes ocaml/dune#10553, @emillon)
Fixes ocaml#10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
CHANGES: ### Fixed - Fix interpretation of `exists_if` predicate in `META` files of installed libraries containing more than one element. (ocaml/dune#10564, fixes ocaml/dune#10563, @dbuenzli, @nojb) - Fix TSAN warning in wait4 stubs (ocaml/dune#10554, fixes ocaml/dune#10553, @emillon)
Fixes ocaml#10553 Quoting @jmid, using a local variable without the runtime lock in place, is against the rules. For integer values, sometimes the rules are bent, but this is not a good idea. See ocaml/ocaml#12737. Signed-off-by: Etienne Millon <[email protected]>
Using OCaml 5.2 with the TSan option on a Linux/arm64 machine, trying to compile dune.3.15.2 results in the following error:
The text was updated successfully, but these errors were encountered: