Closed
Bug 846368
Opened 12 years ago
Closed 12 years ago
Add number of bytes requested to OOM last-gasp
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: abr, Assigned: abr)
References
Details
Attachments
(1 file, 3 obsolete files)
1.75 KB,
patch
|
Details | Diff | Splinter Review |
Currently, when memory allocation fails, the only diagnostic printed to the log messages is a simple "out of memory" string. It would be useful in distinguishing from a true out-of-memory situation and a request for an unrealistically large block of memory if the message included the size of the requested allocation.
Assignee | ||
Comment 1•12 years ago
|
||
This patch uses a preallocated buffer and primitive operations to maximize the chance of success under potentially unstable conditions, as might exist in true out-of-memory situations.
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 719534 [details] [diff] [review] Add number of bytes requested to OOM last-gasp Benjamin: I'm just taking a guess that you're the right person to look at this patch. If it needs additional or different eyes, please let me know.
Attachment #719534 -
Flags: review?(benjamin)
Comment 3•12 years ago
|
||
Which message are we talking about? The one printed in crash-stats, or something on the console?
Flags: needinfo?(adam)
Assignee | ||
Comment 4•12 years ago
|
||
On the console. This might be clearer if I give an example. Look at this tbpl log: https://tbpl.mozilla.org/php/getParsedLog.php?id=20159969&tree=Mozilla-Inbound#error1 In cases like this, I'd like the line "15:29:23 INFO - out of memory" to provide more useful diagnostics. BTW, reading through the log for Bug 811483, I note that this really needs to be thread-safe. I was hoping to avoid pushing another 60 bytes or so onto the stack in what could be a delicate operating state, but any other solution would be even more disruptive. I'm about to update the patch to put the message buffer on the stack to handle potential threading issues.
Flags: needinfo?(adam)
Assignee | ||
Comment 5•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #719534 -
Attachment is obsolete: true
Attachment #719534 -
Flags: review?(benjamin)
Assignee | ||
Updated•12 years ago
|
Attachment #719550 -
Flags: review?(benjamin)
Comment 6•12 years ago
|
||
Comment on attachment 719550 [details] [diff] [review] Add number of bytes requested to OOM last-gasp ok, that makes sense. I'm pretty sure that this will not affect the abort message in crash stats (which is desired, because signatures might change). Have you any interest in taking bug 811483?
Attachment #719550 -
Flags: review?(benjamin) → review+
Comment 7•12 years ago
|
||
Actually... this is printing in decimal. Perhaps it would make more sense to print in hex?
Assignee | ||
Comment 8•12 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #6) > Have you any interest in taking bug 811483? Under other circumstances, I'd say yes -- but right now, we're in a pretty frantic push to get the WebRTC stuff stable and finished.
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #7) > Actually... this is printing in decimal. Perhaps it would make more sense to > print in hex? Sure, that would be easy enough. I'll respin the patch.
Assignee | ||
Comment 10•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #719550 -
Attachment is obsolete: true
Assignee | ||
Comment 11•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #719558 -
Attachment is obsolete: true
Assignee | ||
Comment 12•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0644287fbbdc
Comment 13•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0644287fbbdc
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•