Memcached crashing on FreeBSD
jcoby at listingbook.com
Wed Apr 13 15:42:44 PDT 2005
Jason Coene wrote:
> Well guys, some bad news - "ax" didn't fix the crash!
> Code I added to main():
> #ifdef __FreeBSD__
> _malloc_options = "ax";
> The ifdef block is definitely getting picked up, I tested with a printf
Maybe an assert() needs to be put in slabs_newslab to double check that
_malloc_options isn't being reset to the defaults?
> Backtrace from latest crash:
> (gdb) bt
> #0 0x280c5d4f in kill () from /lib/libc.so.5
> #1 0x280ba7f8 in raise () from /lib/libc.so.5
> #2 0x28132f02 in abort () from /lib/libc.so.5
> #3 0x2813167e in tcflow () from /lib/libc.so.5
> #4 0x28131f1b in tcflow () from /lib/libc.so.5
I'm very naive with the *BSDs, but #3 and #4 confuse me a little bit. I
haven't been able to find a version of malloc() in the FreeBSD CVS that
calls tcflow(). The version that I'm looking at calls pubrealloc(),
which never calls tcflow(). It'd be nice if the bt showed the params to
the libc calls..
Which version should I be looking at?
And just for reference:
tcflow() suspends transmission or reception of data on the object
referred to by fd, depending on the value of action:
TCOOFF suspends output.
TCOON restarts suspended output.
TCIOFF transmits a STOP character, which stops the terminal
device from transmitting data to the system.
TCION transmits a START character, which starts the terminal
device transmitting data to the system.
The default on open of a terminal file is that neither its input
nor its output is suspended.
> #5 0x281322d6 in malloc () from /lib/libc.so.5
> #6 0x0804b595 in slabs_newslab (id=5) at slabs.c:111
ln 111 looks like:
ptr = malloc(len);
where len is: int len = POWER_BLOCK;
Not really helpful, I know. I'm just hoping to spark one of those AHA!
More information about the memcached