Closed Bug 1565033 Opened 6 years ago Closed 8 months ago

Add memory checking to the out-of-process crash generator

Categories

(Toolkit :: Crash Reporting, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: gsvelto, Assigned: btsoi)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

A significant number of crashes we receive are caused by faulty hardware with broken memory being a common cause of heap corruption. If we could add a simple form of user-space memory testing (à la memtester) to the exception handler we might be able to identify faulty machines and flag crash reports accordingly, inform the user or both.

This bug is meant to track the implementation of the checking itself.

Blocks: 1256224

I'm changing the title to reflect the fact that we'll move all crash generation out-of-process so what we could do is the following: take the minidump as usual and report it to the main process, use the crash generation process to map the memory of the crashed process, scan it with a memtest algorithm and flag the crash reports if we find bad bits.

Summary: Add memory checking to the exception handler → Add memory checking to the out-of-process crash generator
Severity: normal → S3
Blocks: 1821415
No longer blocks: 1256224
Blocks: badram

There's a user-space memory tester called memtester which we could take inspiration from (or maybe reuse?).

Assignee: nobody → btsoi

I was speaking with @gcp and suggested that it could be a good idea to make the badram scanning a separate library so that it can be used both by the crash reporter and by some future in-process bad ram scanning. I filed bug 1897102 before I remembered this bug. I think it's still good to have separate bugs for the library and then the integration in the crash reporter.

Status: NEW → ASSIGNED
Depends on: 1897102
Attachment #9442964 - Attachment description: WIP: Bug 1565033: Add memory testing to crash reporter client. → Bug 1565033: Add memory testing to crash reporter client.
Depends on: 1944901
Pushed by gpascutto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33b07d5e29b4 Add memory testing to crash reporter client. r=afranchuk,fluent-reviewers,supply-chain-reviewers,cmartin,flod,gsvelto
Attachment #9464424 - Flags: data-review?(willkg)

Comment on attachment 9464424 [details]
Request for data collection review form

Hi! I'm no longer a Data Steward. Please find someone else to do the data review.

Attachment #9464424 - Flags: data-review?(willkg) → data-review?
Attachment #9464424 - Flags: data-review? → data-review?(chutten)

I realized I misunderstood the documentation and the data review should be done before the patch is landed.
Still the feature is completely switched off (controlled by a pref) in the landed patch, and I intend to switch it on later with another patch, so no data is currently being collected.

Backed out for causing build bustages.

Flags: needinfo?(btsoi)

Backed out due to Rust version difference. memtest crate currently doesn't work with Rust 1.76. I thought we have Rust 1.82 now but the version bump got backed out.
I could consider rewriting the parts of the crate that don't compile with 1.76 and release a new version. For now I'll wait for the data review first.

Flags: needinfo?(btsoi)
Depends on: 1945020

Comment on attachment 9464424 [details]
Request for data collection review form

Actually, there's a new Data Review process in town. Starting May 7, 2024, all data collections in projects reviewed in Phabricator also perform data review in Phabricator: https://wiki.mozilla.org/Data_Collection#Firefox_Desktop.2C_Firefox_and_Focus_for_Android.2C_Gecko_.28from_May_7.2C_2024.29

In short, following what the Herald message says, code authors and code reviewers together determine what level of review is needed for new or expanded data collections. You might never need to fill out a data review request form again! (For instrumentation in projects reviewed in Phabricator, anyway)

And I see you've done this already with data-classification-low, so you're good to go as far as I can tell?

Attachment #9464424 - Flags: data-review?(chutten)

Ah in that case yes we're good to go.

Attachment #9464424 - Attachment is obsolete: true
Pushed by afranchuk@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2a854b53890 Add memory testing to crash reporter client. r=afranchuk,fluent-reviewers,supply-chain-reviewers,cmartin,flod,gsvelto
No longer depends on: 1945020

Backed out together with Bug 1620998.

Pushed by gpascutto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ff7173030c9e Add memory testing to crash reporter client. r=afranchuk,fluent-reviewers,supply-chain-reviewers,cmartin,flod,gsvelto

This patch Increased the installer size by 43KB on Windows. I guess some increase is expected here. The increase is below any reportable thresholds . This comment is only a FYI.

Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
Regressions: 1948145
No longer depends on: 1897102
See Also: → 1897102
Blocks: 1948349
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: