Closed Bug 843364 Opened 12 years ago Closed 9 years ago

Late write from mozilla_sampler_shutdown

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: espindola, Assigned: BenWa)

Details

Attachments

(1 obsolete file)

We are getting stacks like these in Telemetry: mozilla::ValidWriteAssert(bool) (in XUL) (anonymous namespace)::AbortOnBadWrite(int, void const*, unsigned long) (in XUL) _ZN12_GLOBAL__N_116wrap_writev_tempILZNS_11writev_dataEEEEliPK5ioveci (in XUL) std::__basic_file<char>::xsputn_2(char const*, long, char const*, long) (in libstdc++.6.dylib) std::basic_filebuf<char, std::char_traits<char> >::xsputn(char const*, long) (in libstdc++.6.dylib) std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in libstdc++.6.dylib) HashTableOutput(nsACString_internal const&, PropertyValue*, void*) (in XUL) nsBaseHashtable<nsCStringHashKey, PropertyValue*, PropertyValue*>::s_EnumReadStub(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*) (in XUL) PL_DHashTableEnumerate (in XUL) TemplatePropertyValue<JSCustomObject*>::SendToStream(std::ostream&) (in XUL) TemplatePropertyValue<JSCustomArray*>::SendToStream(std::ostream&) (in XUL) HashTableOutput(nsACString_internal const&, PropertyValue*, void*) (in XUL) nsBaseHashtable<nsCStringHashKey, PropertyValue*, PropertyValue*>::s_EnumReadStub(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*) (in XUL) PL_DHashTableEnumerate (in XUL) TemplatePropertyValue<JSCustomObject*>::SendToStream(std::ostream&) (in XUL) TemplatePropertyValue<JSCustomArray*>::SendToStream(std::ostream&) (in XUL) HashTableOutput(nsACString_internal const&, PropertyValue*, void*) (in XUL) nsBaseHashtable<nsCStringHashKey, PropertyValue*, PropertyValue*>::s_EnumReadStub(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*) (in XUL) PL_DHashTableEnumerate (in XUL) TemplatePropertyValue<JSCustomObject*>::SendToStream(std::ostream&) (in XUL) TemplatePropertyValue<JSCustomArray*>::SendToStream(std::ostream&) (in XUL) HashTableOutput(nsACString_internal const&, PropertyValue*, void*) (in XUL) nsBaseHashtable<nsCStringHashKey, PropertyValue*, PropertyValue*>::s_EnumReadStub(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*) (in XUL) PL_DHashTableEnumerate (in XUL) JSCustomObjectBuilder::Serialize(JSCustomObject*, std::ostream&) (in XUL) mozilla_sampler_shutdown() (in XUL) XREMain::XRE_main(int, char**, nsXREAppData const*) (in XUL) XRE_main (in XUL) main (in firefox)
It looks like the code responding to MOZ_PROFILER_SHUTDOWN. The options I see are * Move it earlier * Mark the fd as debug * Disable write poisoning in mozilla_sampler_shutdown if MOZ_PROFILER_SHUTDOWN is set. It is hard for me to decide since I don't know what is being written.
We will want to mark it as a debug FD and when we exit 0 we will want to run this code before exit(0) as well.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attachment #716267 - Flags: review?(respindola)
Attachment #716267 - Attachment is obsolete: true
Attachment #716267 - Flags: review?(respindola)
(In reply to Benoit Girard (:BenWa) from comment #2) > We will want to mark it as a debug FD and when we exit 0 we will want to run > this code before exit(0) as well. Remember that when exit(0) will be called is a runtime setup. So for example: MOZ_SHUTDOWN_CHECKS=nothing firefox # will call exit(0) early. MOZ_SHUTDOWN_CHECKS=debug firefox # will not call exit Should they do these writes at different times? If so you do need to mark it as debug fd, but if the objective is to be able to profile "normal" firefox runs the write should always go before the place where we call exit(0), no?
Sadly we're not working on exit(0) anymore :(
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: