Process dying with "Abort trap: 6" when using zlib

42 views
Skip to first unread message

greim

unread,
Jun 10, 2014, 12:50:54 PM6/10/14
to nod...@googlegroups.com
I'm using node 0.11.13 with --harmony running koa and compressing using koa-compress, which in turn uses zlib. Here's the error right before the process dies:

TypeError: Cannot read property 'address' of null
    at Object.loggerMiddleware (/path/to/my/logging-code.js:19:32)
    at GeneratorFunctionPrototype.next (native)
    at Object.next (/path/to/my/node_modules/co/index.js:83:21)
    at Object.<anonymous> (/path/to/my/node_modules/co/index.js:102:18)
    at processImmediate [as _immediateCallback] (timers.js:374:17)
Assertion failed: (!ctx->pending_close_ && "close is pending"), function Write, file ../src/node_zlib.cc, line 150.
Abort trap: 6

I can somewhat reliably trigger the error by doing xhr.abort() from inside the browser. And unsurprisingly I can no longer seem to trigger it if I stop gzipping my responses.

If this were a normal JS exception it would have been caught, a stack trace logged (above) and a 500 response sent to the user. (The thing that was null was supposed to be a socket.) But I'm assuming that's merely a side effect of the zlib.cc failure?

Jonathan Ong

unread,
Jun 11, 2014, 6:32:58 AM6/11/14
to nod...@googlegroups.com
had the same issue recently: https://github.com/joyent/node/issues/7767
Reply all
Reply to author
Forward
0 new messages