-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion `(parser->current_buffer_len_) == (0)' failed #15102
Comments
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. |
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:
I 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
|
@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. solution:
npm install http-parser-js
process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser; and it solves the problem |
@psamim start Node with the |
@cjihrig I did and the same thing happened:
|
@psamim Do you find a file name |
There are 125 files named `core` but none are in the root directory where I
run the program.
…On Tue, Sep 19, 2017 at 5:06 PM Anna Henningsen ***@***.***> wrote:
@psamim <https://github.com/psamim> Do you find a file name core or
similar where you were running your node program?
—
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/AByDhzjLCd0_LaKLisnl7Jse3h9y7oOZks5sj7VNgaJpZM4PICpG>
.
|
@psamim does any of the creation times of those files match the time of the crash as per the logs? that would be a good indicator that it’s what we’re looking for :) |
The problem seems resolved for me, in version 8.5.0. |
Happy to hear that. I'll close out the issue. |
I got the following error in node v10.16.0 while uploading a 1GB file on S3 using Note: Upload string(not Buffer) to S3.
Code to reproduce this error
|
@himanshu-singh1995 I think I am facing the same issue. Did you find a fix or work around for this. Also was it any file 1GB and bigger? |
@himanshu-singh1995 @jsohan Can you tell whether you are affected by this on Node v12.x or v14.x as well? |
@addaleax This effects me on Node v12. Not sure what the root cause it but this error is being thrown from s3.putObject() function when dealing with large strings |
@jsohan Is there a chance you could share a core dump (+ your exact Node.js version, assuming you’re using the binaries from https://nodejs.org/, or if not, the Node.js executable you are using)? It would be good to know what the JS stack trace is here, but unfortunately the crash output here does not provide that… |
@addaleax Not to sure what a core Dump is but I'm running node v12.14.0 locally . Error was first thrown in production but I'm not sure the exact node version ran there. When I reproduce the bug locally I run the following code:
And I get the following console output:
Sorry if the formatting is little weird. This is being thrown from the record processor function of aws-kcl library, getting data from a Kinesis stream |
@jsohan Sorry, didn’t know you’re running Windows… in that case, yeah, core dumps or C++ stack traces won’t be available/useful. Can you try adding this to your code (before you make the request), and run Node.js with const { HTTPParser } = process.binding('http_parser');
const origFinish = HTTPParser.prototype.finish;
HTTPParser.prototype.finish = function(...args) {
console.trace('finish called', args);
return origFinish.call(this, ...args);
}; that should give us the JS stack trace, which is the most useful thing we can get here. |
@addaleax here's what I got
|
@jsohan Thanks, that seems quite helpful already – can you expand the stack trace a bit more, e.g. by adding |
@addaleax Would be awesome to find out what's going wrong here |
@jsohan Awesome, thank you! I managed to put together a fully self-contained reproduction based on this :) The good news is that this already appears to be fixed (at least to some degree) on Node v14.x, so it might just be a matter of backporting the right fix + adding a test. |
Awesome. Any idea on how I would go about this? @addaleax |
For a workaround, you might be able to wrap the |
Looks like the fix was f663b31, which was semver-major, so I’ll open a separate fix instead of backporting that |
Since the tests only crash on v12.x, this commit adds separate regression tests. Refs: nodejs#15102
Fix a crash that occurs when `parser.finish()` is called during `parser.execute()`. In this particular case, this happened because a 100 continue response is a place in which `.end()` can be called which can in turn lead to a write error, which is emitted synchronously, thus inside the outer `parser.execute()` call. Resolve that by delaying the `parser.finish()` call until after the `parser.execute()` call is done. This only affects v12.x, because on later versions, errors are not emitted synchronously. Fixes: nodejs#15102
Since the tests only crash on v12.x, this commit adds separate regression tests. Refs: nodejs#15102
Since the tests only crash on v12.x, this commit adds separate regression tests. Refs: #15102 PR-URL: #34250 Refs: #34016 Reviewed-By: Luigi Pinca <[email protected]>
Since the tests only crash on v12.x, this commit adds separate regression tests. Refs: #15102 PR-URL: #34250 Refs: #34016 Reviewed-By: Luigi Pinca <[email protected]>
Since the tests only crash on v12.x, this commit adds separate regression tests. Refs: #15102 PR-URL: #34250 Refs: #34016 Reviewed-By: Luigi Pinca <[email protected]>
Since the tests only crash on v12.x, this commit adds separate regression tests. Refs: #15102 PR-URL: #34250 Refs: #34016 Reviewed-By: Luigi Pinca <[email protected]>
Since the tests only crash on v12.x, this commit adds separate regression tests. PR-URL: #34251 Refs: #15102 Refs: #34016 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
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.
The text was updated successfully, but these errors were encountered: