Matthias,
Can you try the attached patch?
After the run, can you grep for 'first read return EAGAIN' and 'second
read return EAGAIN' in the dumper debug files?
Jean-Louis
On 22/09/17 10:57 AM, Matthias Teege wrote:
> On Thu, Sep 21, 2017 at 09:45:04AM +0200, Matthias Teege wrote:
>
> Hi,
>
>> I have a running Amanda 3.3.3 Server. The backup works without
>> problems. On the clients we use Amanda 3.3.0/3.3.6 and 2.6.x on some
>> old systems.
> I've made some more tests and its look like that its not a problem
> of one host. I've run amdump for a single host and a single disk and
> got the same error. On the client I see:
>
> Fri Sep 22 16:15:35 2017: thd-0x55b3cc1bd400: amandad:
> security_stream_seterr(0x55b3cc1e0f70, write error to: Connection reset by
> peer)
> Fri Sep 22 16:15:35 2017: thd-0x55b3cc1bd400: amandad: sending NAK pkt:
> <<<<<
> ERROR write error on stream 499999: write error to: Connection reset by peer
>
> On the server I see:
>
> river: hdisk-state time 173.994 hdisk 0: free 1439233056 dumpers 1
> driver: result time 173.994 from dumper0: FAILED 00-00001 "[data read: recv
> error: Resource temporarily unavailable]"
> driver: send-cmd time 173.994 to chunker0: FAILED 00-00001
>
> What can be the cause of the "reset"?
>
> Thanks!
> Matthias
This message is the property of CARBONITE, INC. and may contain confidential or
privileged information.
If this message has been delivered to you by mistake, then do not copy or
deliver this message to anyone. Instead, destroy it and notify me by reply
e-mail
diff --git a/common-src/security-util.c b/common-src/security-util.c
index 43360ea..4929bbd 100644
--- a/common-src/security-util.c
+++ b/common-src/security-util.c
@@ -517,6 +517,17 @@ tcpm_recv_token(
rval = read(fd, ((char *)&rc->netint) + rc->size_header_read,
SIZEOF(rc->netint) - rc->size_header_read);
if (rval == -1) {
+ if (0
+#ifdef EAGAIN
+ || errno == EAGAIN
+#endif
+#ifdef EWOULDBLOCK
+ || errno == EWOULDBLOCK
+#endif
+ ) {
+ g_debug("first read return EAGAIN");
+ return -2;
+ }
if (errmsg)
*errmsg = newvstrallocf(*errmsg, _("recv error: %s"),
strerror(errno));
@@ -600,6 +611,17 @@ tcpm_recv_token(
rval = read(fd, rc->buffer + rc->size_buffer_read,
(size_t)*size - rc->size_buffer_read);
if (rval == -1) {
+ if (0
+#ifdef EAGAIN
+ || errno == EAGAIN
+#endif
+#ifdef EWOULDBLOCK
+ || errno == EWOULDBLOCK
+#endif
+ ) {
+ g_debug("second read return EAGAIN");
+ return -2;
+ }
if (errmsg)
*errmsg = newvstrallocf(*errmsg, _("recv error: %s"),
strerror(errno));