Closed Bug 1451613 Opened 8 years ago Closed 3 years ago

JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 408: Error: OS.File has been shut down. Rejecting post to DirectoryIterator_prototype_close

Categories

(Toolkit :: General, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

Details

I can see this a lot for tests as driven by Marionette and which restart Firefox. The following failure is visible twice in the logs during shutdown: https://treeherder.mozilla.org/logviewer.html#?job_id=171227846&repo=try&lineNumber=36530-36531 > [task 2018-03-30T17:28:59.270Z] 17:28:59 INFO - PID 1961 | JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 408: Error: OS.File has been shut down. Rejecting post to DirectoryIterator_prototype_close > [task 2018-03-30T17:28:59.272Z] 17:28:59 INFO - PID 1961 | JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 408: Error: OS.File has been shut down. Rejecting post to DirectoryIterator_prototype_close So something tries to close a DirectoryIterator and I assume `Scheduler.post()` causes this failure. Is that an OS.File bug or more Worker related?
Flags: needinfo?(amarchesini)
Wait, the next two lines of this log show that this might be related to ProfileAge.jsm [task 2018-03-30T17:28:59.276Z] 17:28:59 INFO - PID 1961 | JavaScript error: resource://gre/modules/ProfileAge.jsm, line 174: Error: Unable to fetch oldest profile entry: Error: OS.File has been shut down. Rejecting request to DirectoryIterator_prototype_next
Component: OS.File → General
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(florian)
Flags: needinfo?(amarchesini)
(In reply to Henrik Skupin (:whimboo) from comment #1) > Wait, the next two lines of this log show that this might be related to > ProfileAge.jsm Right, it's getOldestProfileTimestamp in ProfileAge.jsm that fails, this is code added years ago in bug 807842.
Flags: needinfo?(florian)
The correct solution would either be to use a shutdown blocker in ProfileAge or to ensure that ProfileAge gets notified about shutdown before osfile shuts down, and then avoids making further osfile calls. But as noted, this is pretty old code. I'm not convinced these errors are really likely to happen in practice, nor does it look to me (off-hand) like they break anything important.
Flags: needinfo?(gijskruitbosch+bugs)
Priority: -- → P3

I have the same problem:

observe@AsyncShutdown.jsm:532:16
JavaScript error: resource://services-sync/policies.js, line 842: TypeError: Svc.Obs is undefined```

Details:
https://gist.github.com/wellington1993/33b38a1818178859d01bd1ec5de10b3f

Thanks!
Flags: needinfo?(past)
Flags: needinfo?(past) → needinfo?(dolske)

No idea why the NI request in comment 4. Although this is probably related to async shutdown, that seems like a different error overall and should be filed separately with the sync team.

Flags: needinfo?(dolske)
Severity: normal → S3

OS.File is pending removal

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.