search for: ewouldblock

Displaying 20 results from an estimated 81 matches for "ewouldblock".

2000 Jul 06
2
2.1.1p2 HP-UX 11 timing error
FYI in order to get 2.1.1p2 to work on my HP-UX 11.0 systems I had to patch atomicio.c for EWOULDBLOCK (HP read() does not give the POSIX return code). The new atomicio() is a clean fix for this timing problem; all it needs now is this one little tweak. Also had the "General Commercial Security" error (PAM_TERM_ERROR from pam_acct_mgmt()) which I have very crudely addressed for now by hac...
2008 May 21
11
[Bug 1467] New: SFTP stalls
...Priority: P2 Component: ssh AssignedTo: bitbucket at mindrot.org ReportedBy: sconeu at yahoo.com This issue was first noted on SFTP, but the cause was down in the spawned ssh process. On some systems (e.g. HP NonStop), read or write to a nonblocking socket will fail with EWOULDBLOCK instead of EAGAIN. The code in channels.c does not handle EAGAIN, causing the socket to be closed, but the parent process does not recieve notification, leading to a stall. in channel_handle_[erw]fd, the calls to read/write should check for EWOULDBLOCK as well as EAGAIN: e.g, in channel_handle_w...
2015 Mar 11
2
Notes on building a gcc toolchain for Rtools (but not multilib)
...e found the problem now, and it will be easy to fix. In case anyone else finds this thread, here's the problem: The regular Windows internet code (not internet2) used the Winsock interface. It returns different error codes than the Unix sockets interface. Some error codes are ignorable (EWOULDBLOCK and EINPROGRESS); these are WSAEWOULDBLOCK and WSAEINPROGRESS in Winsock. We had code like #ifndef EWOULDBLOCK # define EWOULDBLOCK WSAEWOULDBLOCK #endif so our code could work with the Unix macro names. However, the new toolchain defines both EWOULDBLOCK and WSAEWOULDBLOCK, so t...
2015 Dec 10
0
[Bug 1467] improper handling of EWOULDBLOCK on HP
https://bugzilla.mindrot.org/show_bug.cgi?id=1467 Marc Aurele La France <tsi at tuyoix.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tsi at tuyoix.net -- You are receiving this mail because: You are watching the assignee of the bug.
2007 Sep 20
2
[Bug 1366] New: atomicio doesn't poll()
...ucket at mindrot.org ReportedBy: ben at psc.edu Created an attachment (id=1355) --> (http://bugzilla.mindrot.org/attachment.cgi?id=1355) Patch to fix atomicio and atomiciov non-polling spin atomicio contains the following in the read/write loop: ----- case -1: #ifdef EWOULDBLOCK if (errno == EINTR || errno == EWOULDBLOCK) #else if (errno == EINTR) #endif continue; if (errno == EAGAIN) { (void)poll(&pfd, 1, -1);...
2007 Sep 15
0
PATCH: atomicio doesn't poll()
atomicio contains the following in the read/write loop: ----- case -1: #ifdef EWOULDBLOCK if (errno == EINTR || errno == EWOULDBLOCK) #else if (errno == EINTR) #endif continue; if (errno == EAGAIN) { (void)poll(&pfd, 1, -1);...
2019 Jun 09
0
[PATCH libnbd] states: In recv_into_rbuf and send_from_wbuf loop until EAGAIN.
.../ - if (h->rbuf) { - rbuf = h->rbuf; - rlen = h->rlen; - } - else { - rbuf = &buf; - rlen = h->rlen > sizeof buf ? sizeof buf : h->rlen; - } - - r = h->sock->ops->recv (h, h->sock, rbuf, rlen); - if (r == -1) { - if (errno == EAGAIN || errno == EWOULDBLOCK) - return 1; /* more data */ - /* sock->ops->recv called set_error already. */ - return -1; - } - if (r == 0) { - set_error (0, "recv: server disconnected unexpectedly"); - return -1; - } + r = h->sock->ops->recv (h, h->sock, rbuf,...
2015 Mar 11
0
Notes on building a gcc toolchain for Rtools (but not multilib)
...d it will be easy to fix. In case > anyone > else finds this thread, here's the problem: > > The regular Windows internet code (not internet2) used the Winsock > interface. It returns different error codes than the Unix sockets > interface. Some error codes are ignorable (EWOULDBLOCK and > EINPROGRESS); these are WSAEWOULDBLOCK and WSAEINPROGRESS in Winsock. > We had code like > > #ifndef EWOULDBLOCK > # define EWOULDBLOCK WSAEWOULDBLOCK > #endif > > so our code could work with the Unix macro names. However, the new > toolchain defines...
2012 May 23
4
Possible error restoring machine
...hat we can call pagebuf_get or just load other pages (see following "goto loadpages;" line). Now we could ending up calling xc_tmem_restore/xc_tmem_restore_extra (xc_tmem.c) which call read_extract (xc_private.c) on the same non blocking socket/file but read_extract does not handle EAGAIN/EWOULDBLOCK (both can be returned on non blocking socket depending on file type and Unix/Linux version) leading to a failure. Does this make sense or is it impossible ?? Also note that rdexact (xc_domain_restore.c) handle data timeout but we can still block in read_exact called by xc_tmem_restore/xc_tmem_rest...
2019 Jun 09
2
[PATCH libnbd] states: In recv_into_rbuf and send_from_wbuf loop until EAGAIN.
I thought this should produce a fairly dramatic performance gain. In fact I couldn't measure any performance difference at all. I think what's happening is we're actually paying an extra syscall (to discover the socket would block) and then doing the poll anyway. So I don't know if it's worth having this patch. It could be argued that it makes the code shorter (therefore
2015 Mar 11
2
Notes on building a gcc toolchain for Rtools (but not multilib)
...case > > anyone > > else finds this thread, here's the problem: > > > > The regular Windows internet code (not internet2) used the Winsock > > interface. It returns different error codes than the Unix sockets > > interface. Some error codes are ignorable (EWOULDBLOCK and > > EINPROGRESS); these are WSAEWOULDBLOCK and WSAEINPROGRESS in Winsock. > > We had code like > > > > #ifndef EWOULDBLOCK > > # define EWOULDBLOCK WSAEWOULDBLOCK > > #endif > > > > so our code could work with the Unix macro names. Ho...
2005 Feb 01
3
X100P Clone
...unction in: /usr/src/asterisk/channels/chan_modem.c int ast_modem_send(struct ast_modem_pvt *p, char *cmd, int len) { int i; usleep(5000); if (!len) { for(i = 0; cmd[i];) { if (fwrite(cmd + i,1,1,p->f) != 1) { if (errno == EWOULDBLOCK) continue; return -1; } i++; usleep(5000); } tcdrain(fileno(p->f)); fprintf(p->f,"\r\n"); return 0; } else { if (fwrite(cmd, 1, len, p->f) < len) return -1;...
2000 Jun 22
0
Timing bug patch and x509 question.
...nt version string is read, a core dump with a "Did not receive ident string..." error. This problem does not appear to have been mentioned yet in the list archive. This bug was noted on HP-UX 11.0 but could be a problem on other Unices as well. My Q&D fix (patch below) was to spin on EWOULDBLOCK (the BSDism seen on HP-UX) or EAGAIN. In testing I see from 2 to 4 iterations before the first byte arrives. Now the question: Does anyone know of any plans to add a x.509 certificate capability to openssh? For political reasons only x.509 based crypto will be usable in my environment. We have...
2006 Jan 14
1
[PATCH] Maintain outgoing TCP meta buffer
Here's a patch that does the steps I mentioned in my last email: - remove BlockingTCP - make send_meta return true on EWOULDBLOCK - add logic to main_loop to watch for write availability of meta connections with non-empty buffers and flush them. It fixes the extra packets with TCPOnly and should resolve the problems that made BlockingTCP necessary also. (No testing of that last bit.) The buffer management is a bit dum...
2019 Jun 08
0
[PATCH libnbd 1/3] lib: socket: Add .send flags parameter.
...e *h) if (h->wlen == 0) return 0; /* move to next state */ - r = h->sock->ops->send (h, h->sock, h->wbuf, h->wlen); + r = h->sock->ops->send (h, h->sock, h->wbuf, h->wlen, 0); if (r == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) return 1; /* more data */ diff --git a/lib/crypto.c b/lib/crypto.c index e0f173f..703bc84 100644 --- a/lib/crypto.c +++ b/lib/crypto.c @@ -164,7 +164,7 @@ tls_recv (struct nbd_handle *h, struct socket *sock, void *buf, size_t len) static ssize_t tls_send (struct nbd_hand...
2013 Nov 29
2
nsd 4.0 EAGAIN loop in sendmmsg(2)
...NetBSD 6.99.28-CURRENT, nsd 3.2.16 works fine, however nsd 4.0.0 is spinning chewing CPU. The logs show: Nov 28 23:07:00 xxx nsd[466]: sendmmsg failed: Resource temporarily unavailable ktruss shows it getting EAGAIN from sendmmsg(2) over and over again. According to the man page: [EAGAIN|EWOULDBLOCK] The socket is marked non-blocking and the requested operation would block. Sounds like it's blocking when it shouldn't? -Dustin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.nlnetlabs.nl/pi...
2019 Jun 08
6
[PATCH libnbd 0/3] states: Use MSG_MORE to coalesce messages.
Appears to have a measurable benefit, see 3/3 for test results. Rich.
2015 Mar 10
3
Notes on building a gcc toolchain for Rtools (but not multilib)
----- Original Message ----- > From: "Duncan Murdoch" <murdoch.duncan at gmail.com> > To: "Dan Tenenbaum" <dtenenba at fredhutch.org> > Cc: "Hsiu-Khuern Tang" <tangoh at gmail.com>, r-devel at r-project.org > Sent: Tuesday, March 10, 2015 11:37:12 AM > Subject: Re: [Rd] Notes on building a gcc toolchain for Rtools (but not multilib)
2019 Jun 03
0
[PATCH libnbd discussion only 3/5] lib: Pass handle to socket recv and send calls.
...+61,7 @@ recv_into_rbuf (struct nbd_handle *h) rlen = h->rlen > sizeof buf ? sizeof buf : h->rlen; } - r = h->sock->ops->recv (h->sock, rbuf, rlen); + r = h->sock->ops->recv (h, h->sock, rbuf, rlen); if (r == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) return 1; /* more data */ @@ -92,7 +92,7 @@ send_from_wbuf (struct nbd_handle *h) if (h->wlen == 0) return 0; /* move to next state */ - r = h->sock->ops->send (h->sock, h->wbuf, h->wlen); + r = h->sock->ops->send (...
2010 Feb 23
2
cygwin + rsync issue under Windows 7 x64
Friends -- I am posting this to both lists since I think it has to do with some kind of unfortunate interaction. The latest rsync (3.0.7-1) under an up-to-date cygwin on Windows 7 x64 gets into some kind of busy wait situation when transferring large files over ssh. rsync, ssh, and zip can all be consuming much cpu time. I downloaded and built rsync 3.0.7 locally, manually editing config.status