Memcached crashing on FreeBSD
Jason Coene
jcoene at gotfrag.com
Wed Apr 13 15:48:17 PDT 2005
I'm running 5.2-RELEASE, so you want rev 1.84.2.1:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libc/stdlib/malloc.
c?rev=1.84.2.1
If you would like to provide the ASSERT, I can try it - also, I'm thinking I
can likely replicate this issue by starting a server with a lower memory
limit (currently 512) and flooding it a bit... if we want to do rapid
testing.
Thanks,
Jason
> -----Original Message-----
> From: Jacob Coby [mailto:jcoby at listingbook.com]
> Sent: Wednesday, April 13, 2005 6:43 PM
> To: Jason Coene
> Cc: 'Anatoly Vorobey'; memcached at lists.danga.com
> Subject: Re: Memcached crashing on FreeBSD
>
> Jason Coene wrote:
> > Well guys, some bad news - "ax" didn't fix the crash!
> >
> > Code I added to main():
> >
> > #ifdef __FreeBSD__
> > _malloc_options = "ax";
> > #endif
> >
> > 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..
>
> http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libc/stdlib/mallo
> c.c?rev=1.90&content-type=text/plain
>
> 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!
> moments :)
>
> --
> -Jacob
More information about the memcached
mailing list