https://bugs.llvm.org/show_bug.cgi?id=35464
Bug ID: 35464
Summary: Crash at llvm_gcda_emit_arcs or
llvm_gcda_emit_function when running multiple
processes
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: compiler-rt
Assignee: unassignedb...@nondot.org
Reporter: mcastelluc...@mozilla.com
CC: llvm-bugs@lists.llvm.org
There's still something that causes inconsistencies when multiple processes are
writing the same gcda files.
I have noticed these crashes, intermittently, in Firefox xpcshell and jittest
suites, which are running several instances of Firefox in parallel.
The crash usually occurs either in llvm_gcda_emit_arcs or in
llvm_gcda_emit_function, when a process opens a file that has already been
written by another. It never happens when the file is new.
I have a patch that seems to fix this problem. The fix is to flush the file
buffers before unlocking the file. Currently, the flush is done with fclose
after the file is unlocked. So, between the unlocking and the flushing, there
might be other processes opening the file and mapping it in memory when it
hasn't been completely written yet. So, the process ends up writing outside the
mapped memory and crashes.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs