search for: shut_wr

Displaying 20 results from an estimated 53 matches for "shut_wr".

2015 Dec 30
2
sieve-filter to script fails with SHUT_WR
...m pretty sure it's not the configuration...) I'm passing the email using stdin/stdout and _not_ using sockets. My script receives the email and processes it, but the filter process fails: lda(<username>): Error: shutdown(/usr/local/lib/dovecot-sieve/sieve-filter/CleanAttachments.py, SHUT_WR) failed: Socket is not connected lda(<username>): Error: sieve: 20-filter-incoming: line 15: filter action: failed to execute to program `CleanAttachments.py' Not sure, what I'm doing wrong... Thanks, Mark $ doveconf -n # 2.2.21 (5345f22): /usr/local/etc/dovecot/dovecot.conf # Pige...
2020 Mar 30
4
[libnbd PATCH 0/2] fix hangs against nbdkit 1.2
...a server with the same behavior as the older nbdkit, at which point both 'cd /path/to/libnbd && make check PATH=/path/to/nbdkit' and 'cd /path/to/nbdkit && /path/to/libnbd/run make check' will hang without this series. In short, this series is restoring the shutdown(SHUT_WR) call that got lost from plugins/nbd/nbd.c when nbdkit switched to libnbd in commit ab7760fc. Eric Blake (2): sockets: Add .shut_writes callback states: Add state for shutdown/gnutls_bye after NBD_CMD_DISC lib/internal.h | 4 +++- generator/state_machine.ml | 19 ++++...
2020 Mar 28
0
[nbdkit PATCH v2] nbd: Avoid stuck poll() in nbdplug_close_handle()
...the wrong libnbd API (synchronous instead of async), which often results in: nbd .close nbd reader server nbd_shutdown poll - send NBD_CMD_DISC receive NBD_CMD_DISC shutdown(SHUT_WR) wake up on EOF nbd_aio_notify_read - move state to CLOSED nbd_aio_is_dead -> true break loop - poll pthread_join close fds nbd_close...
2023 Aug 31
0
[RFC PATCH v2 2/2] test/vsock: shutdowned socket test
On Sat, Aug 26, 2023 at 08:59:00PM +0300, Arseniy Krasnov wrote: >This adds two tests for 'shutdown()' call. It checks that SIGPIPE is >sent when MSG_NOSIGNAL is not set and vice versa. Both flags SHUT_WR >and SHUT_RD are tested. > >Signed-off-by: Arseniy Krasnov <avkrasnov at salutedevices.com> >--- > tools/testing/vsock/vsock_test.c | 138 +++++++++++++++++++++++++++++++ > 1 file changed, 138 insertions(+) Reviewed-by: Stefano Garzarella <sgarzare at redhat.com> >...
2002 Apr 03
4
Patch to avoid 'Connection reset by peer' error for rsync on cygwin
...;\n", line); - return -1; + goto exitwithnomodule; } i = lp_number(line); if (i == -1) { io_printf(fd,"@ERROR: Unknown module '%s'\n", line); - return -1; + goto exitwithnomodule; } } return rsync_module(fd, i); + +exitwithnomodule: + shutdown(fd,SHUT_WR); + close(fd); + return -1; } END PATCH
1999 Dec 21
0
Problem with UTMP recording
..._XXX */ #endif #ifdef HAVE_UTMPX_H # include <utmpx.h> /* For _PATH_XXX */ #endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> /* For timersub */ #endif #ifdef HAVE_MAILLOCK_H #include <maillock.h> #endif #ifndef SHUT_RDWR enum { SHUT_RD = 0, /* No more receptions. */ SHUT_WR, /* No more transmissions. */ SHUT_RDWR /* No more receptions or transmissions. */ }; # define SHUT_RD SHUT_RD # define SHUT_WR SHUT_WR # define SHUT_RDWR SHUT_RDWR #endif /* If sys/types.h does not supply intXX_t, supply them ourselves */ /* (or die trying) */ #ifndef HAVE_INTXX_T # i...
2001 Jan 09
3
OpenSSH on Reliant UNIX
...ong" (or so). I think this is a bug in the - commercial and expensive - compiler. I didn't try gcc on that platform, yet. No, I didn't try 0.9.6, yet. 2. scp will hang after the file transfer(s) The "fix" is to change the line 495 in serverloop.c from shutdown(fdin, SHUT_WR); to shutdown(fdin, SHUT_RDWR); The same which I did in 2.1.1. 3. X11 forwarding does just work for standard X clients - if you configure it with --with-ipaddr-display - but not for all X applications. The reason is that Siemens is using a named pipe in /tmp/.X11-unix for X communicati...
2000 Jul 03
1
Antwort: Re: sshd does not exit after scp (hpux 11.00 / ssh 2.1 .1p1)
...this issue? I've included an older > message that has a stack trace, which if I recall was still the same in > 2.1.1p1. I can provide a newer trace or additional information if > needed. not really... On a non-trusted system with HP AnsiC it seems to work if changing shutdown(fdin, SHUT_WR) to shutdown(fdin, SHUT_RDWR) in serverloop.c (lines 320 & 464) On a trusted system with gcc however this does not seem to have any effect. Here I use #define USE_PIPES 1 in includes.h as workaround I think I will have to do some more checks with compilers/(non-)trusted systems... Or any ot...
2020 Mar 27
4
[nbdkit PATCH 0/2] Improve shutdown race in nbd plugin
...race, or else determine that I also need to augment the loop condition in the reader thread to additionally break out of the loop when the pipe-to-self sees EOF even when nbd_aio_is_dead() has not yet been satisfied I'm also fairly confident that I'll need to patch libnbd to call shutdown(SHUT_WR) on plaintext and gnutls_bye(GNUTLS_SHUT_WR) on TLS connections after sending NBD_CMD_DISC, as that is something we lowt when the nbd plugin switched to libnbd, even after documenting in commit 430f8141 why it is important for preventing shutdown deadlocks. Eric Blake (2): nbd: Don't referen...
2018 Nov 08
1
[nbdkit PATCH] nbd: Fix race during close
...le changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c index b9a4523..9130642 100644 --- a/plugins/nbd/nbd.c +++ b/plugins/nbd/nbd.c @@ -575,9 +575,9 @@ nbd_close (void *handle) nbd_request_raw (h, 0, NBD_CMD_DISC, 0, 0, 0, NULL); shutdown (h->fd, SHUT_WR); } - close (h->fd); if ((errno = pthread_join (h->reader, NULL))) nbdkit_debug ("failed to join reader thread: %m"); + close (h->fd); pthread_mutex_destroy (&h->write_lock); pthread_mutex_destroy (&h->trans_lock); free (h); -- 2.17.2
2016 Apr 12
0
[RFC v5 0/5] Add virtio transport for AF_VSOCK
...ALLOC:00040000 FWD_CNT:0000005e Guest replies with the answer to the request RX: =>SRC:00000002.00010002 DST:00000003.00000948 RX: LEN:00000000 TYPE:0001 OP:4=SHUTDOWN RX: FLAGS:00000002 BUF_ALLOC:00008000 FWD_CNT:00000091 Host has sent its only request, so host app must have done shutdown(SHUT_WR) I suppose and host therefore sends SHUTDOWN_TX. TX: <=SRC:00000003.00000948 DST:00000002.00010002 TX: LEN:00000000 TYPE:0001 OP:4=SHUTDOWN TX: FLAGS:00000001 BUF_ALLOC:00040000 FWD_CNT:0000005e Guest SHUTDOWN_RX. I'm not sure if this is a direct kernel response to the SHUTDOWN_TX or if...
2019 Jul 25
1
Re: [PATCH libnbd] lib: Kill subprocess in nbd_close.
...one or both directions of traffic are no longer needed, making this asynchronous handling in close() much faster. At least nbdkit is known to react favorably to a shutdown() request - see nbdkit commit 430f8141. We may want to add h->sock->ops->shutdown() (especially if we want to handle SHUT_WR through adding more states for more graceful shutdown paths, including when TLS is involved), but even in the short-term, something as simple as adding shutdown(h->fd, SHUT_RDWR) immediately before the s->sock->ops->close() would be helpful. That said, I think we want a two-pronged app...
2016 Apr 12
2
[RFC v5 0/5] Add virtio transport for AF_VSOCK
On Mon, Apr 11, 2016 at 03:54:08PM +0300, Michael S. Tsirkin wrote: > On Mon, Apr 11, 2016 at 11:45:48AM +0100, Stefan Hajnoczi wrote: > > On Fri, Apr 08, 2016 at 04:35:05PM +0100, Ian Campbell wrote: > > > On Fri, 2016-04-01 at 15:23 +0100, Stefan Hajnoczi wrote: > > > > This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). > > > > >
2016 Apr 12
2
[RFC v5 0/5] Add virtio transport for AF_VSOCK
On Mon, Apr 11, 2016 at 03:54:08PM +0300, Michael S. Tsirkin wrote: > On Mon, Apr 11, 2016 at 11:45:48AM +0100, Stefan Hajnoczi wrote: > > On Fri, Apr 08, 2016 at 04:35:05PM +0100, Ian Campbell wrote: > > > On Fri, 2016-04-01 at 15:23 +0100, Stefan Hajnoczi wrote: > > > > This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). > > > > >
2016 Jan 04
0
Released Pigeonhole v0.4.11.rc1 for Dovecot v2.2.21
...e performed when re-parsing the message. - LDA Sieve plugin: Fixed logging of actions; sometimes the configured log format was not followed. - LDA Sieve plugin: Fixed bug in error handling of script storage initialization. - Sieve Extprograms plugin: Ignored ENOTCONN error in shutdown(fd, SHUT_WR) call. - Fixed duplication of discard actions in the script result. Each discard was counted as a separate action, which means that action limit would be crossed too early. - Made sure that quota errors never get logged as errors in syslog. - Fixed handling of implicit keep for a partially exec...
2016 Jan 08
0
Released Pigeonhole v0.4.11 for Dovecot v2.2.21
...e performed when re-parsing the message. - LDA Sieve plugin: Fixed logging of actions; sometimes the configured log format was not followed. - LDA Sieve plugin: Fixed bug in error handling of script storage initialization. - Sieve Extprograms plugin: Ignored ENOTCONN error in shutdown(fd, SHUT_WR) call. - Fixed duplication of discard actions in the script result. Each discard was counted as a separate action, which means that action limit would be crossed too early. - Made sure that quota errors never get logged as errors in syslog. - Fixed handling of implicit keep for a partially exec...
2020 Mar 30
0
Re: [libnbd PATCH 0/2] fix hangs against nbdkit 1.2
...H=/path/to/nbdkit' Making the obvious correction: cd /path/to/libnbd && make check PATH=/path/to/nbdkit:$PATH > and 'cd /path/to/nbdkit && > /path/to/libnbd/run make check' will hang without this series. > > In short, this series is restoring the shutdown(SHUT_WR) call that got > lost from plugins/nbd/nbd.c when nbdkit switched to libnbd in commit > ab7760fc. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
2016 Jan 04
0
Released Pigeonhole v0.4.11.rc1 for Dovecot v2.2.21
...e performed when re-parsing the message. - LDA Sieve plugin: Fixed logging of actions; sometimes the configured log format was not followed. - LDA Sieve plugin: Fixed bug in error handling of script storage initialization. - Sieve Extprograms plugin: Ignored ENOTCONN error in shutdown(fd, SHUT_WR) call. - Fixed duplication of discard actions in the script result. Each discard was counted as a separate action, which means that action limit would be crossed too early. - Made sure that quota errors never get logged as errors in syslog. - Fixed handling of implicit keep for a partially exec...
2016 Jan 08
0
Released Pigeonhole v0.4.11 for Dovecot v2.2.21
...e performed when re-parsing the message. - LDA Sieve plugin: Fixed logging of actions; sometimes the configured log format was not followed. - LDA Sieve plugin: Fixed bug in error handling of script storage initialization. - Sieve Extprograms plugin: Ignored ENOTCONN error in shutdown(fd, SHUT_WR) call. - Fixed duplication of discard actions in the script result. Each discard was counted as a separate action, which means that action limit would be crossed too early. - Made sure that quota errors never get logged as errors in syslog. - Fixed handling of implicit keep for a partially exec...
2023 Aug 31
0
[RFC PATCH v2 1/2] vsock: send SIGPIPE on write to shutdowned socket
On Sat, Aug 26, 2023 at 08:58:59PM +0300, Arseniy Krasnov wrote: >POSIX requires to send SIGPIPE on write to SOCK_STREAM socket which was >shutdowned with SHUT_WR flag or its peer was shutdowned with SHUT_RD >flag. Also we must not send SIGPIPE if MSG_NOSIGNAL flag is set. > >Signed-off-by: Arseniy Krasnov <avkrasnov at salutedevices.com> >--- > net/vmw_vsock/af_vsock.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Stefano G...