Closed
Bug 1374888
Opened 7 years ago
Closed 7 years ago
Crash in SharedLibraryInfo::GetInfoForSelf
Categories
(Core :: Gecko Profiler, defect)
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox54 | --- | unaffected |
firefox55 | --- | unaffected |
firefox56 | ? | fixed |
People
(Reporter: ting, Assigned: nika)
References
Details
(Keywords: crash, regression)
Crash Data
Attachments
(1 file, 4 obsolete files)
9.33 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
This bug was filed from the Socorro interface and is report bp-fa9750e8-11a2-4f98-9003-f2d640170619. ============================================================= Top #2 of Nightly 20170618030207 on Mac OSX, 8 reports from 8 installations.
Comment 1•7 years ago
|
||
Just ran into this: https://crash-stats.mozilla.com/report/index/ac97bb1b-21ce-4d58-b582-2e72f0170621
Comment 2•7 years ago
|
||
40 crashes on Nightly in the last 7 days, which is many more than other branches. In the half dozen I looked at, this was mostly in mozilla::Telemetry::GetStackAndModules being called by the BHR. Possible regression from bug 1369594, which moved this off the main thread? Georg, do you know who might be able to look at this?
Comment 3•7 years ago
|
||
[Tracking Requested - why for this release]: OSX crash that has gotten a lot worse in 56.
tracking-firefox56:
--- → ?
Updated•7 years ago
|
Flags: needinfo?(michael)
Assignee | ||
Comment 4•7 years ago
|
||
This looks a lot like bug 1373980. Do we have any crashes on revisions after I landed that fix?
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Michael Layzell [:mystor] from comment #4) > This looks a lot like bug 1373980. Do we have any crashes on revisions after > I landed that fix? (I just checked. Yes we do - that didn't fix the problem apparently)
Comment 6•7 years ago
|
||
I think Michael probably has the best context here.
Flags: needinfo?(gfritzsche)
Assignee | ||
Comment 7•7 years ago
|
||
I hope this should help us avoid some of the race problems with dyld unloading or loading libraries while we're trying to read their headers. MozReview-Commit-ID: 5QvrWujquIq
Attachment #8884966 -
Flags: review?(mstange)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → michael
Flags: needinfo?(michael)
Comment 8•7 years ago
|
||
Comment on attachment 8884966 [details] [diff] [review] Maintain a live shared libraries list in gecko on macOS Review of attachment 8884966 [details] [diff] [review]: ----------------------------------------------------------------- This doesn't look bad at all! It basically spells doom for my patch in bug 1362277, but other than that, it seems fine. ::: tools/profiler/core/shared-libraries-macos.cc @@ +41,5 @@ > +{ > + const platform_mach_header* header; > + nsCString path; > +}; > +static nsTArray<NativeSharedLibrary> sSharedLibrariesList; Does nsTArray cause static initializers? @@ +155,4 @@ > SharedLibraryInfo sharedLibraryInfo; > > + for (auto& info : sSharedLibrariesList) { > + addSharedLibrary(info.header, info.path.get(), sharedLibraryInfo); This .get() and the nsDependentCString(·) in addSharedLibrary cancel each other out. Please adjust the parameter type of addSharedLibrary.
Attachment #8884966 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 9•7 years ago
|
||
Updated version which avoids destroying strings in the static destructor by doing some ugly dance with UniquePtrs. MozReview-Commit-ID: 5QvrWujquIq
Assignee | ||
Updated•7 years ago
|
Attachment #8884966 -
Attachment is obsolete: true
Comment 10•7 years ago
|
||
Comment on attachment 8885369 [details] [diff] [review] Maintain a live shared libraries list in gecko on macOS Review of attachment 8885369 [details] [diff] [review]: ----------------------------------------------------------------- ::: tools/profiler/core/shared-libraries-macos.cc @@ +61,5 @@ > + > + StaticMutexAutoLock lock(sSharedLibrariesMutex); > + if (!sSharedLibrariesList.get()) { > + sSharedLibrariesList = MakeUnique<nsTArray<NativeSharedLibrary>>(); > + ClearOnShutdown(&sSharedLibrariesList); I would do the initialization of sSharedLibrariesList in SharedLibraryInfo::Initialize() and then bail out here like you do in RemoveImage, just to cover the (hopefully extremely rare) case where SharedLibraryAddImage is called late during shutdown if ClearOnShutdown has already destroyed sSharedLibrariesList.
Assignee | ||
Comment 11•7 years ago
|
||
MozReview-Commit-ID: 5QvrWujquIq
Assignee | ||
Updated•7 years ago
|
Attachment #8885369 -
Attachment is obsolete: true
Comment 12•7 years ago
|
||
Pushed by michael@thelayzells.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b297e31320fd Maintain a live shared libraries list in gecko on macOS, r=mstange
Comment 13•7 years ago
|
||
Backed out for mass-asserting, e.g. in dom/base/test/test_setInterval_from_start.html: https://hg.mozilla.org/integration/mozilla-inbound/rev/6c50a2e45d303a64d805485a2dc0eab1bef20c5e Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=b297e31320fde94696e2d5ae6d24369fa6b3caed&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=runnable Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=113410882&repo=mozilla-inbound 11:41:13 INFO - GECKO(1910) | [Parent 1910] WARNING: '!aObserver', file /home/worker/workspace/build/src/xpcom/ds/nsObserverService.cpp, line 243 11:41:13 INFO - GECKO(1910) | [NPAPI 1915] WARNING: '!compMgr', file /home/worker/workspace/build/src/xpcom/components/nsComponentManagerUtils.cpp, line 52 11:41:13 INFO - GECKO(1910) | [NPAPI 1915] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /home/worker/workspace/build/src/xpcom/base/nsTraceRefcnt.cpp, line 171 11:41:13 INFO - GECKO(1910) | Assertion failure: 0 == rv, at /home/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:292 11:41:13 INFO - GECKO(1910) | Redirecting call to abort() to mozalloc_abort 11:41:13 INFO - GECKO(1910) | Hit MOZ_CRASH() at /home/worker/workspace/build/src/memory/mozalloc/mozalloc_abort.cpp:33
Flags: needinfo?(michael)
Assignee | ||
Comment 14•7 years ago
|
||
I switched it to using std::vector and std::string so we can dodge the leak checking, as we don't actually care about leaking here. Re-requesting review. MozReview-Commit-ID: 5QvrWujquIq
Attachment #8885804 -
Flags: review?(mstange)
Assignee | ||
Updated•7 years ago
|
Attachment #8885377 -
Attachment is obsolete: true
Comment 15•7 years ago
|
||
Comment on attachment 8885804 [details] [diff] [review] Maintain a live shared libraries list in gecko on macOS Review of attachment 8885804 [details] [diff] [review]: ----------------------------------------------------------------- But we still care about static initializers, don't we? I think we need a hybrid solution with UniquePtr<std::vector<...>>.
Assignee | ||
Comment 16•7 years ago
|
||
I changed it to allocate and leak the allocation. Not sure if this will throw off the leak detectors but I hope not. I don't think we run asan on macos so I think it should be fine? MozReview-Commit-ID: 5QvrWujquIq
Attachment #8885811 -
Flags: review?(mstange)
Assignee | ||
Updated•7 years ago
|
Attachment #8885804 -
Attachment is obsolete: true
Attachment #8885804 -
Flags: review?(mstange)
Comment 17•7 years ago
|
||
Comment on attachment 8885811 [details] [diff] [review] Maintain a live shared libraries list in gecko on macOS Review of attachment 8885811 [details] [diff] [review]: ----------------------------------------------------------------- We can change it if these leaks start throwing our tools off.
Attachment #8885811 -
Flags: review?(mstange) → review+
Comment 18•7 years ago
|
||
(In reply to Michael Layzell [:mystor] from comment #16) > I changed it to allocate and leak the allocation. Not sure if this will > throw off the leak detectors but I hope not. I don't think we run asan on > macos so I think it should be fine? You are right, we don't ASan on MacOS. However, in this case it wouldn't matter, because ASan doesn't treat things reachable from global variables as leaks. Your only concern would be the XPCOM leak checker, but it doesn't look like you are allocating anything the XPCOM leak checker tracks.
Comment 19•7 years ago
|
||
Pushed by michael@thelayzells.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/e4bd519bfbfa Maintain a live shared libraries list in gecko on macOS, r=mstange
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(michael)
Comment 20•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e4bd519bfbfa
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•7 years ago
|
status-firefox54:
--- → unaffected
status-firefox55:
--- → unaffected
status-firefox-esr52:
--- → unaffected
You need to log in
before you can comment on or make changes to this bug.
Description
•