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

Re: Hangs on password queries once SSH session is up


> Is is possible to get your client that we can do some testing
> here. We lack of example code for Windows :)

Folks,

I don't have the time just now to prepare my existing client code
for you make sense of, so I tried a different approach. I
modified client.c to run with my polling approach (because I run
the Windows main event loop, I can't use select() or similar
things to wait for TTY events, there is no TTY and no stdin, key
strokes come in via Windows events). The modified client.c uses
the same code, essentially, as my client's readSsh() function
where it hangs when it does. The idea is that the incoming
processing would be the same. The rest is irrelevant to the
problem at hand.

Anyway, the modified version is here (I had trouble with header
files, as usual, look for "HACK ALERT" in file):

   http://pages.infinit.net/leware/client.c

I compile and run it in a cygwin environment.

It connects, but hangs systematically, much like the problem I
occasionally see (except here it's systematic -- timing?). Right
now, it hangs in the following loop:

          while(channel && channel_is_open(channel) && channel_poll(channel,0))
          {
              printf("LEW: stdout has data\n");
              h = channel_read_nonblocking(channel,buffer,sizeof(buffer),0);
              ...
          }

When it hangs, I can get it going again by typing in another
session:

   date > /dev/pts/20

which drives the loop once more around. As if channel_poll()
returns true even when in fact there is no data, or it blocks
inside (either way, it's not what I expected).

Maybe you can have a look at this. I was trying to get client.c
to reproduce the hang as I see it with ftp and similar, but I'm
not there yet.

Cheers,
Pierre


References:
Re: Hangs on password queries once SSH session is upPierre Lewis <leware@xxxxxxxxxxxxxxxx>
Re: Hangs on password queries once SSH session is upAris Adamantiadis <aris@xxxxxxxxxxxx>
Re: Hangs on password queries once SSH session is upPierre Lewis <leware@xxxxxxxxxxxxxxxx>
Re: Hangs on password queries once SSH session is upAndreas Schneider <asn@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org