Open Bug 1608268 Opened 4 years ago Updated 1 year ago

Create an IOInterposeObserver to ensure that certain threads never perform file writes

Categories

(Core :: XPCOM, task)

task

Tracking

()

People

(Reporter: alexical, Assigned: alexical)

References

Details

Attachments

(2 files)

For the _exit(0) effort, it would be nice to know for sure that certain threads don't ever do any file writes, which is a big indicator that it's safe to simply exit while they're running. One way we could do this is to add an IOInterposeObserver which reads thread-local data indicating that the current thread isn't supposed to do any writes. We could then annotate threads which we believe are free of writes but aren't certain about, and get assertion failures if we're wrong.

I don't think it's worth turning this on for all of nightly, but it could be nice to have behind a pref.

Creates an IOInterposer with threadlocal data to allow asserting
that individual threads don't perform any file writes. This is
useful for shutdown work to ensure that we aren't terminating
mid-write if we do a fast shutdown via _exit(0) or similar.

Assignee: nobody → dothayer
Blocks: 1610664
No longer blocks: 1606879
Blocks: 1610950
No longer blocks: 1610664
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: