-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Segfault during StreamWrap's slab alloc #2473
Comments
Looking at the core dumps
corresponds to https://github.com/joyent/node/blob/f3da6c6c045fb9d629509cea53e3631342f785d3/src/stream_wrap.cc#L154-156 $rbp contains the buffer
It seems that It may be that the buffer is getting GCed very quickly and that is causing the error. As it is just constructed there are no references to it and the weak callback will be made if a GC occurs. This is bad. I think @postwait informed me of this problem about 6 months ago but I ignored it because nothing in my house was burning. Should not have ignored. |
Did this happen randomly or with specific code? This is relevant to #2468, @bnoordhuis mentioned porting the stream_wrap slab allocator to udp_wrap. I actually got this mostly working on my fork locally but I'm curious as to what causes the above segfault. Seems like 0.6.x needs some serious work to unify and harden slab allocation. |
@mrb It's probably not relevant if my theory is correct. It's a general problem with buffers |
Sorry, I meant it WILL be relevant if the slab allocator makes its way to the UDP side. @ry Can we try to force heap compaction in the case of buffer-caused fragmentation? |
@ry Ah, derp. I'll catch you on IRC in a bit. |
I can sometimes reproduce this with
|
@mranney, @dannycoates : please test this patch https://gist.github.com/1585672 |
Is there any expected performance impact? |
@mranney, no |
* Update V8 to 3.6.6.19 * Numeric key hash collision fix for V8 (Erik Corry, Fedor Indutny) * Add missing TTY key translations for F1-F5 on Windows (Brandon Benvie) * path.extname bugfix with . and .. paths (Bert Belder) * cluster: don't always kill the master on uncaughtException (Ben * Noordhuis) * Update npm to 1.1.0-2 (isaacs) * typed arrays: set class name (Ben Noordhuis) * zlib binding cleanup (isaacs, Bert Belder) * dgram: use slab memory allocator (Michael Bernstein) * fix segfault nodejs#2473
Experienced with 0.6.7-pre f3da6c6
cc @mranney @dannycoates
The text was updated successfully, but these errors were encountered: