Closed Bug 1416977 Opened 3 years ago Closed 3 years ago
Error: I/O operation on closed file during mozlog .structuredlog on Windows
STR: - Open Treeherder on e.g. mozilla-central - Select a green windows build - Select "failure classification" - See the 7 "ValueError: I/O operation on closed file" items with links into the build log. Expected result: - "No error lines reported" While it's not really a problem on green jobs, it becomes one when the jobs are red because of a make check error, because you now have those 7 errors along with your own, and you first have to figure out that those 7 errors have nothing to do with your changes, and have been there for a while, even on green runs.
Whichever test job I select I always see `No error lines reported`. Can you please point out a specific job which shows this problem?
(In reply to Henrik Skupin (:whimboo) from comment #1) > Whichever test job I select I always see `No error lines reported`. Can you > please point out a specific job which shows this problem? Choose a *build* job, not a test job. Those tests are running during make check during the build.
I see. So here a query for autoland: https://treeherder.mozilla.org/#/jobs?repo=autoland&filter-searchStr=build%20windows&bugfiler&filter-resultStatus=success&filter-resultStatus=runnable https://treeherder.mozilla.org/logviewer.html#?job_id=144872600&repo=autoland&lineNumber=39115 08:30:46 INFO - mozlog.structuredlog: Failure calling log handler: 08:30:46 INFO - Traceback (most recent call last): 08:30:46 INFO - File "z:\build\build\src\testing\mozbase\mozlog\mozlog\structuredlog.py", line 237, in _handle_log 08:30:46 INFO - handler(data) 08:30:46 INFO - File "z:\build\build\src\testing\mozbase\mozlog\mozlog\handlers\base.py", line 101, in __call__ 08:30:46 INFO - self.stream.write(formatted.encode("utf-8", "replace")) 08:30:46 INFO - ValueError: I/O operation on closed file
OS: Unspecified → Windows
Please fix this, because it makes other errors misattributed to bug 1420472.
I debugged this a little and determined that the ValueError is thrown by the handler created by test_utf8str_write.
Attachment #8939094 - Flags: review?(ahalberstadt)
Comment on attachment 8939094 [details] [diff] [review] remove handler before its file is closed Review of attachment 8939094 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for debugging this Geoff!
Attachment #8939094 - Flags: review?(ahalberstadt) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/311f264cc818 Ensure handler removed before file closed in test_structured.py; r=ahal
You need to log in before you can comment on or make changes to this bug.