[Varnish] #615: Varnish crashes every few minutes with Assert error in VCA_Prep(), cache_acceptor.c line 148
Varnish
varnish-bugs at projects.linpro.no
Mon Jan 11 20:40:32 CET 2010
#615: Varnish crashes every few minutes with Assert error in VCA_Prep(),
cache_acceptor.c line 148
----------------------+-----------------------------------------------------
Reporter: jhayter | Owner: phk
Type: defect | Status: new
Priority: high | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
I am testing Varnish 2.0.6 on Solaris 10. I setup Varnish using the
suggestions at http://letsgetdugg.com/2009/12/04/varnish-on-solaris/. I
have attached my command line to start varnish.
Every few (3-6) minutes, the child process dies and is restarted.
Varnishd output[[BR]]
---------------[[BR]]
...[[BR]]
Child (21784) said ", 1, 3)[[BR]]
Child (21784) not responding to ping, killing it.[[BR]]
Child (21784) not responding to ping, killing it.[[BR]]
Child (21784) not responding to ping, killing it.[[BR]]
Child (21784) died signal=6 (core dumped)[[BR]]
Child (21784) Panic message: Assert error in VCA_Prep(),
cache_acceptor.c line 148:
Condition((setsockopt(sp->fd, 0xffff, 0x0080, &linger, sizeof linger))
== 0) not true.
errno = 9 (Bad file number)
thread = (cache-worker)
sp = 8f29974 {
fd = 84, id = 84, xid = 0,
client = 66.68.180.213:2086,
step = STP_FIRST,
handling = error,
restarts = 0, esis = 0
ws = 8f299c0 {
id = "sess",
{s,f,r,e} = {8f2a470,+19,0,+32768},
},
http[req] = {
ws = 0[]
},
worker = 731cdee0
},
[[BR]]
Child cleanup complete[[BR]]
child (21816) Started[[BR]]
Child (21816) said Closed fds: 4 5 25 26 28 29[[BR]]
...[[BR]]
----
This error looked similar to ticket #547. I tried a quick fix similar to
the fix done for that ticket.[[BR]]
# diff cache_acceptor.c.2.0.6 cache_acceptor.c[[BR]]
127a128[[BR]]
> int i;
146,148c147,151[[BR]]
{{{
< if (need_linger)
< AZ(setsockopt(sp->fd, SOL_SOCKET, SO_LINGER,
< &linger, sizeof linger));
}}}
---[[BR]]
{{{
> if (need_linger) {
> i = setsockopt(sp->fd, SOL_SOCKET, SO_LINGER,
> &linger, sizeof linger);
> assert(i == 0 || errno == EBADF);
> if (i != 0) return;
> }
}}}
#[[BR]]
Unfortunately, it must be more complex than I thought. With the change
above in place, varnish still stops running every few minutes. But now
both the manager and child processes die.
[[BR]]
The varnish output is:[[BR]]
NB: Storage size limited to 2GB on 32 bit architecture,[[BR]]
NB: otherwise we could run out of address space.[[BR]]
storage_file: filename: /usr/local/varnish/var/varnish.cache size 2047
MB.[[BR]]
Using old SHMFILE[[BR]]
bind(): Cannot assign requested address[[BR]]
child (26778) Started[[BR]]
Child (26778) said Closed fds: 4 5 25 26 28 29[[BR]]
Child (26778) said Child starts[[BR]]
Child (26778) said managed to mmap 2147475456 bytes of 2147475456[[BR]]
Child (26778) said Ready[[BR]]
Child (26778) said Probe("HEAD /favicon.ico HTTP/1.1[[BR]]
Child (26778) said[[BR]]
Child (26778) said Host: www.manta.com[[BR]]
Child (26778) said[[BR]]
Child (26778) said User-Agent: varnish health probe[[BR]]
Child (26778) said[[BR]]
Child (26778) said Connection: close[[BR]]
Child (26778) said[[BR]]
Child (26778) said[[BR]]
Child (26778) said[[BR]]
Child (26778) said ", 1, 3)[[BR]]
Manager got SIGINT[[BR]]
Stopping Child[[BR]]
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/615>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list