-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Don't crash indexer on an "UNKNOWN: unknown error, lstat" error #898
Conversation
9e6032a
to
87b0a34
Compare
bcde674
to
d5c877c
Compare
d5c877c
to
dd80f92
Compare
I don't think we should catch this error if we don't understand why it's happening. It's possible it could be a UTF-8 problem. Or it could be the corrupt file like you linked to above. Or it might have to do with a faulty npm cache. Bottom line is, I think we shouldn't mess with it until we understand it. It does seem like it's a Windows problem, so maybe someone with a Windows machine should tackle this. |
I'd be fine with not propagating unknown errors into a panic as long as we emit the exception as a telemetry event: appmap-js/packages/cli/src/fingerprint/fingerprintWatchCommand.ts Lines 58 to 59 in dd80f92
Is there a chance this method would be invoked repeatedly on an unreadable file? If so, that's a bigger issue. |
add91e1
to
2f3fde9
Compare
Added
If you mean getting stuck on an unreadable file and not processing other files, I think yes. Running This error was encountered 2 times in telemetry. Maybe it's not worth adding logic that will bypass such unreadable files right now. |
2f3fde9
to
1a77606
Compare
Maybe we can do both. Catch this error, to reach the goal of not letting the indexer crash. And send telemetry with the error message, to help understand why it's happening. |
I think this is a problem. I don't think we should release it in its current form if this is the behavior. Maybe you could Alternatively, maybe we could catch the error, then add the file to a list of files to skip while watching/polling. |
1a77606
to
c9eaf83
Compare
d020e6e
to
24bf529
Compare
…p them when watching
24bf529
to
96104ae
Compare
🎉 This PR is included in version @appland/appmap-v3.55.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Attempts to fix #897. Created from branch
sw/disable_watching_on_ENOSPC_error
This error is an exception thrown by chokidar while file watching.
I wasn't able to reproduce this error. I created symlinks and deleted them programmatically when the queue processes the file but this produced an ENOENT error.
There's a claim this
UNKNOWN: unknown error, lstat
error is the result of file corruption down at the NTFS level.nodejs/node#43439