Re: Timing out a channel exec request

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Right now, the machine I'm experimenting against is running OpenSSH 5.5.

I'm sending SSH2_MSG_CHANNEL_EOF right after I send the exec request,
because I have nothing further to say.

SSH2_MSG_CHANNEL_CLOSE gets sent at the time that the timeout condition is
detected.

I would expect the server to clean up and reply with
SSH2_MSG_CHANNEL_CLOSE, but the process remains open and I never do get a
SSH2_MSG_CHANNEL_CLOSE reply.

When I eventually tear the whole session down, the process gets wiped out
then.

    - Tim.

On 2/6/14 2:12 PM, "Damien Miller" <djm@xxxxxxxxxxx> wrote:

>On Thu, 6 Feb 2014, Tim Broberg wrote:
>
>> Is anyone aware of a method to force termination of a single channel
>> without waiting for the associated process to complete?
>
>I think SSH2_MSG_CHANNEL_EOF then SSH2_MSG_CHANNEL_CLOSE might do what
>you want.
>
>> - SSH2_MSG_CHANNEL_CLOSE results in a long polling loop where sshd keeps
>> trying to garbage collect the channel, but can't because the process is
>> still alive. Furthermore, this appears to be stalling the other commands
>> as well. (More experimentation is needed on this point.)
>
>The server shouldn't hang while processing a close.
>
>>  - I could try a SSH_MSG_CHANNEL_REQUEST "signal" and send SIGINT,
>> SIGTERM, SIGABRT, etc, but I don't see a handler for "signal" in the
>> server loop.
>
>No we don't support sending signals. There are patches on
>https://urldefense.proofpoint.com/v1/url?u=https://bugzilla.mindrot.org/sh
>ow_bug.cgi?id%3D1424&k=vE6vJ%2F6us6MO2E%2BCdRJaLw%3D%3D%0A&r=CFOVYS%2Bpq34
>MoQdIh9mGy2v3juvm16uSvL2B2p9WKsQ%3D%0A&m=lwQZAeTp8nvxoDCauob1wrKWF%2FBMGa8
>GWy6P15rmk04%3D%0A&s=0cac9f89eacfc4ea8547a46a88fe6027f645bbf485232537dc7a3
>7ec3e36d760 but we're worried
>about possible problems of sshd signalling processes it shouldn't.
>
>-d
>

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux