Add mappings for NS_ERROR_MODULE_WIN32 errors generated from nsLocalFileWin.cpp
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
People
(Reporter: sg, Assigned: jkrause)
References
(Blocks 7 open bugs)
Details
(Keywords: leave-open)
Attachments
(9 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The NS_ERROR_MODULE_WIN32 errors actually generated from nsLocalFileWin.cpp should eventually be mapped to platform-agnostic error codes.
Comment 1•2 years ago
|
||
One candidate error code to be added is 0x570 ERROR_FILE_CORRUPT
. We already have NS_ERROR_FILE_CORRUPTED
, but we use it probably at a higher level of abstraction (reading a file whose content we don't understand wrt the expected content, like jar). As 0x570 ERROR_FILE_CORRUPT
needs probably different actions (it is a strong indicator of file system corruption) than dealing with a file we might have wrecked ourself, I'd propose a new NS_ERROR_FILE_OS_CORRUPT
. Ideas for a better naming are welcome!
Comment 2•2 years ago
•
|
||
While NS_ERROR_FILE_CORRUPTED already exists, it indicates most of the times more a parsing problem of a given file format.
But Windows ERROR_FILE_CORRUPTED signals a malfunctioning or corrupted file system at OS level, thus we translate it to the new
NS_ERROR_FILE_FS_CORRUPTED.
There seems to be no suitable errno under POSIX to map here.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5cd1ef556cbc Map Windows error 0x570 ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED r=xpcom-reviewers,janv,nika
Comment 4•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Comment 5•2 years ago
|
||
WIN32(0x45D) is ERROR_IO_DEVICE seems to happen in the wild, too.
Comment 6•2 years ago
|
||
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2899639c5db8 Map Windows error 0x45D ERROR_IO_DEVICE to NS_ERROR_FILE_DEVICE_FAILURE r=janv,xpcom-reviewers,mccr8
Comment 8•2 years ago
|
||
bugherder |
Comment 9•2 years ago
|
||
Looking at what I can map ERROR_DISK_FULL in ConvertWinError I was wondering, if ERROR_DISK_FULL and/or ERROR_HANDLE_DISK_FULL should really map to NS_ERROR_FILE_TOO_BIG, which sounds meaningful to me only in case we are writing a (large) file. And the only place we intercept NS_ERROR_FILE_TOO_BIG seems to deal with 32Bit limitations while reading, not with the disk full case.
Comment 10•2 years ago
|
||
The code which depends on the old generic NS_ERROR_MODULE_WIN32 mapping needs
to be updated too.
Depends on D113505
Comment 11•2 years ago
|
||
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a98b826be2d8 Follow-up fix for the ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED mapping; r=jstutte
Comment 12•2 years ago
|
||
bugherder |
Comment 13•2 years ago
|
||
0x1E3 seem to have no current mapping in official documentation ? And in winerror.h we only see:
#define MK_E_UNAVAILABLE _HRESULT_TYPEDEF_(0x800401E3L)
whatever MK_E_UNAVAILABLE
means (what I read in internet talks about marshaling to office?).
Comment 14•2 years ago
|
||
Comment 15•2 years ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #13)
0x1E3 seem to have no current mapping in official documentation ? And in winerror.h we only see:
#define MK_E_UNAVAILABLE _HRESULT_TYPEDEF_(0x800401E3L)
whatever
MK_E_UNAVAILABLE
means (what I read in internet talks about marshaling to office?).
I don't think MK_E_UNAVAILABLE has to do with the error. According to net helpmsg 483
, the error message for Win32 error code 483 (0x1E3) is "The request failed due to a fatal device hardware error."
Comment 16•2 years ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #13)
And in winerror.h
Obviously this is not an official Microsoft repo. I found
//
// MessageId: ERROR_DEVICE_HARDWARE_ERROR
//
// MessageText:
//
// The request failed due to a fatal device hardware error.
//
#define ERROR_DEVICE_HARDWARE_ERROR 483L
in my local Windows SDK installation.
Comment 17•2 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #16)
#define ERROR_DEVICE_HARDWARE_ERROR 483L
in my local Windows SDK installation.
Thanks for looking that up! That sounds much more plausible, indeed.
Comment 18•2 years ago
|
||
Comment 19•2 years ago
|
||
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d148b4f4821e Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Comment 20•2 years ago
|
||
bugherder |
Comment 21•2 years ago
•
|
||
There are some new Windows errors. hurray!
Code | Meaning | Where |
---|---|---|
0x12 | ERROR_NO_MORE_FILES | GetNextFile , this might be something we need to handle/expect? |
0x1 | ERROR_INVALID_FUNCTION | GetDirectoryEntries , not sure but we might try to invoke GetDirectoryEntries on a directory that vanished in the meantime? |
0x5AA | ERROR_NO_SYSTEM_RESOURCES | Sounds not very actionable, but is definitely fatal |
0x1129 | ERROR_REPARSE_TAG_INVALID (The tag present in the reparse point buffer is invalid.) | GetDirectoryEntries |
0x17 | ERROR_CRC Data error (cyclic redundancy check). | CopyTo From what I read, it is another form of saying "filesystem corrupt" |
Comment 22•2 years ago
|
||
We should map also:
ERROR_INVALID_NAME
- 123 (0x7B)
- The filename, directory name, or volume label syntax is incorrect.
Comment 23•2 years ago
|
||
Updated•2 years ago
|
Comment 24•2 years ago
|
||
Pushed by echuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a26f138f9054 Map Windows local file error 0x7B ERROR_INVALID_NAME to NS_ERROR_FILE_INVALID_PATH, r=xpcom-reviewers,dom-storage-reviewers,nika,jstutte
Comment 25•2 years ago
|
||
bugherder |
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 26•1 year ago
|
||
The error 0x1129 ERROR_REPARSE_TAG_INVALID
now also appeared in Bug 1702422 Comment 83 for the first time.
Assignee | ||
Comment 27•1 year ago
|
||
The error 0x571 ERROR_DISK_CORRUPT
appeared in Bug 1704439 Comment 52 for the first time. The Microsoft docs says "The disk structure is corrupted and unreadable.", so maybe it could be mapped to NS_ERROR_FILE_FS_CORRUPTED
.
Assignee | ||
Comment 28•1 year ago
|
||
The error 0x571 ERROR_DISK_CORRUPT
also appeared in Bug 1702422 Comment 83 for the first time.
Assignee | ||
Comment 29•1 year ago
|
||
The error 0x1129 ERROR_REPARSE_TAG_INVALID
appeared in Bug 1720080 Comment 52 for the first time.
Assignee | ||
Comment 30•1 year ago
|
||
Updated•1 year ago
|
Comment 31•1 year ago
|
||
Pushed by jkrause@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6020e9690ec4 Map Windows error `ERROR_DISK_CORRUPT` to `NS_ERROR_FILE_FS_CORRUPTED`. r=xpcom-reviewers,dom-storage-reviewers,jstutte,nika
Comment 32•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Assignee | ||
Comment 33•1 year ago
|
||
The error 0x510 ERROR_CONTENT_BLOCKED
appeared in Bug 1702421 Comment 78 for the first time.
Assignee | ||
Comment 34•1 year ago
|
||
Comment 35•1 year ago
|
||
Pushed by jkrause@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3079bbbfc4cb Map Windows error `0x510 ERROR_CONTENT_BLOCKED` to `NS_ERROR_FILE_ACCESS_DENIED`. r=xpcom-reviewers,nika
Updated•1 year ago
|
Comment 36•1 year ago
|
||
bugherder |
Assignee | ||
Comment 37•1 year ago
|
||
Comment 38•1 year ago
|
||
Pushed by jkrause@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2ae3ed2e501 Map Windows error `ERROR_DEV_NOT_EXIST` (0x37) to `NS_ERROR_FILE_DEVICE_FAILURE`. r=xpcom-reviewers,barret
Comment 39•1 year ago
|
||
bugherder |
Comment 40•11 months ago
|
||
The severity field for this bug is relatively low, S4. However, the bug has 5 See Also bugs.
:jkrause, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 41•11 months ago
|
||
(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #40)
The severity field for this bug is relatively low, S4. However, the bug has 5 See Also bugs.
:jkrause, could you consider increasing the bug severity?
The see also here keep just track where we've seen this Windows error the first time. Having or not having this mapping does not change anything for the end-user.
Assignee | ||
Comment 42•11 months ago
|
||
Comment 43•11 months ago
|
||
Pushed by jkrause@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b6a517953b4 Map Windows error `ERROR_NO_SYSTEM_RESOURCES` (0x5AA) to `NS_ERROR_OUT_OF_MEMORY`. r=xpcom-reviewers,kmag
Comment 44•11 months ago
|
||
bugherder |
Comment 45•5 months ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:jkrause, maybe it's time to close this bug?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 46•5 months ago
|
||
Mapping the errors is on an ongoing basis.
Description
•