-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Segfault node v0.11.14 related to TLS #8780
Comments
@matejkramny please provide more details, for instance distro (Debian, ...), and how to produce the issue. A simple test case help for faster debugging and for get the time to look at it. |
@matejkramny as @migounette suggested, could you please provide us with more information on how to reproduce this issue somewhat reliably? Ideally, we would come up with a test case that doesn't have any external dependency (a Node.js program that doesn't use any external module). However, anything that documents how to reproduce the issue with clear steps would already help. |
I'll find time for this by end of the week. It is really difficult to reproduce however, and seems to happen * randomly *. The server seemed to crash every time i used the iOS simulator. Then quitting the simulator and relaunching it fixed the server. Next time i'll try to capture the network :p |
One way to gather more information regarding what's going on would be to:
If you need help doing this, please ping me (jgi) on #libuv. Thanks! |
@misterdjules Thanks. is that on freenode? |
Yes, on Freenode. |
Right. I compiled node.js on the system as 32 bit (i think). I couldn't get the server to crash (no matter what.). It crashed this morning for some reason. Here's the log.. doesn't look very different from the 64 bit one. ulimit is set to
Is it of any use? I thought of having gdb set up, but i've never done that with node.js before (apart from using node-inspector which i suspect uses that). |
@misterdjules Well, I found a problem a week ago but I didn't succeed to reproduce, it was the source of a crash in intensive TLS traffic. The enc_out_ may be null... my 2 cents void TLSCallbacks::EncOutCb(uv_write_t* req, int status) { // Handle error
} // Commit // FIX <<------- START |
@migounette can you make a PR? |
When loading session, OCSP response, SNI, always check that the `self._handle` is present. If it is not - the socket was closed - and we should emit the error instead of throwing an uncaught exception. Fix: nodejs/node-v0.x-archive#8780 Fix: nodejs#1696
May I ask you to give a try to nodejs/node#1702 ? |
Ok will do. Thanks @indutny! |
* Destroy `SSL*` and friends on a next tick to make sure that we are not doing it in one of the OpenSSL callbacks * Add more checks to the C++ methods that might be invoked during destructor's pending queue cleanup Fix: nodejs/node-v0.x-archive#8780 Fix: nodejs#1696
When loading session, OCSP response, SNI, always check that the `self._handle` is present. If it is not - the socket was closed - and we should emit the error instead of throwing an uncaught exception. Fix: nodejs/node-v0.x-archive#8780 Fix: nodejs#1696
* Destroy `SSL*` and friends on a next tick to make sure that we are not doing it in one of the OpenSSL callbacks * Add more checks to the C++ methods that might be invoked during destructor's pending queue cleanup Fix: nodejs/node-v0.x-archive#8780 Fix: nodejs#1696
When loading session, OCSP response, SNI, always check that the `self._handle` is present. If it is not - the socket was closed - and we should emit the error instead of throwing an uncaught exception. Fix: nodejs/node-v0.x-archive#8780 Fix: nodejs#1696
* Destroy `SSL*` and friends on a next tick to make sure that we are not doing it in one of the OpenSSL callbacks * Add more checks to the C++ methods that might be invoked during destructor's pending queue cleanup Fix: nodejs/node-v0.x-archive#8780 Fix: nodejs#1696
@matejkramny ... any updates on this? |
@indutny @misterdjules @jasnell @matejkramny At this stage, I don't have any valid core dump due to a stupid problem of ulimit on our testing system (fixed now), but so far so good, I can't see this issue since we moved to 0.12 So, I can help for investigating this issue if we can succeed to have a light test case. |
When loading session, OCSP response, SNI, always check that the `self._handle` is present. If it is not - the socket was closed - and we should emit the error instead of throwing an uncaught exception. Fix: nodejs/node-v0.x-archive#8780 Fix: #1696 PR-URL: #1702 Reviewed-By: Trevor Norris <[email protected]>
* Destroy `SSL*` and friends on a next tick to make sure that we are not doing it in one of the OpenSSL callbacks * Add more checks to the C++ methods that might be invoked during destructor's pending queue cleanup Fix: nodejs/node-v0.x-archive#8780 Fix: #1696 PR-URL: #1702 Reviewed-By: Trevor Norris <[email protected]>
@migounette what do you think about nodejs/node#1910 ? |
Running https://github.com/CastawayLabs/dproxy.js.. Occasionally, it quits with segmentation fault..
It is caught using
segfault-handler
.Stack trace:
If i'm reading this correctly, a client isn't sending proper TLS request and causes an internal node failure.
I'm determined to find the root cause of this. If this is genuinely not my fault (dproxy project), then other projects using TLS and SNI may be endangered.
Happened for v0.11.13 and v.0.11.14
/cc @tjfontaine as it seems related to TLS
The text was updated successfully, but these errors were encountered: