Displaying 20 results from an estimated 30 matches for "channel_still_open".
2001 Oct 25
2
SIGCHLD race *trivial* patch
...ld
apply to newer versions (which I've not tried).
Here's the gist: server_loop2() has a race condition with respect to
reception of SIGCHLD and checking/setting child_terminated. This patch
does two things: wait_until_can_do_something() adds a 1 second timeout
to select() IF AND ONLY IF (!channel_still_open) AND, server_loop2()
breaks out of its loop when there are no sessions left.
Blocking SIGCHLD before select()ing would not fix the problem, nor would
that be very portable.
So, summary of changes:
- session.h
Added prototype for session_still_used() boolean function.
- session.c
Added...
2001 Apr 05
1
bug in channel_still_open() ?
channel_still_open() does not count "larval" channels as open. If the server
sets up a protocol 2 connection with no remote command (as with "ssh -N ..."),
the "server-session" channel remains larval, and the server exits as soon as
it notices that there are no open channels besides thi...
2023 Nov 08
2
Delay in starting programs on FreeBSD via ssh after upgrade OpenBSD from 7.3 to 7.4
...39;s possible the timing attack mitigation interacts badly with
X11 forwarding. Could you try this patch? If you still have problems,
then please post another -vvv debug trace.
diff --git a/channels.c b/channels.c
index 1b310e3..111c808 100644
--- a/channels.c
+++ b/channels.c
@@ -886,6 +886,23 @@ channel_still_open(struct ssh *ssh)
return 0;
}
+/* Returns true if a channel with a TTY is open. */
+int
+channel_tty_open(struct ssh *ssh)
+{
+ u_int i;
+ Channel *c;
+
+ for (i = 0; i < ssh->chanctxt->channels_alloc; i++) {
+ c = ssh->chanctxt->channels[i];
+ if (c == NULL || c->type != SS...
2000 Aug 08
0
v2 connection logging vs v1
...a message when I exit my login
shell:
Closing connection to 130.207.167.32
However, when connecting with v2, it only ever logs:
Connection closed by remote host.
Tracing through the code, it appears that instead of breaking in
serverloop.c:server_loop2() at:
if (had_channel && !channel_still_open()) {
debug("!channel_still_open.");
break;
}
and returning to sshd.c:main() and logging the nice message, it continues
to process_input(), gets a len==0 from the read(), and does:
verbose("Connection closed by remote host.");
fatal_cleanup();
Comparing th...
2002 Jan 27
0
[PATCH] Add an exit delay to Openssh-3.0.2p1 for use in tunneling
.../* Add any selections by the channel mechanism. */
channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, rekeying);
@@ -343,7 +349,7 @@
FD_SET(fileno(stderr), *writesetp);
} else {
/* channel_prepare_select could have closed the last channel */
- if (session_closed && !channel_still_open() &&
+ if (session_status == SessionClose && !channel_still_open() &&
!packet_have_data_to_write()) {
/* clear mask since we did not call select() */
memset(*readsetp, 0, *nallocp);
@@ -367,7 +373,16 @@
* SSH_MSG_IGNORE packet when the timeout expires....
2001 Sep 28
1
[PATCH] fix for Linux hang on exit bug in 2.9.9p2
...* Add any selections by the channel mechanism. */
channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, rekeying);
@@ -343,11 +349,12 @@
FD_SET(fileno(stderr), *writesetp);
} else {
/* channel_prepare_select could have closed the last channel */
- if (session_closed && !channel_still_open()) {
+ if ((session_status == SessionClose)
+ && !channel_still_open()) {
if (!packet_have_data_to_write())
return;
} else {
- FD_SET(connection_in, *readsetp);
+ FD_SET(connection_in, *readsetp);
}
}
@@ -364,7 +371,17 @@
* SSH_MSG_IGNORE packet when the t...
2001 May 18
0
PATCH: implement delay (sleep) after last tunnelled connection exits
...xfdp, rekeying);
@@ -346,7 +350,15 @@
if (buffer_len(&stderr_buffer) > 0)
FD_SET(fileno(stderr), *writesetp);
} else {
- FD_SET(connection_in, *readsetp);
+ /* channel_prepare_select could have closed the last channel */
+ if ((session_status == SessionClose)
+ && !channel_still_open()) {
+ if (!packet_have_data_to_write()) {
+ return;
+ }
+ } else {
+ FD_SET(connection_in, *readsetp);
+ }
}
/* Select server connection if have data to write to the server. */
@@ -362,7 +374,16 @@
* SSH_MSG_IGNORE packet when the timeout expires.
*/
- if (select((*maxfd...
2001 Nov 14
6
[PATCH]: Patch to fix hang on exit bug under Linux and add optional exit delay
.../* Add any selections by the channel mechanism. */
channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, rekeying);
@@ -343,7 +349,7 @@
FD_SET(fileno(stderr), *writesetp);
} else {
/* channel_prepare_select could have closed the last channel */
- if (session_closed && !channel_still_open() &&
+ if (session_status == SessionClose && !channel_still_open() &&
!packet_have_data_to_write()) {
/* clear mask since we did not call select() */
memset(*readsetp, 0, *maxfdp);
@@ -367,7 +373,17 @@
* SSH_MSG_IGNORE packet when the timeout expires.
*...
2002 Mar 12
2
[Bug 160] Race condition in clientloop.c?
http://bugzilla.mindrot.org/show_bug.cgi?id=160
------- Additional Comments From Nicolas.Williams at ubsw.com 2002-03-13 09:10 -------
Created an attachment (id=40)
Debug output, lsof output, etc...
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
2001 Dec 17
0
SSH hanging
...E
debug1: channel 0: obuf empty
debug1: channel 0: output drain -> closed
debug1: channel 0: close_write
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel_free: channel 0: status: The following connections are
open:
#0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)
debug2: !channel_still_open.
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
---------------------------------
Prior to haning situation: (normal execution):
debug2: callback start
debug1: client_init id 0 arg 0
debug1: Se...
2001 Sep 05
2
sshd hangs on logout -- is this a bug?
In the changelog, there is an entry:
20001129
- (djm) Back out all the serverloop.c hacks. sshd will now hang again
if there are background children with open fds.
Does this mean that this is regarded as expected (and correct) behavior, that
should not change in the future, or does it mean that this behavior is a
known problem that someone will eventually fix?
--Adam
--
Adam McKenna
2002 Jan 31
0
[Bug 89] New: [PATCH] make the Waiting for forwarded connecti ons to terminate... message more helpful
...message a bit more helpful to the less
experienced user.
diff -u -r openssh-3.0p1-orig/serverloop.c openssh-3.0p1/serverloop.c
--- openssh-3.0p1-orig/serverloop.c Fri Oct 12 02:35:06 2001
+++ openssh-3.0p1/serverloop.c Thu Nov 8 18:12:10 2001
@@ -557,7 +557,7 @@
if (!channel_still_open())
break;
if (!waiting_termination) {
- const char *s = "Waiting for forwarded
connectio
ns to terminate...\r\n";
+ const char *s = "Waiting for forwarded
connectio
ns...
2002 Sep 26
0
more on rsync error: unexplained error (code 255) at main.c(925)
...en->closed
debug1: channel 0: close_read
debug1: channel 0: send close
debug1: channel 0: full closed2
debug1: channel_free: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)
debug1: channel_free: channel 0: dettaching channel user
debug2: !channel_still_open.
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 14.5 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status -1
rsync error: unexplained error (code 255) at main.c(925)
_exit_cleanup(code=255, file=main.c, line=925): about to call exit(255)
I've tried...
2001 Feb 20
0
sftd problem on Tru64 Unix
...ad
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: full closed2
debug: channel_free: channel 0: status: The following connections are
open:
#0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)
debug: !channel_still_open.
debug: Transferred: stdin 0, stdout 0, stderr 0 bytes in 2.3 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug: Exit status -1
Couldn't read packet: Bad file descriptor
2000 Jun 12
2
problems with scp
I have an openssh server running on solaris 7 and the client running on
a clean RH linux 6.1 box. I am using the latest release (2.1.1p1 -- i
had the known solaris utmp problem and the read_key problem when using
2.1.0p2 so i upgraded).
scp from the linux machine to solaris machine gives a "lost connection"
message
[root at dog /root]# scp foo.bar solmachine:/tmp/
lost connection
the
2002 Mar 11
1
scp completes but ssh subprocess in deadlock with sshd
I've just built openssh 3.1 for my Redhat 5.1 system (running on a 486
DX-66) using the latest zlib and openssl libraries.
Connecting to the machine with ssh seems to work fine (although it takes a
while to initiate a connection).
But when I transfer a file to the machine with scp, it seems to work fine
and the scp completes, but an ssh sub-process remains behind on the client
and an sshd
2000 Jun 13
2
SCP Problems.
...ad
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: full closed2
debug: channel_free: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)
debug: !channel_still_open.
debug: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.8 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug: Exit status 127
debug: compress outgoing: raw data 656, compressed 615, factor 0.94
debug: compress incoming: raw data 103, compressed 96, factor 0.93
lost connect...
2000 Aug 07
1
X11-Forwarding OpenSSH 2.1.1p4 problem
...ad
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: full closed2
debug: channel_free: channel 0: status: The following connections are
open:
#0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)
debug: !channel_still_open.
Connection to saturn closed.
debug: Transferred: stdin 0, stdout 0, stderr 30 bytes in 59.7 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.5
debug: Exit status 1
------------------------------------------------------------------------
Does anybody know, where I've done a mi...
2000 Nov 12
0
scp problems?
...taching channel user
debug1: session_by_channel: session 0 channel 0
debug1: session_close_by_channel: channel 0 kill 6864
debug1: Received SIGCHLD.
debug1: tvp!=NULL kid 1 mili 100
error: select: Bad file descriptor
debug1: session_by_pid: pid 6864
debug1: session_free: session 0 pid 6864
debug1: !channel_still_open.
Closing connection to 128.2.xx.xxx
debug1: compress outgoing: raw data 400, compressed 312, factor 0.78
debug1: compress incoming: raw data 165, compressed 129, factor 0.78
$
Both the sender and receiver were compiled with the following
configuration:
--with-kerberos4
--with-afs=/usr...
2000 Nov 22
0
fds closed after SIGCHLD bug still in newest version
...ad
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: full closed2
debug: channel_free: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)
debug: !channel_still_open.
debug: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug: Exit status 0