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
before booting, find zombie servers, stop and advise if needed. #2524
Conversation
@rukano |
does this overlap with the other improvements? |
It sort of does - prPingApp and findZombies essentially do the same thing, |
in prPingApp, why do the sync command by hand? |
I think better replace prPingApp by |
ok: More general rethinking: classvar <>allowAlienServers = true; if allowAlienServers is true,
|
|
It's starting to sound like improvising workarounds for a fairly large set of cases, instead of analyzing the possible cases and deliberately designing the cleanest solution. My gut feeling is, it's time to back off from code and work up a proper spec. Then the code will be easier to write. |
It is often the case for me that the other server was started by a
different process.
I am planning to add an option to supercollider.js at some point that would
offer different strategies when you encounter a conflict.
fail
kill
steal
Um.. maybe with nicer names.
The other option is to just find a free port and use that. You can query
the port to see if it's in use.
…On Sat, Dec 3, 2016 at 11:45 AM Alberto de Campo ***@***.***> wrote:
ok:
on local servers, one can preferentially use pidRunning for status
watching,
and use status messages to assess server responsiveness by network.
on remote servers, it has to be status messages is any case.
More general rethinking:
A pinged server may either be a zombie (assuming that There Can Be Only
One),
or a legitimate other scsynth process started by someone else that uses
the same default port.
In case 2, quit and reboot (as boot now does) shoot another app in the
foot.
How about having a flag in the Server class:
classvar <>allowAlienServers = true;
if allowAlienServers is true,
- server politely finds the next free port number and uses that,
(much like sclang already does when booting), and
- else assume they are zombies, and do quit and boot as is.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2524 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AANWckYM0u3PtAQ-3bKj-eXkEyCuTJ5Zks5rEVZOgaJpZM4LC82K>
.
|
A question: when I start a server with a Because now with the new refactored server, we already get a cleaner quit when the server is killed externally. |
more later, adc |
// possible server boot scenarios to support
a. Default - single app, single scsynth
b. Multiple apps use scsynth/supernova processes (SuperCollider.app, supercollider.js, etc)
c. single app uses multiple parallel scsynth/supernova processes
Logic of Server.boot:
in single app/scsynth scenario, in multiple apps case in parallel scsynths case in Network Music setups
|
Tangentially related: I just had a sclang crash with supernova booted. After relaunching sclang, I first hit "Kill all servers" in the menu, then booted the server, and it told me the client ID was taken. Huh? I think if I kill all servers, it ought to reset everything, shouldn't it? Good workflow:
Silly workflow: |
Damn mobile. Anyway. Silly workflow:
|
s.boot can end in a complicated hang when there is a zombie server.
This happens e.g. after sclang crashed, or after hard interpreter reboot:
s.boot fails with "Exception in World_OpenUDP: bind: Address already in use ",
and s. will not reboot because it thinks it is already booting.
This PR checks whether there is already a server responding at the desired address and port,
and if so, informs about it. Reproducer:
So one knows what to do.