Closed Bug 1061024 Opened 5 years ago Closed 5 years ago

Don't run DMD when about:memory's "Measure" button is pressed

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: njn, Assigned: njn)

References

Details

Attachments

(3 files, 1 obsolete file)

If you click "Measure" in about:memory when DMD is running, it'll trigger a DMD
run, and the output goes to /tmp/dmd--<pid>.txt.gz. This isn't supposed to
happen.
A simple fix.
Attachment #8482028 - Flags: review?(jld)
We need a similar check in ContentParent.cpp.

With this in place, if I click "Measure" in about:memory when DMD is running, I
reliably get this message:

> IPDL protocol error: [PContentChild] Received an invalid file descriptor!

because we end up passing a null-equivalent FileDescriptor over IPDL. I'm not
sure if this is a problem, and if so, how to fix it.
Attachment #8482034 - Flags: review?(jld)
Attachment #8482028 - Attachment is obsolete: true
Attachment #8482028 - Flags: review?(jld)
froydnj, you said you had noticed this behaviour.

It sure would be nice if we had tests for this stuff.
While I'm here, lets remove some dead code and do a couple of other minor
things.
Attachment #8482060 - Flags: review?(jld)
This call is dominated by the call in GetReportsForThisProcess().
Attachment #8482100 - Flags: review?(jld)
Blocks: 1061066
Attachment #8482100 - Flags: review?(jld) → review+
Attachment #8482060 - Flags: review?(jld) → review+
Attachment #8482034 - Flags: review?(jld) → review+
(In reply to Nicholas Nethercote [:njn] from comment #2)
> With this in place, if I click "Measure" in about:memory when DMD is running, I
> reliably get this message:
> 
> > IPDL protocol error: [PContentChild] Received an invalid file descriptor!
> 
> because we end up passing a null-equivalent FileDescriptor over IPDL. I'm not
> sure if this is a problem, and if so, how to fix it.

I'd assumed that FileDescriptor's nullability was an intentional feature from the code (that is, ipc::FileDescriptor itself, not the code generated by the IPDL compiler, which is where the warning lives), but chasing that warning message points to bug 831307, which indicates that that was not the case — it was meant to be a fatal error, but that was relaxed during the FxOS 1.0 release frenzy.  Using an IPDL union instead should be a Simple Matter Of Programming; I'll file a followup bug.


(In reply to Nicholas Nethercote [:njn] from comment #5)
> Created attachment 8482100 [details] [diff] [review]
> (part 3) - Remove a redundant dmd::ClearReports() call
> 
> This call is dominated by the call in GetReportsForThisProcess().

If only verifying that didn't require case-splitting on the emptiness of a string — but I suppose I have mostly myself to blame for that.
You need to log in before you can comment on or make changes to this bug.