Comments (9)
I'm going to close this issue, but let me know if anything else goes wrong.
from vscode-wolfram.
I have a theory about this...
The server kernel started fine, but took more than 10 seconds for whatever reason (VSCode may have been updating or indexing and slowing things down, whatever)
Then trying to do RunServerDiagnostic in a notebook hits the license limit on the machine. There are 3 kernel processes running: server kernel that started fine, host kernel in the notebook session, and the child server kernel from RunServerDiagnostic.
Then the diagnostic times out after 30 seconds.
I will be adding various pieces to help with this:
- better messaging to describe what is going on
- mentioning license limits and encouraging exiting from VSCode before running the diagnostic
- setting to disable the warning if it regularly is taking more than 10 seconds to start kernel
from vscode-wolfram.
Yeah, I'm also now wondering about license theory.
There may be multiple issues at play.
For whatever reason, it may take more than 10 seconds to start kernels on some systems. I try to run with various options like -noinit -nopaclet -nostartuppaclets
to help startup time, but it may still take time.
Note also that -noinit
means that your init.m is not run.
If this is the case, then I will add a setting to just disable this warning. I don't want to increase the time or anything, because this is really testing whether everything is properly setup. If everything is setup properly and kernel takes 12 seconds to start, then there is no need for this warning at all. The warning after 10 seconds is really for when packages are not properly installed and the kernel really is hanging.
There may be another issue with RunServerDiagnostic
not working on Windows and Linux, and I am currently looking into this.
from vscode-wolfram.
I have pushed changes to LSPServer that address this issue:
https://github.com/WolframResearch/LSPServer
Not officially released yet. Please build locally and let me know how it goes.
I have added a lot more functionality to RunServerDiagnostic.
I have also narrowed down a race condition that (sometimes) happens only on Linux (apparently).
I have worked around that issue. I have tested on Mac, Linux, and Windows and everything seems to be working.
I will not close just yet.
from vscode-wolfram.
I don't think the license limit should be an issue in this case - I have not had issues with launching 3 kernels on my PC at the same time. I have tested VSCode with no MM opened and it still did not launch in time (still got the same error in the Wolfram Language Error log).
I also tried to restart VSCode several times and add wait some time between opening it and opening the first Mathematica file. I also tried to clear out MM configuration folder in order to eliminate the possibility of this being an issue with my init.m files but that also did not help.
If this ends up being an issue that my system just does not load/launch the server in time, is there a way to increase the time limit from 10 seconds to something larger?
from vscode-wolfram.
env:
WolframScript 1.3.0 for Linux-x86-64
Wolfram Language 12.1.0 Engine for Linux x86 (64-bit)
OS: Arch Linux x86_64
Running Language Server diagnostic...
Kernel that is running RunServerDiagnostic[] ($CommandLine[[1]]): /usr/local/Wolfram/WolframEngine/12.1/SystemFiles/Kernel/Binaries/Linux-x86-64/WolframKernel
Kernel that RunServerDiagnostic[] will start (RunServerDiagnostic[{kernel, ...}]): /usr/local/bin/WolframKernel
WARNING: RunServerDiagnostic[] should be run with same kernel that RunServerDiagnostic[] will start.
Starting Language Server kernel with command: {/usr/local/bin/WolframKernel, -noinit, -noprompt, -nopaclet, -noicon, -nostartuppaclets, -run, Needs["LSPServer`"];LSPServer`StartServer[]}
Loading from Wolfram Research server ...
If any messages are printed below, they must be fixed.
Writing initialize...
BinaryWrite::openx: OutputStream[in:0, 4] is not open.
BinaryWrite::openx: OutputStream[in:0, 4] is not open.
ERROR: BinaryWrite failed; exiting hard
Process timed out after 30 seconds.
INFO: Exit code: None
from vscode-wolfram.
This time it got further into loading, but still errored out during the server diagnostics:
Running Language Server diagnostic...
IMPORTANT: Make sure that all other kernels are shut down before running this diagnostic.
Transient license limit errors may give false negatives.
INFORMATION: Host Kernel: WolframKernel
INFORMATION: Host Kernel version: 12.3
INFORMATION: Host Kernel Directory[]: C:\Users\user\Documents
INFORMATION: Host Kernel $MaxLicenseProcesses: 75
INFORMATION: Host Kernel LSPServer version: 1.5
INFORMATION: Host Kernel CodeParser version: 1.4
INFORMATION: Host Kernel CodeInspector version: 1.4
INFORMATION: Host Kernel CodeFormatter version: 1.4
INFORMATION: Host Kernel LSPServer build date: Tue 18 Jan 2022 09:10:57
INFORMATION: Host Kernel CodeParser build date: Sun 21 Nov 2021 22:59:41
INFORMATION: Host Kernel CodeInspector build date: Sun 21 Nov 2021 18:08:13
INFORMATION: Host Kernel CodeFormatter build date: Sun 21 Nov 2021 23:13:18
Start Stage 1
Checking whether bug 410895 is present and work-around is needed...
Starting Mini Server kernel with command: {c:\Program Files\Wolfram Research\Mathematica\12.3\WolframKernel.exe,-noinit,-noprompt,-nopaclet,-noicon,-nostartuppaclets,-run,Test410895[(*"*)];ToExpression[FromCharacterCode[{78, 101, 101, 100, 115, 91, 34, 76, 83, 80, 83, 101, 114, 118, 101, 114, 96, 34, 93, 59, 76, 83, 80, 83, 101, 114, 118, 101, 114, 96, 83, 101, 114, 118, 101, 114, 68, 105, 97, 103, 110, 111, 115, 116, 105, 99, 115, 96, 83, 116, 97, 114, 116, 77, 105, 110, 105, 83, 101, 114, 118, 101, 114, 91, 93}]]}
Waiting maximum of 30 seconds for any hangs.
Sanity checking...
ERROR: Unexpected EndOfFile; exiting hard
Process already finished.
INFO: Exit code: 0
from vscode-wolfram.
I could not reproduce the exact output that you posted, but I did address other issues that may have been the cause. If you can, please checkout the latest changes in LSPServer and try again. I am interested if there are any other loose ends.
Also, I want to verify that this is only the diagnostics that you are seeing trouble with. The actual server runs correctly?
from vscode-wolfram.
I used a paclet that I compiled in a linux VM on Windows which might have been a mistake. When I use it in linux everything is totally fine (launches without errors and works fine) as opposed to LSPServer-1.4 that did not want to start.
from vscode-wolfram.
Related Issues (20)
- Blank should be a wordseparator as well HOT 1
- Support for Wolfram Engine? HOT 4
- Is the a way to export to WebAssembly from Wolfram Language? HOT 1
- Starting client failed HOT 8
- Crash while trying to select code in a saved file HOT 3
- Syntax highlighting: symbols HOT 3
- Formatting options HOT 2
- Feature Request: Syntax Highlight for HTML inside EmbeddedHTML
- Does it work with the Wolfram Player? HOT 2
- Request: publish extension in open-vsx.org HOT 1
- Section Folding bug
- Cannot run wl files in VSCode HOT 2
- Couldn't start client Wolfram Language HOT 1
- Could you support unicode characters, just like Mathematica HOT 8
- LSP for wolfram language in VSCode jupyter notebook HOT 5
- 'Go to Definition' Support across project HOT 1
- Setting up vscode-wolfram on Mac M1 HOT 1
- A fixed upstream issue. HOT 1
- Mark Sin[1, 2] as incorrect syntax with red highlighting for 2
- Unlink from the .m file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-wolfram.