-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[python] plugin-storage/global-state.json: Unexpected end of JSON input #8384
Comments
Exactly the same issue, with the
|
I found a case where such errors happen. Clear any previous value, how it supposed to work in VSCode.
After that, any
But, it logs an error and returns Test code
Expected values,
but it gets
|
After some investigation and a few attempts to solve this issue, I would like to add some notes about it. |
Also experiencing this. |
I found a case where this problem reproduces relatively frequently: running the browser test suite. When running that suite [1], a new global storage folder is created each time, under the system's temporary folder. This permits always starting fresh and not polluting the local user's global settings. I think it may be that, with a new global storage, more write operations happen in
I captured the content of Note: We do not have the [1] |
@marcdumais-work I think the issue you reported mostly comes from https://github.com/eclipse-theia/theia/blob/7971705d4d5fbd381042c0be50892b49b39fd807/packages/plugin-ext/src/main/node/plugins-key-value-storage.ts: Neither |
…al plugin storage file Fixes #8384 Added the use of a semaphore to lock access to the global plugin storage file, to avoid it being accessed in a disorderly fashion, causing potential corruption. As per the issue discussion, it's possible that there is also a potential race condition caused by node's write function, not flushing its buffers to disk, but in this specific case, it was abvious that parallel calls to set() and get() were the main cause of the problems. Signed-off-by: Marc Dumais <[email protected]>
…al plugin storage file Fixes #8384 Added the use of a semaphore to lock access to the global plugin storage file, to avoid it being accessed in a disorderly fashion, causing potential corruption. As per the issue discussion, it's possible that there is also a potential race condition caused by node's write function, not flushing its buffers to disk, but in this specific case, it was obvious that parallel calls to set() and get() were the main cause of the problems. Signed-off-by: Marc Dumais <[email protected]>
…al plugin storage file Fixes #8384 Added the use of a semaphore to lock access to the global plugin storage file, to avoid it being accessed in a disorderly fashion, causing potential corruption. As per the issue discussion, it's possible that there is also a potential race condition caused by node's write function, not flushing its buffers to disk, but in this specific case, it was obvious that parallel calls to set() and get() were the main cause of the problems. Signed-off-by: Marc Dumais <[email protected]>
Python extension is trying to read storage files and fails:
The text was updated successfully, but these errors were encountered: