Skip to content
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

*** settings *** section in start of a file throws a Mutex error #733

Closed
pZq opened this issue Aug 22, 2022 · 5 comments
Closed

*** settings *** section in start of a file throws a Mutex error #733

pZq opened this issue Aug 22, 2022 · 5 comments
Labels
bug Something isn't working robotframework-ls

Comments

@pZq
Copy link

pZq commented Aug 22, 2022

Describe the bug

In VS CODE -> .robot or .resource files with a *** settings *** section in start of a file throws this error for me.
Error collecting Robocop errors: Unable to get mutex for: c:\users\user.robotframework-ls\specs\v2\769da057_5.0.1\builtins\xml.libspec after 30 seconds.

image

At some point it seemed like the error went away when i deleted Documentation from *** settings *** section but after a while the error returned.

Is it missconfiguration of VS code and if so, please suggest what setting i should be looking for to fix it ?
I understand mutex is some kind of multithreading but thats all i understand about mutex :)

I use also TFS checkout extension and the files i have open in the folder view are all in a TFS folder -> Just in case, if that would lead to some sort of problems... But the TFS sync folder is not the one the error states so i think TFS extension is not the issue in this case.

I tried also to give permissions for that builtin folder for everyone and full permissions but that didn't help either.

To Reproduce
Just install LSP extension in VS code and make a *** settings *** section, maybe some testcase needs to be also be built just some simple.

Expected behavior
---> I think mutex problem should not be seen.

Screenshots
Screenshot in description.

Versions:
I use
Windows 10 pro 10.0.19043
VS Code 1.70.2
Python 3.10.6 on win32
Robot framework version v5.0.1
VS extension → Robot framework language server v.1.0.0 → last updated 17.8.2022 (17th of august).

Logs
Error collecting Robocop errors: Unable to get mutex for: c:\users\user.robotframework-ls\specs\v2\769da057_5.0.1\builtins\xml.libspec after 30 seconds.

@pZq pZq added bug Something isn't working robotframework-ls labels Aug 22, 2022
@fabioz
Copy link
Collaborator

fabioz commented Aug 22, 2022

Can you provide the full output you have (in OUTPUT > Robot Framework) when this error happens?

Note that the problem isn't really the ***Settings*** section per se, rather collecting information from the xml module in your machine seems to be slow (you see a mutex error because the language server spawns multiple processes that may request the same info, but when one starts computing that info it create a file-mutex and the other process has to wait for that process to finish and it didn't finish after 30 seconds...).

As a note, it's possible that in your scenario with TFS things are really slow, so, maybe the only solution would be raising that timeout...

@pZq
Copy link
Author

pZq commented Aug 22, 2022

Ok, thanks. I can try to get rid of TFS extension and use a separate folder to see if i can get around this problem.

There is also many things i must filter out from the log before i can publish it here so -> let me first try to get rid of the TFS folder. I will return when i have tested without TFS so that i can confirm, if its an TFS related issue or something else.

@pZq
Copy link
Author

pZq commented Aug 22, 2022

Ok the same behaviour is seen without TFS folders in use also. I copied the folder to an other location and used from there.

Log is attached
robot_Log.txt
.

@fabioz
Copy link
Collaborator

fabioz commented Aug 22, 2022

This was fixed in: 9faffec

I've just pushed a 1.0.7 pre-release. Can you test if it works for you?

-- note: it may take some more minutes for it to appear in the VSCode marketplace.

@fabioz fabioz closed this as completed Aug 22, 2022
@pZq
Copy link
Author

pZq commented Aug 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working robotframework-ls
Projects
None yet
Development

No branches or pull requests

2 participants