Amanda-Users

Re: Stranded on waitq failure (planner: Message too long)

2008-11-07 09:24:03
Subject: Re: Stranded on waitq failure (planner: Message too long)
From: John Hein <jhein AT timing DOT com>
To: Leon Meßner <l.messner AT physik.tu-berlin DOT de>
Date: Fri, 7 Nov 2008 06:43:32 -0700
Leon Me=DFner wrote at 12:22 +0100 on Nov  6, 2008:
 > Hi,
 > =

 > On Wed, Nov 05, 2008 at 06:46:52PM -0500, Jean-Louis Martineau wrote:
 > > Ian Turner wrote:
 > >> I don't know if 2.5.1 is old enough to qualify for this issue, but =
it used =

 > >> to be the case that the entire set of disklists for a client had to=
 fit in =

 > >> a single packet. What that meant is that if you had more than a few=
 dozen =

 > >> disks on one client (depending on disklist options), you would run =
into =

 > >> this issue.
 > =

 > On this backupset i have 28 dle's.
 > =

 > >> =

 > >> The solution is to upgrade, but a workaround is to create a second =
IP =

 > >> address and DNS name on the same physical client, and move some of =
the =

 > >> disklist entries to the latter.
 > =

 > I'm running the latest Amanda from the Ports. Perhaps i should ask the=

 > maintainer about updating to 2.6.x. I don't know why the port uses thi=
s
 > old version. The maintainer seems to be quite active.
 > =

 > > Or change to the 'bsdtcp' auth.
 > =

 > =

 > Thanks for your solutions, changing net.inet.udp.maxdgram to 65535
 > helped also (FreeBSD's default is 9k ;).

I've been applying the following patch to bump up the max datagram
size since amanda 2.4.1 (minor differences per version mostly due to
changes in dbprintf) when I started seeing packet size limit problems
even with a modest number of DLEs (it was a particular DLE that had a
lot of files that first caused the problem).

It works on all OS's, not just BSDs.  At one point I submitted it on
-hackers, but it never got committed.  The maxdgram sysctl is global
to the system.  This patch gives you a little finer control.

Against 2.5.1p1 - 2.5.x ...

--- common-src/dgram.c.orig     Wed Sep 20 06:48:54 2006
+++ common-src/dgram.c  Wed Sep 27 13:43:07 2006
@@ -57,6 +57,7 @@ dgram_bind(
     socklen_t len;
     struct sockaddr_in name;
     int save_errno;
+    int sndbufsize =3D MAX_DGRAM;
 =

     *portp =3D (in_port_t)0;
     if((s =3D socket(AF_INET, SOCK_DGRAM, 0)) =3D=3D -1) {
@@ -75,6 +76,10 @@ dgram_bind(
        errno =3D EMFILE;                               /* out of range */
        return -1;
     }
+    if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *) &sndbufsize,
+       sizeof(sndbufsize)) < 0)
+       dbprintf(("%s: dgram_bind: could not set udp send buffer to %d\n",
+                 debug_prefix(NULL), sndbufsize));
 =

     memset(&name, 0, SIZEOF(name));
     name.sin_family =3D (sa_family_t)AF_INET;


Against 2.6.x ...

--- common-src/dgram.c.orig     Fri May 30 11:44:36 2008
+++ common-src/dgram.c  Fri Aug 22 13:19:56 2008
@@ -250,6 +250,7 @@
     socklen_t_equiv addrlen;
     ssize_t nfound;
     int save_errno;
+    int sndbufsize =3D MAX_DGRAM;
 =

     sock =3D dgram->socket;
 =

@@ -286,6 +287,10 @@
        errno =3D save_errno;
        return nfound;
     }
+    if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *) &sndbufsize,
+       sizeof(sndbufsize)) < 0)
+       dbprintf("%s: dgram_bind: could not set udp send buffer to %d\n",
+                 strerror(save_errno), sndbufsize);
 =

     addrlen =3D (socklen_t_equiv)sizeof(sockaddr_union);
     size =3D recvfrom(sock, dgram->data, (size_t)MAX_DGRAM, 0,

<Prev in Thread] Current Thread [Next in Thread>