What are the steps to problem solve when all I can get are 503s?

Jacques whshub at gmail.com
Mon Jul 19 04:00:21 CEST 2010


Ok, I tried my best to do a debug:

Here is what i have.  I'm not a c programmer at all but it appears that I'm
Varnish is failing to create a socket as the return from the socket creation
call is -1 and errno set at 9 which I believe translates to EBADF/Bad file
descriptor.

Feel free to tell me what I'm doing wrong or why this might be the case...

Thanks
Jacques


# gdb  /opt/extra/sbin/varnishd 14236
<< bunch of statements >>
(gdb) break vbp_connect
(gdb) cont
Continuing.
[New LWP    8        ]
[New Thread 8 (LWP 8)]
[Switching to Thread 8 (LWP 8)]


Breakpoint 1, vbp_connect (pf=2, sa=0x494290, salen=16, tmo=534) at
cache_backend_poll.c:107
107             s = socket(pf, SOCK_STREAM, 0);
(gdb) n
108             if (s < 0)
(gdb) p s
$1 = -1
(gdb) p errno
$2 = 9
(gdb) p sa
$3 = (const struct sockaddr *) 0x494290
(gdb) p sa.sa_family
$4 = 2
(gdb) p sa.sa_data
$5 = "\000PWî/Ì\000\000\000\000\000\000\000"
(gdb) c
Continuing.


On Wed, Jul 14, 2010 at 11:41 AM, Kacper Wysocki <kacperw at gmail.com> wrote:

> On Tue, Jul 13, 2010 at 6:09 PM, Jacques <whshub at gmail.com> wrote:
> > Can you try to install with this as the configure:
> > VCC_CC="/usr/bin/gcc -pthreads -fpic -shared -m64 -o %o %s" \
> > CC=/usr/bin/gcc \
> > CFLAGS="-pthreads -m64" \
> > LDFLAGS="-pthreads" \
> > ./configure --prefix=/opt/extra --enable-debugging-symbols
> > --enable-diagnostics --enable-dependency-tracking
> > Or change the VCC_CC path if you have your gcc at a different location.
> > I don't get any panics.  The child process starts and runs fine.
>  Everything
> > runs just fine (except the 503s).
> > I've connected up to the child process with gdb just fine.  My question
> now
> > is where/what should I breakpoint to see why it is coming back as backend
> > not connected?
>
> -pthreads seems to fix the issue I was seeing so that's not it and I
> can't reproduce your problem. Your 503's need debugging as per my 1st
> post:
> "make check" should report "All 174 tests passed"
>
>     9 FetchError   c no backend connection
>
> you are hitting cache_fetch.c:357. While debugging, try different
> directors & debug.health.
>
> hth,
>  0k
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100718/88cf5b93/attachment-0003.html>


More information about the varnish-misc mailing list