ssh-agent doesn't die
Ken Brown
kbrown@cornell.edu
Fri Sep 27 23:18:00 GMT 2019
On 9/27/2019 10:27 AM, Vanda Vodkamilkevich wrote:
> Le ven. 27 sept. 2019 à 16:13, Ken Brown <kbrown@cornell.edu> a écrit :
>
>> On 9/27/2019 9:37 AM, Norton Allen wrote:
>>> On 9/26/2019 10:50 PM, Ken Brown wrote:
>>>>
>>>>> As a simple test example, consider:
>>>>>
>>>>> /bin/ssh-agent /bin/sleep 10
>>>>>
>>>>> While the sleep is still running, ps shows:
>>>>>
>>>>> PID PPID PGID WINPID TTY UID STIME
>> COMMAND
>>>>> 1694 1693 1694 1576 ? 22534 00:01:10
>>>>> /usr/bin/ssh-agent
>>>>> 1653 1 1653 11740 cons1 22534 00:00:37
>> /usr/bin/bash
>>>>> 1693 1653 1693 1552 cons1 22534 00:01:10
>> /usr/bin/sleep
>>>>>
>>>>> One oddity is that ssh-agent is listed as a subprocess of sleep
>>>> ...but this isn't a bug. ssh-agent forks, and then the parent execs
>> the command.
>>>
>>> With the salient difference presumably being that the exec is done in
>> the parent
>>> instead of the child as usual?
>>
>> Yes. The idea is that 'ssh-agent command' should be more-or-less
>> equivalent to
>> running 'command', with ssh-agent running as a subprocess.
>>
>> The ssh-agent subprocess periodically checks to see if its parent is still
>> alive, and it exits when the parent has died. Someone should figure out
>> why
>> this is not working on Cygwin.
>
> Hi,
> this may probably be not fully related but I see from time to time a
> strange behavior of ssh-agent (running in the background and initially
> started by keychain launched in .bashrc) : the agent is running wild (25%
> of cpu and never responding). It seems to occur (not systematically) when
> network is disconnected and reconnected (this is on a laptop often removed
> from the docking system). Do you have any idea how to diagnose the issue
> more precisely?
Sorry, but I'm not an expert on ssh-agent. Everything I said above is based on
doing an internet search and looking briefly at the ssh-agent source code.
My only suggestion would be to attach gdb to the process when it starts running
wild and see if you can figure out why it's inf-looping. If you don't know how
to do this, someone who does know would have to be able to reproduce the problem.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list