[prev in list] [next in list] [prev in thread] [next in thread] 

List:       varnish-misc
Subject:    Re: Child constantly crashes in Mac OS X
From:       Javi Lavandeira <javi () lavandeira ! net>
Date:       2012-07-30 17:06:58
Message-ID: D0183CA5-1E2B-409B-A90A-57D041445AEC () lavandeira ! net
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi phk,

> In message <A1FE9D80-4D75-4450-AB9B-96C55E914973@lavandeira.net>, Javi Lavandei
> ra writes:
> 
> Can you check the manual pages and see if it mentions how long timeouts
> you can specify to setsockopt(SO_SNDTIMEO) ?
> 
>> Child (7681) died signal=6
>> Child (7681) Panic message: Assert error in VCA_Prep(), cache_acceptor.c line 185:
>> Condition(VTCP_Check(setsockopt(sp->fd, 0xffff, 0x1005, &tv_sndtimeo, sizeof tv_sndtimeo))) not true.

Let's see if this helps:

From setsockopt()'s manpage:

[...]
     Most socket-level options utilize an int parameter for option_value.  For setsockopt(), the
     parameter should be non-zero to enable a boolean option, or zero if the option is to be dis-
     abled.  SO_LINGER uses a struct linger parameter, defined in <sys/socket.h>, which specifies
     the desired state of the option and the linger interval (see below).  SO_SNDTIMEO and
     SO_RCVTIMEO use a struct timeval parameter, defined in <sys/time.h>.
[...]
     SO_SNDTIMEO is an option to set a timeout value for output operations.  It accepts a struct
     timeval parameter with the number of seconds and microseconds used to limit waits for output
     operations to complete.  If a send operation has blocked for this much time, it returns with a
     partial count or with the error EWOULDBLOCK if no data were sent.  In the current implementa-
     tion, this timer is restarted each time additional data are delivered to the protocol, imply-
     ing that the limit applies to output portions ranging in size from the low-water mark to the
     high-water mark for output.
[...]

And I can see this in the header files:

/usr/include/sys/_structs.h:

#define _STRUCT_TIMEVAL struct timeval
_STRUCT_TIMEVAL
{
	__darwin_time_t		tv_sec;	/* seconds */
	__darwin_suseconds_t 	tv_usec;	/* and microseconds */
}; 

/usr/include/sys/types.h:
	
typedef __darwin_time_t         time_t;
typedef __darwin_suseconds_t    suseconds_t;

/usr/include/sys/_types.h:

typedef __int32_t	__darwin_suseconds_t;	/* [???] microseconds */

Hope it helps.

--
Javi Lavandeira 
Twitter: @javilm

Blog: http://www.lavandeira.net/blog/
Email and hosting: http://www.lavandeira.net/services/


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; -webkit-line-break: after-white-space; "><div \
apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: \
separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; \
font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; \
text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: \
normal; widows: 2; word-spacing: 0px; border-spacing: 0px; \
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; \
-webkit-text-stroke-width: 0px; font-size: medium; "><div>Hi \
phk,</div></span></div><div><br></div><div><blockquote type="cite">In message &lt;<a \
href="mailto:A1FE9D80-4D75-4450-AB9B-96C55E914973@lavandeira.net">A1FE9D80-4D75-4450-AB9B-96C55E914973@lavandeira.net</a>&gt;, \
Javi Lavandei<br>ra writes:<br><br>Can you check the manual pages and see if it \
mentions how long timeouts<br>you can specify to setsockopt(SO_SNDTIMEO) \
?<br><br><blockquote type="cite">Child (7681) died signal=6<br>Child (7681) Panic \
message: Assert error in VCA_Prep(), cache_acceptor.c line 185:<br> \
Condition(VTCP_Check(setsockopt(sp-&gt;fd, 0xffff, 0x1005, &amp;tv_sndtimeo, sizeof \
tv_sndtimeo))) not true.</blockquote></blockquote><br></div><div>Let's see if this \
helps:</div><div><br></div><div>From setsockopt()'s \
manpage:</div><div><div><br></div><div>[...]</div><div>&nbsp; &nbsp; &nbsp;Most \
socket-level options utilize an int parameter for option_value. &nbsp;For \
setsockopt(), the</div><div>&nbsp; &nbsp; &nbsp;parameter should be non-zero to \
enable a boolean option, or zero if the option is to be dis-</div><div>&nbsp; &nbsp; \
&nbsp;abled. &nbsp;SO_LINGER uses a struct linger parameter, defined in \
&lt;sys/socket.h&gt;, which specifies</div><div>&nbsp; &nbsp; &nbsp;the desired state \
of the option and the linger interval (see below). &nbsp;SO_SNDTIMEO \
and</div><div>&nbsp; &nbsp; &nbsp;SO_RCVTIMEO use a struct timeval parameter, defined \
in &lt;sys/time.h&gt;.</div><div>[...]</div><div><div>&nbsp; &nbsp; &nbsp;SO_SNDTIMEO \
is an option to set a timeout value for output operations. &nbsp;It accepts a \
struct</div><div>&nbsp; &nbsp; &nbsp;timeval parameter with the number of seconds and \
microseconds used to limit waits for output</div><div>&nbsp; &nbsp; &nbsp;operations \
to complete. &nbsp;If a send operation has blocked for this much time, it returns \
with a</div><div>&nbsp; &nbsp; &nbsp;partial count or with the error EWOULDBLOCK if \
no data were sent. &nbsp;In the current implementa-</div><div>&nbsp; &nbsp; \
&nbsp;tion, this timer is restarted each time additional data are delivered to the \
protocol, imply-</div><div>&nbsp; &nbsp; &nbsp;ing that the limit applies to output \
portions ranging in size from the low-water mark to the</div><div>&nbsp; &nbsp; \
&nbsp;high-water mark for output.</div></div><div>[...]</div><div><br></div><div>And \
I can see this in the header \
files:</div><div><br></div><div>/usr/include/sys/_structs.h:</div><div><br></div>#define \
_STRUCT_TIMEVAL         struct \
timeval</div><div>_STRUCT_TIMEVAL</div><div>{</div><div><span class="Apple-tab-span" \
style="white-space:pre">	</span>__darwin_time_t<span class="Apple-tab-span" \
style="white-space:pre">		</span>tv_sec;<span class="Apple-tab-span" \
style="white-space:pre">	</span>/* seconds */</div><div><span class="Apple-tab-span" \
style="white-space:pre">	</span>__darwin_suseconds_t <span class="Apple-tab-span" \
style="white-space:pre">	</span>tv_usec;<span class="Apple-tab-span" \
style="white-space:pre">	</span>/* and microseconds \
*/</div><div>};&nbsp;<div><br></div><div>/usr/include/sys/types.h:</div><div><span \
class="Apple-tab-span" style="white-space: pre; \
">	</span></div></div><div><div>typedef __darwin_time_t &nbsp; &nbsp; &nbsp; &nbsp; \
time_t;</div></div><div><div>typedef __darwin_suseconds_t &nbsp; \
&nbsp;suseconds_t;</div></div><div><br></div><div><div>/usr/include/sys/_types.h:</div></div><div><br></div><div>typedef \
__int32_t<span class="Apple-tab-span" \
style="white-space:pre">	</span>__darwin_suseconds_t;<span class="Apple-tab-span" \
style="white-space:pre">	</span>/* [???] microseconds \
*/</div><div><br></div><div>Hope it helps.</div><div><br></div><div><div>--</div>Javi \
Lavandeira&nbsp;<div>Twitter: \
@javilm</div><div><b><br></b></div><div><b>Blog:</b>&nbsp;<a \
href="http://www.lavandeira.net/blog/">http://www.lavandeira.net/blog/</a></div><div><b>Email \
and hosting:</b>&nbsp;<a \
href="http://www.lavandeira.net/services/">http://www.lavandeira.net/services/</a></div></div><div><br></div></body></html>




_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic