Re: CVS over SSH hangs

From: Dimitri Maziuk (dima@127.0.0.1)
Date: 05/10/02


From: Dimitri Maziuk <dima@127.0.0.1>
Date: Thu, 9 May 2002 22:09:43 +0000 (UTC)

begin 666 your_newsreader_is_broken
thus spake Richard E. Silverman:
>>>>>> "DM" == Dimitri Maziuk <dima@127.0.0.1> writes:
>
> DM> I bet it's a "feature" of OpenSSH where it won't close the
> DM> connection if remote program didn't close stdout(in,err) on
> DM> exit. That may be caused by a bug in the program, C library,
> DM> compiler, or OS kernel, but 12 times out of 10 it *is* a bug. I
> DM> dunno what OpenSSH folks are smoking...
>
> It is not a bug, and you misunderstand the issue.

I don't think so.

...The behavior of a
> process on the remote side on exit is immaterial; the question is whether
> there are processes left *running* and holding the fd's open while sshd
> waits for eof.

So which is it, process *running* or ssh *waiting for eof*?

The point is that if it's the latter, and process fails to
terminate *properly* (due to any or all of the above bugs)
and close stdout, that leaves ssh sitting there waiting for
eof where no eof is forthcoming.

I have a bunch of perl scripts (that sample various stats and
populate an RRDTool's database) that are run from cron every
5 minutes over ssh (to several servers). Every once in a while
one of them leaves the connection open (& the job stuck in
cron's run queue).

Since this only happens once in a while, I have to conclude
that it's an intermittent *bug* somewhere between openssh,
perl, rrdtool, shell, and Cthulhu knows what other parts of
the system.

I cannot tell whether it's ssh's method of detecting that
remote process is finished that's broken -- I'd have to UTSL,
and maybe I'll do that when I get a fresh supply of round
tuits (if ever).

Until that happens I'll refer to this as '"feature" of OpenSSH'.
I don't claim that the bug's in OpenSSH, I claim that so far
this feature seems to be causing more grief than it does good.

(When cron run queue fills up with defunct ssh jobs, no more
cron jobs get to run. Some of our cron jobs are mission-critical.
Oops.)

(That's Solaris; it's better than IRIX where cron run queue is
larger than process table, so when that fills up with defunct
ssh connections, you can't even login and kill them off.
Whoops.)

Dima

-- 
The wombat is a mixture of chalk and clay used for respiration.      -- MegaHal



Relevant Pages

  • Re: Connecting a remote workstation to a domain
    ... If you have more than a couple of remote workstations connecting to the SBS ... server via VPN, you really need to consider a Terminal Server in the main ... "Log in using a dial up connection" checkbox, ... roaming profile then synchronizes with the server over the VPN); ...
    (microsoft.public.windows.server.sbs)
  • Re: Connecting a remote workstation to a domain
    ... I can remotely join XP Pro computers at the remote ... connection" checkbox so that any user can logon remotely. ... "Log in using a dial up connection" checkbox, either way it loads her cached ... roaming profile then synchronizes with the server over the VPN); ...
    (microsoft.public.windows.server.sbs)
  • Re: autoRepeating Error log ID 20111 (Remote Access)
    ... PPPoE connection software on the server turns what could/should be a full ... >> A Demand Dial connection to the remote interface Small Business ... >> Event Type: Warning ... >> Event Source: MSSQL$SBSMONITORING ...
    (microsoft.public.windows.server.sbs)
  • RE: Remote Office Configuration Suggestions?
    ... Welcome to SBS newsgroup. ... I understand that you want to keep the remote office continue working even ... after the main internet connection on the main office is not available. ... If you want to join the remote server to a SBS domain and become a member ...
    (microsoft.public.windows.server.sbs)
  • Re: Problem with Web based client
    ... Seems like you are having problems accessing the web server on the PC you ... > My remote desktop connection works fine when I connect with a Remote ...
    (microsoft.public.windowsxp.work_remotely)