[llvm-bugs] [Bug 35464] New: Crash at llvm_gcda_emit_arcs or llvm_gcda_emit_function when running multiple processes
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 29 09:00:54 PST 2017
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: unassignedbugs at nondot.org
Reporter: mcastelluccio at mozilla.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171129/c2c60912/attachment.html>
More information about the llvm-bugs
mailing list