Repository navigation
Assertion `(parser->current_buffer_len_) == (0)' failed #15102
Description
Activity
Does the same error occur with 8.4?
I will try to update node, but it might take weeks until it happens again, unless I find a way to reproduce it.
- addedc++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
on Aug 30, 2017 I'll close this out for now, let us know if you can reproduce with the latest v8.x.
Coincidentally, it just happened again. Same stack trace, different line:
/usr/local/bin/node[23084]: ../src/node_http_parser.cc:423:static void node::{anonymous}::Parser::Execute(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `(parser->current_buffer_len_) == (0)' failed. 1: node::Abort() [/usr/local/bin/node] 2: node::Assert(char const* const (*) [4]) [/usr/local/bin/node] 3: 0x142b461 [/usr/local/bin/node] 4: 0x11eabb74aac7 Main process exited, code=killed, status=6/ABRTI still don't know where exactly in the JS code this happened.
It also happened to me, node version 8.4.0 on Archlinux. The
8:54:18 AM api.1part in the log is fromnode-foreman.8:54:18 AM api.1 | /usr/bin/node[5205]: ../src/node_http_parser.cc:423:static void node::{anonymous}::Parser::Execute(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `(parser->current_buffer_len_) == (0)' failed. 8:54:18 AM api.1 | 1: 8:54:18 AM api.1 | node::Abort() [/usr/bin/node] 8:54:18 AM api.1 | 2: 8:54:18 AM api.1 | node::Assert(char const* const (*) [4]) [/usr/bin/node] 8:54:18 AM api.1 | 3: 0x5616b4c073dd [/usr/bin/node] 8:54:18 AM api.1 | 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/bin/node] 8:54:18 AM api.1 | 5: 0x5616b442414c [/usr/bin/node] 8:54:18 AM api.1 | 6: 0x5616b4424754 [/usr/bin/node] 8:54:18 AM api.1 | 7: 0x5350f1840dd@psamim Any chance you could get us a core dump of that crash?
- I do not know how.…On Sun, Sep 17, 2017 at 5:20 PM Anna Henningsen ***@***.***> wrote: @psamim <https://github.com/psamim> Any chance you could get us a core dump of that crash? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#15102 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AByDh44MUSI-Ma64CJV0WGCVtBCCLETMks5sjRWggaJpZM4PICpG> .
linux node v8.4.0
/usr/local/bin/node[30809]: ../src/node_http_parser.cc:423:static void node::{a nonymous}::Parser::Execute(const v8::FunctionCallbackInfov8::Value&): Asserti on `(parser->current_buffer_len_) == (0)' failed.
1: node::Abort() [node]
2: node::Assert(char const* const () [4]) [node]
3: 0x13c5bcd [node]
4: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallback Infov8::Value const&)) [node]
5: 0xc3ac4a [node]
6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::intern al::Isolate*) [node]
7: 0x39c5acd040dd
Abortedsolution:
- install following module
npm install http-parser-js
- and add the line below in your code
process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;
and it solves the problem
Reacted by Danil VolkovI do not know how.
@psamim start Node with the
--abort-on-uncaught-exceptionflag. Before starting node, also runulimit -c unlimited.@cjihrig I did and the same thing happened:
3:56:58 PM api.1 | /usr/bin/node[22446]: ../src/node_http_parser.cc:423:static void node::{anonymous}::Parser::Execute(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `(parser->current_buffer_len_) == (0)' failed. 3:56:58 PM api.1 | 1: 3:56:58 PM api.1 | node::Abort() 3:56:58 PM api.1 | [/usr/bin/node] 3:56:58 PM api.1 | 2: 3:56:58 PM api.1 | node::Assert(char const* const (*) [4]) 3:56:58 PM api.1 | [/usr/bin/node] 3:56:58 PM api.1 | 3: 3:56:58 PM api.1 | 0x5616f1cbd3dd [/usr/bin/node] 3:56:58 PM api.1 | 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/bin/node] 3:56:58 PM api.1 | 5: 0x5616f14da14c [/usr/bin/node] 3:56:58 PM api.1 | 6: 3:56:58 PM api.1 | 0x5616f14da754 [/usr/bin/node] 3:56:58 PM api.1 | 7: 0x3f5c6b9840dd@psamim Do you find a file name
coreor similar where you were running your node program?18 remaining items
For a workaround, you might be able to wrap the
self.writeBody(stream, httpRequest);line inaws-sdk/lib/http/node.js:102assetImmediate(() => self.writeBody(stream, httpRequest));, I think that would fix this for you. (Unfortunately, there probably isn’t any way to fix this in your code without monkey-patching either the AWS library or Node’s HTTP internals…)Reacted by Joshua SohanLooks like the fix was f663b31, which was semver-major, so I’ll open a separate fix instead of backporting that
- added a commit that references this issue
on Jul 23, 2020 - added 2 commits that reference this issue
on Sep 22, 2020
Hi,
I get the following crash from time to time (randomly, it seems):
I'm not entirely sure where this comes from as there is no JS stack trace, but I believe it happens when processing the response of a HTTP request. This bug has been around for a long time, but it's very inconsistent. It might have already been reported here, at least it seems to be related.