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
IDE can't run code on Windows, stuck at "Sending request...." #4214
Comments
Thanks for this, but - my IT support staff say that in our organization, that policy for Audit Removable Storage is not enabled – and I still have the “stuck at Sending Request…” problem. So the fact that disabling it worked for you is probably just circumstantial. This holds for SC 3.8.x--SC 3.10.0 on a 64-bit Win10 Education edition in a centrally managed university environment. If you can think of other Windows policies that might be relevant, that would be great. Brian thinks this problem may be due to a start-up race condition between the SCIDE and SCLANG processes. /Sten |
Update on this issue: the IT-support staff at my university have now seen that the policy "Audit Removable Storage" is in fact active on our systems. Just as @rjsuni noted above, when this policy is deactivated, the problem of Stuck at "Sending request..." goes away. So now I am back in business, finally! But it would be good to understand how to avoid the problem in the first place. |
i don't have an answer for this, but i did a dive into how the IDE and sclang talk to each other. here it is:
the key here is that so if sclang is unresponsive, or for some reason doesn't register that standard input, the help browser won't load. note that "Sending Request..." is programmed to go away if the sclang process finishes, but not if it hangs. it's a bit of bad UX, since it really means "the IDE already sent a request, and either sclang is currently working on it or sclang didn't hear it at all." A: if you can't run code in the IDE, and the help browser is stuck at "Sending Request", then the problem is not the help browser but some more general breakdown of sclang/scide IPC. B: if you can run code in IDE but the help browser is stuck at "Sending Request", then sclang somehow missed the initial call to edit: reading more carefully the above comments in this thread, it's not clear to me whether the people who have reported this issue are experiencing A or B. most of the Windows reports we've gotten on this (#4569, #4564, #4407, #3302) are A -- total IPC breakdown. i don't know if we've seen a confirmed B since 3.10, but i vaguely recall such issues in the 3.9 era. |
Thanks Nathan for looking into this. I can confirm that the problem is that we can NOT run code in the IDE once the Stuck condition is established. The code in the startup file, however, runs ok. This problem goes away if the Windows policy Audit Removable Storage is deactivated. (!!??)
Best of luck with that,
Sten
<Skickat från min mobil>
…---- Nathan Ho skrev ----
i don't have an answer for this, but i did a dive into how the IDE and sclang talk to each other. here it is:
- `Main::scProcess` is an instance of `ScProcess` which inherits from `QProcess`. it sends the signal `started()` after the process has started running.
- `HelpBrowser` listens for the `started` signal in the slot `onInterpreterStart`
- which calls `HelpBrowser::goHome`
- which calls `sendRequest("HelpBrowser.goHome")`
- which displays the "Sending Request..." message and calls `Main::scProcess()->evaluateCode("HelpBrowser.goHome")`
- which writes that code to the sclang process's standard input.
the key here is that `started()` is emitted immediately after `sclang` has started -- the help browser doesn't wait to check if `sclang` is finished booting, it just immediately pipes that into stdin and displays the "Sending request..." message.
so if sclang is unresponsive, or for some reason doesn't register that standard input, the help browser won't load. note that "Sending Request..." is programmed to go away if the sclang process finishes, but not if it hangs. it's a bit of bad UX, since it really means "the IDE already sent a request, and either sclang is currently working on it or sclang didn't hear it at all."
if you can't run code in the IDE, and the help browser is stuck at "Sending Request", then the problem is not the help browser but some more general breakdown of sclang/scide IPC.
if you *can* run code in IDE but the help browser is stuck at "Sending Request", then sclang somehow missed the initial call to `HelpBrowser.goHome`, which seems like a race condition.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#4214 (comment)
|
I've done some testing on my machine. Setting this policy does recreate this issue, but it's more strange than that, see below.
SC doesn't access removable storage on this machine to do anything on startup - everything's local. This is confirmed by the below observations:
So, it's not the help browser. It's something between the IDE and the language. It would be really helpful to know which editions of Windows are experiencing this issue. Is anyone experiencing this on Windows 10 Home? It's 100% repeatable on this machine - I'd expect a different success/failure rate if it was a race condition, but it does look like a deadlock between IDE and sclang?
EDIT: This post was written last night before Nathan's, but I only just got around to posting it this morning. I'm now more certain that, as Nathan suggests, the IPC isn't working, which only looks like a deadlock. I'll keep digging.. |
I'm using a university PC (Windows 10 Enterprise), but Audit Removable Storage is not enabled. The checkboxes for success and failure are not ticked. Still I can't run code in the IDE, and the help browser is stuck at "Sending Request". |
@jrsurge great thanks for the info. i'm trying to envision the next steps for debugging, what are your ideas? @panisterfatheroy interesting -- given the distant relationship between scide/sclang and the Audit Removable Storage option, it seems possible to me that there are other security settings on IT-restricted machines that break our IPC. for the sake of getting SC running, i believe this problem is specific to the IDE, and alternate editors like scvim and scel will work. you can also run sclang scripts from the command line. |
I installed the SuperCollider package in Atom editor. It was looking for sclang.exe here:
In the package settings I changed it to here (where it was installed) and it worked in Atom.
I then tried in SuperCollider IDE and it worked there also. But unfortunately I didn't try SC before I changed atom so I don't know if my changes fixed it or not. |
I am having the same issue on one Windows 10 laptop. I have checked the Group Policy setting described above and it is disabled. At first I thought that maybe my firewall was blocking connections, but it doesn't work with firewall disabled. On another Windows 10 Surface tablet it is working. Interestingly enough, in none of both computers I get sclang.exe working from the command line. It doesn't respond to any statements. Any suggestions on how to troubleshoot? I have done a procmon but I haven't found anything significant. |
Hi @titogarcia, thanks for the report. It may be that there are other settings that have the same result, but if we set the Audit Removable Storage policy, it is a guaranteed way for us to reproduce the issue - so it gives us a way to test. I'll hopefully have some time this week to look into the IPC breakdown. |
Thanks Clare! EDIT: Files to have open
Investigation still underway, but as an update, the steps involved in the IPC are:
In cases where the breakdown occurs, the Ongoing questions:
The |
miscellaneous thoughts from today's dev meeting:
|
OK, thanks for your efforts, and for letting me know.
I’m afraid I don’t have the know-how (nor time) to pursue this myself.
For the time being, the workaround of disabling the Windows system policy “Audit Removable Storage” seems to work for us .
Sten Ternström
KTH Royal Institute of Technology, Stockholm
From: Nathan Ho <notifications@github.com>
Sent: Sunday, 17 November 2019 19:18
To: supercollider/supercollider <supercollider@noreply.github.com>
Cc: sternsc <sten.ternstrom@tele2.se>; Mention <mention@noreply.github.com>
Subject: Re: [supercollider/supercollider] IDE can't run code on Windows, stuck at "Sending request...." (#4214)
miscellaneous thoughts from today's dev meeting:
* as seen in above comment, issue is in IDE and not sclang
* https://doc.qt.io/qt-5/qprocess.html#notes-for-windows-users
* attempt to rewrite QProcess with a lower-level subprocess API like popen, since this may be a bug in QProcess
* maybe there is some way to trace system calls in Windows?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#4214?email_source=notifications&email_token=AAXQZNBNNKYUSOUZBOHMYDTQUGDD7A5CNFSM4GLCSZY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEISKJI#issuecomment-554771749> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAXQZNAHTCCLW5J7JC2TA63QUGDD7ANCNFSM4GLCSZYQ> .
|
@sternsc we're using this github issue as a thread to discuss continued investigation of this bug -- if you don't want to receive notifications in your inbox, github allows you to unsubscribe. |
this fixes supercollider#4214 - the initial read of stdin was being lost while starting the async reading service
After a lot of staring, I think I found it. QProcess is all fine - it's writing to stdin on sclang ok. sclang wasn't reading from stdin properly, so it missed the initial commands from scide to setup the IPC, and it just goes downhill from there. The fix I have isn't elegant, but appears to work on my machines at least - it'll need testing on other machines. |
Add another user who is dead in the water: https://scsynth.org/t/complete-n00b-question/1547/4 -- Audit Removable Storage didn't help. What do we need to do to make @jrsurge 's fix testable on other machines? |
huge thanks to @jrsurge for tracking this one down! |
this fixes supercollider#4214 - the initial read of stdin was being lost while starting the async reading service
Environment
Steps to reproduce (for bugs)
Expected Behavior
SuperCollider will open, stick at Sending request for a second or two, then help will open.
Current Behavior
SuperCollider gets stuck at Sending request.....
Background
I work in an IT department at a University and SuperCollider was requested by one of our departments so they could use it for teaching. During testing the lecturer reported the issue. It took quite a while to track the policy down that was causing the problems, and I never expected it to be an audit policy that would cause it, weirdest bug I've seen so far. The policy is enabled from the Microsoft Security Baseline here (https://blogs.technet.microsoft.com/secguide/2018/04/30/security-baseline-for-windows-10-april-2018-update-v1803-final/), so this might cause problems for other organisations as well. At the moment we've disabled Audit Removable Storage, but if there's as better fix or workaround it would be good to get it out. Hopefully I've provided enough detail to recreate the issue.
The text was updated successfully, but these errors were encountered: