Closed Bug 1652125 Opened 4 years ago Closed 4 years ago

Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/js/src/gc/Cell.h:573:21 in headerLengthField

Categories

(Core :: JavaScript Engine, defect, P5)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure)

Filed by: csabou [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=309357084&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/QbMJGf9-SYmWgJRracWRPQ/runs/0/artifacts/public/logs/live_backing.log


[task 2020-07-10T18:09:58.633Z] 18:09:58 INFO - GECKO(3161) | WARNING: ThreadSanitizer: data race (pid=3161)
[task 2020-07-10T18:09:58.633Z] 18:09:58 INFO - GECKO(3161) | Read of size 8 at 0x005c640dcc00 by thread T11:
[task 2020-07-10T18:09:58.635Z] 18:09:58 INFO - GECKO(3161) | #0 headerLengthField /builds/worker/checkouts/gecko/js/src/gc/Cell.h:573:21 (libxul.so+0x69b185b)
[task 2020-07-10T18:09:58.635Z] 18:09:58 INFO - GECKO(3161) | #1 length /builds/worker/checkouts/gecko/js/src/vm/StringType.h:176:34 (libxul.so+0x69b185b)
[task 2020-07-10T18:09:58.637Z] 18:09:58 INFO - GECKO(3161) | #2 IdIsIndex /builds/worker/checkouts/gecko/js/src/builtin/Array.h:40:13 (libxul.so+0x69b185b)
[task 2020-07-10T18:09:58.637Z] 18:09:58 INFO - GECKO(3161) | #3 GetBaseShapeForNewShape /builds/worker/checkouts/gecko/js/src/vm/Shape.cpp:563:18 (libxul.so+0x69b185b)
[task 2020-07-10T18:09:58.637Z] 18:09:58 INFO - GECKO(3161) | #4 js::NativeObject::addDataPropertyInternal(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::PropertyKey>, unsigned int, unsigned int, js::ShapeTable*, js::ShapeTable::Entry*, js::AutoKeepShapeCaches const&) /builds/worker/checkouts/gecko/js/src/vm/Shape.cpp:725:41 (libxul.so+0x69b185b)
[task 2020-07-10T18:09:58.638Z] 18:09:58 INFO - GECKO(3161) | #5 addDataProperty /builds/worker/checkouts/gecko/js/src/vm/Shape-inl.h:437:10 (libxul.so+0x691dc23)
[task 2020-07-10T18:09:58.639Z] 18:09:58 INFO - GECKO(3161) | #6 AddOrChangeProperty<IsAddOrChange::Add> /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:1450:15 (libxul.so+0x691dc23)
[task 2020-07-10T18:09:58.640Z] 18:09:58 INFO - GECKO(3161) | #7 js::NativeDefineProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::PropertyKey>, JS::Handle<JS::PropertyDescriptor>, JS::ObjectOpResult&) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:1761:10 (libxul.so+0x691dc23)
[task 2020-07-10T18:09:58.640Z] 18:09:58 INFO - GECKO(3161) | #8 NativeDefineDataProperty /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:1919:10 (libxul.so+0x69359ed)
[task 2020-07-10T18:09:58.640Z] 18:09:58 INFO - GECKO(3161) | #9 NativeDefineDataProperty /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:1976:8 (libxul.so+0x69359ed)
[task 2020-07-10T18:09:58.641Z] 18:09:58 INFO - GECKO(3161) | #10 AddPlainObjectProperties(JSContext*, JS::Handle<js::PlainObject*>, js::IdValuePair*, unsigned long) /builds/worker/checkouts/gecko/js/src/vm/ObjectGroup.cpp:1112:10 (libxul.so+0x69359ed)
[task 2020-07-10T18:09:58.641Z] 18:09:58 INFO - GECKO(3161) | #11 js::NewPlainObjectWithProperties(JSContext*, js::IdValuePair*, unsigned long, js::NewObjectKind) /builds/worker/checkouts/gecko/js/src/vm/ObjectGroup.cpp:1127:16 (libxul.so+0x6935808)
[task 2020-07-10T18:09:58.641Z] 18:09:58 INFO - GECKO(3161) | #12 InterpretObjLiteralObj /builds/worker/checkouts/gecko/js/src/frontend/ObjLiteral.cpp:82:10 (libxul.so+0x6d148e3)
[task 2020-07-10T18:09:58.642Z] 18:09:58 INFO - GECKO(3161) | #13 js::InterpretObjLiteral(JSContext*, mozilla::Vector<JSAtom*, 4ul, js::TempAllocPolicy> const&, mozilla::Span<unsigned char const, 18446744073709551615ul>, mozilla::EnumSet<js::ObjLiteralFlag, unsigned char>) /builds/worker/checkouts/gecko/js/src/frontend/ObjLiteral.cpp:122:16 (libxul.so+0x6d148e3)
[task 2020-07-10T18:09:58.642Z] 18:09:58 INFO - GECKO(3161) | #14 InterpretObjLiteral /builds/worker/checkouts/gecko/js/src/frontend/ObjLiteral.h:548:10 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.643Z] 18:09:58 INFO - GECKO(3161) | #15 create /builds/worker/checkouts/gecko/js/src/frontend/BytecodeSection.cpp:163:10 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.644Z] 18:09:58 INFO - GECKO(3161) | #16 operator() /builds/worker/checkouts/gecko/js/src/frontend/BytecodeSection.cpp:88:28 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.645Z] 18:09:58 INFO - GECKO(3161) | #17 match<Matcher &, const mozilla::Variant<JSAtom , js::frontend::NullScriptThing, js::frontend::TypedIndex<js::frontend::BigIntCreationData>, js::ObjLiteralCreationData, js::frontend::TypedIndex<js::frontend::RegExpCreationData>, js::frontend::TypedIndex<js::Scope>, js::frontend::FunctionIndex, js::frontend::EmptyGlobalScopeType> > /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:257:16 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.646Z] 18:09:58 INFO - GECKO(3161) | #18 match<Matcher &, const mozilla::Variant<JSAtom , js::frontend::NullScriptThing, js::frontend::TypedIndex<js::frontend::BigIntCreationData>, js::ObjLiteralCreationData, js::frontend::TypedIndex<js::frontend::RegExpCreationData>, js::frontend::TypedIndex<js::Scope>, js::frontend::FunctionIndex, js::frontend::EmptyGlobalScopeType> > /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:269:14 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.646Z] 18:09:58 INFO - GECKO(3161) | #19 match<Matcher &, const mozilla::Variant<JSAtom , js::frontend::NullScriptThing, js::frontend::TypedIndex<js::frontend::BigIntCreationData>, js::ObjLiteralCreationData, js::frontend::TypedIndex<js::frontend::RegExpCreationData>, js::frontend::TypedIndex<js::Scope>, js::frontend::FunctionIndex, js::frontend::EmptyGlobalScopeType> > /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:269:14 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.646Z] 18:09:58 INFO - GECKO(3161) | #20 match<Matcher &, const mozilla::Variant<JSAtom , js::frontend::NullScriptThing, js::frontend::TypedIndex<js::frontend::BigIntCreationData>, js::ObjLiteralCreationData, js::frontend::TypedIndex<js::frontend::RegExpCreationData>, js::frontend::TypedIndex<js::Scope>, js::frontend::FunctionIndex, js::frontend::EmptyGlobalScopeType> > /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:269:14 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.647Z] 18:09:58 INFO - GECKO(3161) | #21 match<Matcher &> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:772:12 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.647Z] 18:09:58 INFO - GECKO(3161) | #22 js::frontend::EmitScriptThingsVector(JSContext
, js::frontend::CompilationInfo&, mozilla::Vector<mozilla::Variant<JSAtom
, js::frontend::NullScriptThing, js::frontend::TypedIndex<js::frontend::BigIntCreationData>, js::ObjLiteralCreationData, js::frontend::TypedIndex<js::frontend::RegExpCreationData>, js::frontend::TypedIndex<js::Scope>, js::frontend::FunctionIndex, js::frontend::EmptyGlobalScopeType>, 0ul, js::TempAllocPolicy> const&, mozilla::Span<JS::GCCellPtr, 18446744073709551615ul>) /builds/worker/checkouts/gecko/js/src/frontend/BytecodeSection.cpp:116:21 (libxul.so+0x6cf6397)
[task 2020-07-10T18:09:58.649Z] 18:09:58 INFO - GECKO(3161) | #23 InitFromStencil /builds/worker/checkouts/gecko/js/src/vm/JSScript.cpp:3550:10 (libxul.so+0x68eeea3)
[task 2020-07-10T18:09:58.649Z] 18:09:58 INFO - GECKO(3161) | #24 JSScript::fullyInitFromStencil(JSContext
, js::frontend::CompilationInfo&, JS::Handle<JSScript
>, js::frontend::ScriptStencil&, JS::Handle<JSFunction*>) /builds/worker/checkouts/gecko/js/src/vm/JSScript.cpp:3695:8 (libxul.so+0x68eeea3)
[task 2020-07-10T18:09:58.650Z] 18:09:58 INFO - GECKO(3161) | #25 JSScript::fromStencil(JSContext*, js::frontend::CompilationInfo&, js::frontend::ScriptStencil&, JS::Handle<JSFunction*>) /builds/worker/checkouts/gecko/js/src/vm/JSScript.cpp:3759:8 (libxul.so+0x68ef4ad)
[task 2020-07-10T18:09:58.650Z] 18:09:58 INFO - GECKO(3161) | #26 InstantiateScriptStencils /builds/worker/checkouts/gecko/js/src/frontend/Stencil.cpp:410:15 (libxul.so+0x6d2586d)
[task 2020-07-10T18:09:58.651Z] 18:09:58 INFO - GECKO(3161) | #27 js::frontend::CompilationInfo::instantiateStencils() /builds/worker/checkouts/gecko/js/src/frontend/Stencil.cpp:541:8 (libxul.so+0x6d2586d)
[task 2020-07-10T18:09:58.651Z] 18:09:58 INFO - GECKO(3161) | #28 js::frontend::ScriptCompiler<char16_t>::compileScript(js::frontend::CompilationInfo&, js::frontend::SharedContext*) /builds/worker/checkouts/gecko/js/src/frontend/BytecodeCompiler.cpp:493:26 (libxul.so+0x6cf94dc)
[task 2020-07-10T18:09:58.651Z] 18:09:58 INFO - GECKO(3161) | #29 CreateGlobalScript<char16_t> /builds/worker/checkouts/gecko/js/src/frontend/BytecodeCompiler.cpp:186:17 (libxul.so+0x6ccf40d)
[task 2020-07-10T18:09:58.653Z] 18:09:58 INFO - GECKO(3161) | #30 js::frontend::CompileGlobalScript(js::frontend::CompilationInfo&, js::frontend::GlobalSharedContext&, JS::SourceText<char16_t>&) /builds/worker/checkouts/gecko/js/src/frontend/BytecodeCompiler.cpp:201:10 (libxul.so+0x6ccf40d)
[task 2020-07-10T18:09:58.654Z] 18:09:58 INFO - GECKO(3161) | #31 ScriptParseTask<char16_t>::parse(JSContext*) /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:625:7 (libxul.so+0x6808ec5)
[task 2020-07-10T18:09:58.656Z] 18:09:58 INFO - GECKO(3161) | #32 js::ParseTask::runTask() /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:577:3 (libxul.so+0x67f8fce)
[task 2020-07-10T18:09:58.658Z] 18:09:58 INFO - GECKO(3161) | #33 js::ParseTask::runTaskLocked(js::AutoLockHelperThreadState&) /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:545:5 (libxul.so+0x67f8c52)
[task 2020-07-10T18:09:58.659Z] 18:09:58 INFO - GECKO(3161) | #34 js::HelperThread::handleParseWorkload(js::AutoLockHelperThreadState&) /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:2176:9 (libxul.so+0x680140d)
[task 2020-07-10T18:09:58.660Z] 18:09:58 INFO - GECKO(3161) | #35 js::HelperThread::threadLoop() /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:2446:5 (libxul.so+0x68004b7)
[task 2020-07-10T18:09:58.661Z] 18:09:58 INFO - GECKO(3161) | #36 js::HelperThread::ThreadMain(void*) /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:2023:11 (libxul.so+0x67fc80d)
[task 2020-07-10T18:09:58.663Z] 18:09:58 INFO - GECKO(3161) | #37 callMain<0> /builds/worker/checkouts/gecko/js/src/threading/Thread.h:217:5 (libxul.so+0x68098a0)
[task 2020-07-10T18:09:58.663Z] 18:09:58 INFO - GECKO(3161) | #38 js::detail::ThreadTrampoline<void (&)(void*), js::HelperThread*>::Start(void*) /builds/worker/checkouts/gecko/js/src/threading/Thread.h:206:11 (libxul.so+0x68098a0)
[task 2020-07-10T18:09:58.663Z] 18:09:58 INFO - GECKO(3161) | Previous write of size 8 at 0x005c640dcc00 by main thread:
[task 2020-07-10T18:09:58.665Z] 18:09:58 INFO - GECKO(3161) | [failed to restore the stack]
[task 2020-07-10T18:09:58.665Z] 18:09:58 INFO - GECKO(3161) | Thread T11 'JS Helper' (tid=3179, running) created by main thread at:
[task 2020-07-10T18:09:58.665Z] 18:09:58 INFO - GECKO(3161) | #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x584eb)
[task 2020-07-10T18:09:58.665Z] 18:09:58 INFO - GECKO(3161) | #1 js::Thread::create(void* ()(void), void*) /builds/worker/checkouts/gecko/js/src/threading/posix/PosixThread.cpp:52:7 (libxul.so+0x6764c61)
[task 2020-07-10T18:09:58.666Z] 18:09:58 INFO - GECKO(3161) | #2 bool js::Thread::init<void (&)(void*), js::HelperThread*>(void (&)(void*), js::HelperThread*&&) /builds/worker/checkouts/gecko/js/src/threading/Thread.h:90:12 (libxul.so+0x67fc722)
[task 2020-07-10T18:09:58.667Z] 18:09:58 INFO - GECKO(3161) | #3 js::GlobalHelperThreadState::ensureInitialized() /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:1132:27 (libxul.so+0x67f75fa)
[task 2020-07-10T18:09:58.668Z] 18:09:58 INFO - GECKO(3161) | #4 js::EnsureHelperThreadsInitialized() /builds/worker/checkouts/gecko/js/src/vm/HelperThreads.cpp:94:30 (libxul.so+0x67f7242)
[task 2020-07-10T18:09:58.668Z] 18:09:58 INFO - GECKO(3161) | #5 JSRuntime::init(JSContext*, unsigned int) /builds/worker/checkouts/gecko/js/src/vm/Runtime.cpp:200:32 (libxul.so+0x6962ab2)
[task 2020-07-10T18:09:58.668Z] 18:09:58 INFO - GECKO(3161) | #6 js::NewContext(unsigned int, JSRuntime*) /builds/worker/checkouts/gecko/js/src/vm/JSContext.cpp:182:17 (libxul.so+0x689adff)
[task 2020-07-10T18:09:58.669Z] 18:09:58 INFO - GECKO(3161) | #7 JS_NewContext(unsigned int, JSRuntime*) /builds/worker/checkouts/gecko/js/src/jsapi.cpp:394:10 (libxul.so+0x66f4374)
[task 2020-07-10T18:09:58.669Z] 18:09:58 INFO - GECKO(3161) | #8 mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int) /builds/worker/checkouts/gecko/xpcom/base/CycleCollectedJSContext.cpp:123:16 (libxul.so+0xa2642b)
[task 2020-07-10T18:09:58.669Z] 18:09:58 INFO - GECKO(3161) | #9 XPCJSContext::Initialize() /builds/worker/checkouts/gecko/js/xpconnect/src/XPCJSContext.cpp:1136:32 (libxul.so+0x195646a)
[task 2020-07-10T18:09:58.670Z] 18:09:58 INFO - GECKO(3161) | #10 XPCJSContext::NewXPCJSContext() /builds/worker/checkouts/gecko/js/xpconnect/src/XPCJSContext.cpp:1332:23 (libxul.so+0x1957047)
[task 2020-07-10T18:09:58.671Z] 18:09:58 INFO - GECKO(3161) | #11 InitJSContext /builds/worker/checkouts/gecko/js/xpconnect/src/nsXPConnect.cpp:80:25 (libxul.so+0x1992b33)
[task 2020-07-10T18:09:58.671Z] 18:09:58 INFO - GECKO(3161) | #12 xpc::InitializeJSContext() /builds/worker/checkouts/gecko/js/xpconnect/src/nsXPConnect.cpp:95:35 (libxul.so+0x1992b33)
[task 2020-07-10T18:09:58.671Z] 18:09:58 INFO - GECKO(3161) | #13 XREMain::XRE_mainRun() /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4491:5 (libxul.so+0x650cc6f)
[task 2020-07-10T18:09:58.672Z] 18:09:58 INFO - GECKO(3161) | #14 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4868:8 (libxul.so+0x650df0f)
[task 2020-07-10T18:09:58.673Z] 18:09:58 INFO - GECKO(3161) | #15 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4922:21 (libxul.so+0x650e274)
[task 2020-07-10T18:09:58.673Z] 18:09:58 INFO - GECKO(3161) | #16 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x6518eb2)
[task 2020-07-10T18:09:58.673Z] 18:09:58 INFO - GECKO(3161) | #17 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xca443)
[task 2020-07-10T18:09:58.673Z] 18:09:58 INFO - GECKO(3161) | #18 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xca443)
[task 2020-07-10T18:09:58.673Z] 18:09:58 INFO - GECKO(3161) | SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/js/src/gc/Cell.h:573:21 in headerLengthField
[task 2020-07-10T18:09:58.673Z] 18:09:58 INFO - GECKO(3161) | ==================
[task 2020-07-10T18:09:58.688Z] 18:09:58 INFO - GECKO(3161) | Exiting due to channel error.

Looks like a race reading an atom's length under InstantiateScriptStencils. The main thread stack is not shown. It's possible that this is the same race fixed by bug 1651723.

Component: JavaScript: GC → JavaScript Engine
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.