TSan: data race js/src/gc/Tracer.cpp:69 DoCallback<Value>

NEW
Unassigned

Status

()

Core
JavaScript: GC
2 years ago
6 months ago

People

(Reporter: froydnj, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [tsan])

Attachments

(1 attachment)

The attached logfile shows a thread/data race detected by TSan (ThreadSanitizer).

* Specific information about this bug

This race is uninteresting insofar as TSan only gave a one-sided stack for it.  It would be super-interesting to know where the read is happening for this race; presumably it's happening in jitcode...or someplace else where TSan happened to be unlucky in figuring out what's going on.

Terrence, is it possible to figure out what's going on from just this stack?  I will keep my eyes open on further TSan runs for the other side.

* General information about TSan, data races, etc.

Typically, races reported by TSan are not false positives, but it is possible that the race is benign. Even in this case though, we should try to come up with a fix unless this would cause unacceptable performance issues. Also note that seemingly benign races can possibly be harmful (also depending on the compiler and the architecture) [1][2].

If the bug cannot be fixed, then this bug should be used to either make a compile-time annotation for blacklisting or add an entry to the runtime blacklist.

[1] http://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong
[2] _How to miscompile programs with "benign" data races_: https://www.usenix.org/legacy/events/hotpar11/tech/final_files/Boehm.pdf
Flags: needinfo?(terrence)
You didn't attach a log.
Flags: needinfo?(nfroyd)
Created attachment 8643398 [details]
TSan stack trace

I guess a stack trace *would* be helpful.
Flags: needinfo?(nfroyd)
Another CGC race.
Flags: needinfo?(terrence) → needinfo?(jcoppeard)
(In reply to Nathan Froyd [:froydnj][:nfroyd] from comment #0)
> It would be super-interesting to know where the read is happening for
> this race; presumably it's happening in jitcode...or someplace else where
> TSan happened to be unlucky in figuring out what's going on.

It's happening on a helper thread so it's probably another instance of updating pointers after compacting GC.  It would be really useful to see the stack though.
(In reply to Jon Coppeard (:jonco) from comment #4)
> (In reply to Nathan Froyd [:froydnj][:nfroyd] from comment #0)
> > It would be super-interesting to know where the read is happening for
> > this race; presumably it's happening in jitcode...or someplace else where
> > TSan happened to be unlucky in figuring out what's going on.
> 
> It's happening on a helper thread so it's probably another instance of
> updating pointers after compacting GC.  It would be really useful to see the
> stack though.

I don't see how this could race with JITed code. All non-compacting threads should be quiescent at this point. Nathan, could you keep an eye out for a stack for this?
Flags: needinfo?(nfroyd)
(In reply to Terrence Cole [:terrence] from comment #5)
> I don't see how this could race with JITed code. All non-compacting threads
> should be quiescent at this point. Nathan, could you keep an eye out for a
> stack for this?

You bet.
Flags: needinfo?(nfroyd)
Blocks: 1367103
Flags: needinfo?(jcoppeard)
You need to log in before you can comment on or make changes to this bug.