lprun error when many instances launched simultaneously.
When I run several instances of lprun at once (via start lprun in a loop) I get the follow errors intermittently. Is this a supported scenario?
c:\gits\twillLaunch\TextServiceV1>c:\bin_drop\lprun.exe tola.linq
error CS0042: Unexpected error creating debug information file 'c:\Users
\igord\AppData\Local\Temp\LINQPad\_myicbruv\query_cqlttm.PDB' --
'c:\Users\igord\AppData\Local\Temp\LINQPad\_myicbruv\query_cqlttm.pdb:
The system cannot find the path specified.
c:\gits\twillLaunch\TextServiceV1>c:\bin_drop\lprun.exe tola.linq
error CS0042: Unexpected error creating debug information file 'c:\Users
\igord\AppData\Local\Temp\LINQPad\_myicbruv\query_cqlttm.PDB' --
'c:\Users\igord\AppData\Local\Temp\LINQPad\_myicbruv\query_cqlttm.pdb:
The system cannot find the path specified.
Comments
If I run the queries sequentially, it works fine. When I run some of them simultaneously, I run into this error as well as 'source not found' errors. I hope this can be addressed soon.
Message = error CS0042: Unexpected error creating debug information file 'c:\Users\tormods\AppData\Local\Temp\LINQPad\_uzrgjcfy\query_xeswak.PDB' -- 'c:\Users\tormods\AppData\Local\Temp\LINQPad\_uzrgjcfy\query_xeswak.pdb: The system cannot find the path specified.
This was with LINQPad version:
V4.57.02
Do you have trouble reproducing it? Should I try to set something up?
I can do a LINQPad 4 beta build with that fix if you require.
I will attempt upgrade to LINQPad5. I do think many people are using LPRun, so it would be good to queue it up for LINQPad4.
I am running LinqPad 5.22.02 (and I tried with the Beta 5.22.03) and I get a similar problem that seems linked to parallel executions.
Here is my use case:
- I run 1 instance of a script X with connection A.
- I run 4 instances of another script Y with connection B.
- I run 1 instance of another script Z with connection B.
When I run all those in parallel any of those scripts could get me the following error: 'A' is not a valid connection name. To rename a connection, right-click a connection in LINQPad's Schema Explorer and choose 'Rename'. Cx data is stored in %appdata%\LINQPad\ConnectionsV2.xml. (You can move this file to alongside LINQPad.exe to simplify deployment.)
Now if I run each script serially, it's works. At first I was running those scripts from another linqpad script using Tasks but I was able to repro with a simple batch file that does this:
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=A -format=Html X.linq 1> "X.html" 2>&1
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=B -format=Html Y.linq 1> "Y.html" 2>&1
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=B -format=Html Y.linq 1> "Y.html" 2>&1
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=B -format=Html Y.linq 1> "Y.html" 2>&1
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=B -format=Html Y.linq 1> "Y.html" 2>&1
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=B -format=Html Y.linq 1> "Y.html" 2>&1
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=B -format=Html Y.linq 1> "Y.html" 2>&1
start /b cmd.exe /C \downloads\LINQPad5-AnyCPU\lprun.exe -cxname=B -format=Html Z.linq 1> "Z.html" 2>&1
Any idea what could be wrong?
Also, a few related questions:
- Is there a way to specify a different context using Util.Run? It seems to only reuse the context from the calling script.
- Is there a way to avoid the exception thrown by Util.Cmd when the script does not complete successfully? The problem that happens is that I get no output so I can't dump to file. The workaround I found was to either launch my own process and redirect stdoutput and stderror to a file or use Util.Cmd to run "Cmd.exe /C lprun ...."
Thanks in advance!
Ouamer