search for: o_nonblock

Displaying 20 results from an estimated 775 matches for "o_nonblock".

2019 Sep 15
4
ssh client is setting O_NONBLOCK on a pipe shared with other processes
The quick summary is that we invoke git from a parallel invocation of "make". Git invokes ssh to pull stuff from a remote repo. Ssh sets O_NONBLOCK on stdout and stderr if they do not refer to a tty. During our build, stderr refers to a pipe that other jobs run by make (and make itself) may also write to, and since this is a parallel build, they may write to that pipe while ssh has it in non-blocking mode. Make occasionally gets an unexpected...
2019 Sep 16
2
ssh client is setting O_NONBLOCK on a pipe shared with other processes
> ssh has to set NONBLOCK otherwise it can, well, block - there's > no way for ssh to know a priori how much data it can write to a fd. I don't know anything about how ssh is structured, but I think it must be a bit more complicated than that. Ssh only sets O_NONBLOCK on an fd if isatty(fd) returns false, so it's able to function with blocking input and output if the relevant descriptor refers to a tty (probably the usual case). On Sun, Sep 15, 2019 at 10:20 PM Damien Miller <djm at mindrot.org> wrote: > > On Sun, 15 Sep 2019, Doug Graham wrote...
2008 Feb 19
1
DLMFS on OracleVM 2.1 (OEL5.0 based)
...l machines on OracleVM. I want to use a wrapper around xm that spawns a deamon that keeps a file open in /dlm/DOMAIN. Now I played around a bit and followed the procedure in the document http://oss.oracle.com/projects/ocfs2/src/branches/ocfs2-1.2/dlmfs.txt for DLMFS. Theres one problem. The "O_NONBLOCK" option is not working. I have 2 nodes in my setup that have both mounted the /dlm as dlmfs and both have mounted a 5 GB OCFS2 test volume on FS SAN. I run the getlocks script below without O_NONBLOCK on node1 with a sleep of - eg - 30. Then I run - while the script is running on node1 - the...
2011 Oct 22
1
Creating a reverse socket often (not always) fails.
...: session_new: session 0 debug1: server_input_channel_open: confirm session debug1: server_input_channel_req: channel 2 request shell reply 0 debug1: session_by_channel: session 0 channel 2 debug1: session_input_channel_req: session 0 req shell debug2: fd 3 setting TCP_NODELAY debug2: fd 11 setting O_NONBLOCK debug3: fd 11 is O_NONBLOCK debug2: fd 13 setting O_NONBLOCK debug2: channel 2: read 702 from efd 13 debug2: channel 2: rwin 24540 elen 702 euse 1 debug2: channel 2: sent ext data 702 ------freezes here even though reverse connection is fine. //creating a good reverse connection, can connect to th...
2019 Sep 16
2
ssh client is setting O_NONBLOCK on a pipe shared with other processes
> Case in point; EAGAIN can come if you give your fd to another process > and continue using it yourself. > Short counts; It is documented behavior that read() and write() may > return short counts. It is not documented why, so you can not make > any assumptions. You might be right about short counts but if you're right about EAGAIN, there are bugs everywhere. My first
2002 May 06
2
X11 forwarding does not work as normal user
We installed openssh 3.1p1 on our Solaris 2.8 machine using gcc 2.95.2. During the installation, we modified ssh_config and sshd_config to enable X11 and agent forwarding. In sshd_config, we changed the following line to read: X11Forwarding yes In ssh_config, we changed the following two lines to read: ForwardAgent yes ForwardX11 yes Both files are set to permission readable
2019 May 25
2
[PATCH libnbd] states: connect_command: Don't set O_NONBLOCK on socket passed to child.
...} /* Parent. */ + close (sv[1]); + h->pid = pid; + + /* The socket must be set to non-blocking only in the parent, + * because the child may not be expecting a non-blocking socket. + */ + flags = fcntl (sv[0], F_GETFL, 0); + if (flags == -1 || + fcntl (sv[0], F_SETFL, flags|O_NONBLOCK) == -1) { + SET_NEXT_STATE (%.DEAD); + close (sv[0]); + return -1; + } + h->sock = nbd_internal_socket_create (sv[0]); if (!h->sock) { SET_NEXT_STATE (%.DEAD); + close (sv[0]); return -1; } - close (sv[1]); /* The sockets are connected already, we can jum...
2011 Nov 03
1
Help with CA Certificates for user authentication?
...failures 0 debug1: userauth-request for user test service ssh-connection method publickey debug1: attempt 1 failures 0 debug1: test whether pkalg/pkblob are acceptable debug1: temporarily_use_uid: 63203/54000 (e=0/0) debug1: trying public key file /etc/sshtest/authorized_keys debug1: fd 5 clearing O_NONBLOCK debug1: restore_uid: 0/0 debug1: temporarily_use_uid: 63203/54000 (e=0/0) debug1: trying public key file /etc/sshtest/authorized_keys debug1: fd 5 clearing O_NONBLOCK debug1: restore_uid: 0/0 Failed publickey for test from 172.31.43.3 port 2991 ssh2 debug1: userauth-request for user test service ss...
2017 Sep 25
2
[PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.
...Russell <rusty at rustcorp.com.au> > --- ... > > @@ -160,13 +166,14 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf, > goto out_unlock; > } > > + mutex_lock(&reading_mutex); I think this breaks O_NONBLOCK: we have hwrng core thread that is constantly pumps underlying rng for data; the thread takes the mutex and calls rng_get_data() that blocks until RNG responds. This means that even user specified O_NONBLOCK here we'll be waiting until [hwrng] thread releases reading_mutex before we can continu...
2017 Sep 25
2
[PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.
...Russell <rusty at rustcorp.com.au> > --- ... > > @@ -160,13 +166,14 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf, > goto out_unlock; > } > > + mutex_lock(&reading_mutex); I think this breaks O_NONBLOCK: we have hwrng core thread that is constantly pumps underlying rng for data; the thread takes the mutex and calls rng_get_data() that blocks until RNG responds. This means that even user specified O_NONBLOCK here we'll be waiting until [hwrng] thread releases reading_mutex before we can continu...
2016 Feb 09
2
Test Failure OpenSSH 7.1 P2 on HPE NSE for integrity
...sh-portable/regress/ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1 debug1: match: OpenSSH_7.1 pat OpenSSH* compat 0x04000000 debug2: fd 6 setting O_NONBLOCK debug2: fd 5 setting O_NONBLOCK debug1: Authenticating to 127.0.0.1:4242 as 'SUPER.SUPER' debug1: using hostkeyalias: localhost-with-alias debug3: hostkeys_foreach: reading file "/home/git/openssh-portable/regress/known_hosts" debug3: record_hostkey: found key type RSA in fil...
2019 Sep 16
2
ssh client is setting O_NONBLOCK on a pipe shared with other processes
...ke a bug in whatever make you're using, since > that could potentially occur in other circumstances too. What other circumstances? EAGAIN means that something put the device into non-blocking mode, and normally, that should only happen if the program calling write had itself previously set O_NONBLOCK. I don't think programs that don't set O_NONBLOCK are required to handle EAGAIN or short counts. They *may* need to deal with EINTR but signals don't come out of nowhere either and many programs run in an environment where EINTR is also unexpected. We are using GNU make 3.81 but newe...
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On Wed, Jul 15, 2020 at 03:32:55PM +0200, mwilck at suse.com wrote: > From: Martin Wilck <mwilck at suse.com> > > If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and > non-blocking read() to retrieve random data, it ends up in a tight > loop with poll() always returning POLLIN and read() returning EAGAIN. > This repeats forever until some process makes a blocking read() call. > The reason is that virtio_read() always returns 0 in...
2006 Nov 20
10
[Bug 1263] connection sharing often freezes
http://bugzilla.mindrot.org/show_bug.cgi?id=1263 Summary: connection sharing often freezes Product: Portable OpenSSH Version: v4.5p1 Platform: PPC OS/Version: Mac OS X Status: NEW Severity: major Priority: P2 Component: ssh AssignedTo: bitbucket at mindrot.org ReportedBy: vincent at
2017 Mar 03
2
[PATCH 1/2] Use gnulib set_nonblocking_flag function instead of fcntl.
The previous code: fcntl (fd, F_SETFL, O_NONBLOCK) was technically incorrect, because it would have reset any other flags on the file descriptor. Thanks: Eric Blake --- bootstrap | 1 + daemon/inotify.c | 6 ++++-- lib/conn-socket.c | 21 +++++++++++---------- m4/.gitignore | 9 +++++++++ 4 files changed, 25 insertions(+), 12 de...
2006 Feb 14
15
[Bug 1131] buffer_append_space: alloc not supported Error with V 4.2p1
http://bugzilla.mindrot.org/show_bug.cgi?id=1131 ------- Comment #5 from dtucker at zip.com.au 2006-02-14 22:17 ------- Also, what compiler did you use to compile OpenSSH? If you compile OpenSSH (and openssl and zlib if possible) with optimization disabled (-O0) does the error still occur? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On 11/08/2020 12:37, Philippe Mathieu-Daud? wrote: > You Cc'ed qemu-devel, so Cc'ing the virtio-rng maintainers. > > On 7/15/20 3:32 PM, mwilck at suse.com wrote: >> From: Martin Wilck <mwilck at suse.com> >> >> If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and >> non-blocking read() to retrieve random data, it ends up in a tight >> loop with poll() always returning POLLIN and read() returning EAGAIN. >> This repeats forever until some process makes a blocking read() call. >> The reason is that virtio_read() alw...
2019 May 25
1
Re: [PATCH libnbd] states: connect_command: Don't set O_NONBLOCK on socket passed to child.
...t; assert (h->argv[0]); >> - if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, >> - sv) == -1) { >> + if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, sv) == -1) { > > Is it any easier to keep SOCK_NONBLOCK here and then clear O_NONBLOCK in > the child process? It may matter if we try to port to a system that > lacks SOCK_CLOEXEC (SOCK_NONBLOCK and SOCK_CLOEXEC were added at the > same time). But we can deal with portability when someone reports a > problem. For now the patch looks fine. Hmm. Your use of SOCK_CLOEXEC...
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
...> reading_mutex. I think this cannot be interrupted by a kill because it's > in hwrng_fillfn() and it's kthread. > > - rng_buffer that is used in rng_dev_read() and can be interrupted (it > is also protected by reading_mutex) > > But if rng_dev_read() is called with O_NONBLOCK or interrupted and then > rng_fillbuf starts they can be mixed. > > We have also the first use of rng_buffer in add_early_randomness() that > use a different size than in rng_dev_read() with the same buffer (and > this size is 16 whereas the hwrng read API says it must be at least 3...
2019 May 25
0
Re: [PATCH libnbd] states: connect_command: Don't set O_NONBLOCK on socket passed to child.
...ssert (h->argv); > assert (h->argv[0]); > - if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, > - sv) == -1) { > + if (socketpair (AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, sv) == -1) { Is it any easier to keep SOCK_NONBLOCK here and then clear O_NONBLOCK in the child process? It may matter if we try to port to a system that lacks SOCK_CLOEXEC (SOCK_NONBLOCK and SOCK_CLOEXEC were added at the same time). But we can deal with portability when someone reports a problem. For now the patch looks fine. -- Eric Blake, Principal Software Engineer Red Ha...