"ssh-agent" lingers after close of msys window

NEW
Unassigned

Status

task
11 years ago
2 years ago

People

(Reporter: swsnyder, Unassigned)

Tracking

(Blocks 1 bug)

Details

(Whiteboard: [Workaround: Use "ssh-agent -k" to stop the process])

(Reporter)

Description

11 years ago
In MozillaBuild v1.2 a copy of ssh-agent is spawned for each window (msys terminal) opened and lingers after the window is closed.

This wastes system RAM and diskspace (each copy of ssh-agent creates it's own set of temporary files).

In addition, this may or may not be related to a problem I see with generated files being held open and thus undeletable.  When I do a second build I often get an error that such-and-such file can't be overwritten because it is in use by another process.  That file was generated on the first build but is held open by either ssh-agent or msys itself.

The above behavior is seen when building with VS2005 on a fully -updated Win2K/SP4 system.

Comment 1

11 years ago
I experience exactly the same problem with Visual Studio Express 2008 on Windows XP SP3 RC2 Refresh (build 5508) with MozillaBuild v1.2.
"Same" with MozillaBuild 1.3 (on Win2K):

*This seems unrelated to Visual Studio:
 Starting <msys.bat> directly does it too.
*Opening first msys window (silently) starts "ssh-agent" (if not already running).
*Closing last msys window does not stop it.


(In reply to comment #0)
> In MozillaBuild v1.2 a copy of ssh-agent is spawned for each window (msys
> terminal) opened and lingers after the window is closed.

I get one "ssh-agent" process only, not one by opened window.
Could you confirm that this is fixed (for you) with MozillaBuild 1.3 ?

> In addition, this may or may not be related to a problem I see with generated
> files being held open and thus undeletable.

(I haven't build with ssh-agent running yet.)
Could you check if this is fixed with MozillaBuild 1.3 ?
OS: Windows 2000 → Windows XP
Whiteboard: [Workaround: Use "ssh-agent -k" to stop the process]
This behavior hasn't changed with 1.3. I'm not likely to fix it anytime soon, but I'd take a patch.
Bug 409114 comment 1:
[
From  ben turner [:bent]   2007-12-19 16:19:05 PDT

I guess the bad thing about this is that the single instance of ssh-agent will
live forever (until shutdown)... but it's pretty small so I dont think anyone
will really care.
]

If we care a little, could it be possible to have an option to stop it automatically ?
Depends on: 409114
If you care a little, write a patch. I'm not going to fix this.
OK.  Where it seems this actually does cause an issue is with the Windows 7 Task Manager.  I do a once a day build from mozilla-central including a list of extra patches scheduled via Windows 7 Task Manager.  Seems I end up with a number of ssh-agents equal to the number of days since the last Microsoft Tuesday (hence the last system reboot)  It seems the fact that this process gets killed when the user logs off does not occur for jobs run via the ask manager.  I added an "ssh-agent -k" to the end of the script my build process runs to try to fix this.
(In reply to Bill Gianopoulos from comment #6)
> OK.  Where it seems this actually does cause an issue is with the Windows 7
> Task Manager.  I do a once a day build from mozilla-central including a list
> of extra patches scheduled via Windows 7 Task Manager.  Seems I end up with
> a number of ssh-agents equal to the number of days since the last Microsoft
> Tuesday (hence the last system reboot)  It seems the fact that this process
> gets killed when the user logs off does not occur for jobs run via the ask
> manager.  I added an "ssh-agent -k" to the end of the script my build
> process runs to try to fix this.

Adding the 'ssh-agent -k' to the end of the script that my task manager scheduled task runs fixed the issue for me.
I'm open to working on this, but I'm not sure what would need to be done to auto-kill ssh-agent when the terminal is closed.
You need to log in before you can comment on or make changes to this bug.