"ssh-agent" lingers after close of msys window
Categories
(Firefox Build System :: MozillaBuild, task)
Tracking
(Not tracked)
People
(Reporter: swsnyder, Assigned: mhentges)
References
Details
(Whiteboard: [Workaround: Use "ssh-agent -k" to stop the process])
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•16 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.
Comment 2•16 years ago
|
||
"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 ?
Comment 3•16 years ago
|
||
This behavior hasn't changed with 1.3. I'm not likely to fix it anytime soon, but I'd take a patch.
Comment 4•16 years ago
|
||
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 ?
Comment 5•16 years ago
|
||
If you care a little, write a patch. I'm not going to fix this.
Comment 6•13 years ago
|
||
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.
Comment 7•13 years ago
|
||
(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.
Comment 8•10 years ago
|
||
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.
Assignee | ||
Comment 9•2 years ago
|
||
This will likely be solved by embracing the SSH client embedded into Windows itself.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 10•2 years ago
|
||
As of the MSYS2 migration, there's no longer a new ssh-agent
process for every new MozillaBuild terminal opened.
However, it still doesn't close the last one created when the terminal shuts off.
but I'm not sure what would need to be done to auto-kill ssh-agent when the terminal is closed.
I feel the same way: I'm not sure the best of rectifying this, or if it even makes to.
There's still the downside of MozillaBuild files being "in use" even after the terminal is closed (even then, this shouldn't hardly affect anyone unless they're uninstalling/reinstalling MozillaBuild).
Defaulting to Windows' SSH will resolve this issue further, since we're letting Windows manage the ssh-agent
lifecycle instead.
TL;DR: I don't think this is worth fixing, because now there's at most one ssh-agent.exe
, and even that will only be created if your Windows doesn't have SSH built-in.
Updated•1 year ago
|
Description
•