-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Crashing the osjs when uploading a file in osjs mountpoint #79
Comments
This comment was marked as outdated.
This comment was marked as outdated.
For me, crash can simply be happened by uploading a file in osjs mountpoint. error is :
I think the error that happened should be solved in this way #78 |
This comment was marked as resolved.
This comment was marked as resolved.
Defers the VFS cleanup process and slightly cleans up the error handling in the request chain to prevent crashing when streams are destroyed by the runtime. Fixes #79
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Defers the creation of streams in the VFS process to avoid any cleanups that ends up in exceptions because they are handled outside the scope/context. Fixes #79
I went ahead and did a minor refactor here, and instead of deferring the cleanup the creation of the stream is deferred. This way there is no chance a Stream is created if any exception occurs in the VFS request pre-checks. Should be good enough for now. The PR has been updated. |
I actually think this might also have fixed an edge-case where temporary files never actually was cleaned up. I was messing around with one of my servers to try and reproduce this issue (which I actually did not manage... only on my Macbook at home) and saw there was quite a few old files that is probably from errors. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Thank you for your complete explanation. |
I have tested this patch for 30 minutes on a couple of different machines and it seems to work fine to me. Now I really hope it also fixes it for you, and can't wait to hear your results from trying out the PR 🤞 Funny thing is that this bug is probably 4+ years old, so thank you very much for reporting 😅 |
Defers the creation of streams in the VFS process to avoid any cleanups that ends up in exceptions because they are handled outside the scope/context. Fixes #79
I went ahead and merged the PR and published a new |
Hello @andersevenrud . But according to this, I have my own adapter for vfs, and if an error occurs when using the writefile request, I will get the same error again and the system will crash. |
Yeah, sadly my PR does not solve this issue when an error occurs further down the line in this context. I started on a new patch to refactor parts and use a new version of formidable, but don't really have the time to finish it until this weekend. I'll send you a notification :) |
Thank you very much. |
I just got an idea for a possible simpler solution. Could you test this PR? |
Finallllllllllllly, it was fixed. |
Sweet! I published a new version. |
Why do you only increment the version in osjs-server? |
I don't really feel that it's needed / I'm lazy, hehe. The installation instructions contains a step for updating packages. |
hi, @andersevenrud
According to the os-js/OS.js#840 and #77, it seems that the error has been resolved.
Unfortunately, the error has not been resolved.
The text was updated successfully, but these errors were encountered: