-
Notifications
You must be signed in to change notification settings - Fork 18
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
mdb_v8 is sometimes unable to load core files generated on Linux #65
Comments
Sorry, I replied on nodejs/node-v0.1x-archive#9214 before I saw this. It would probably be better to keep that discussion here. If you could make the core file available, that would be helpful. |
I recently ran into a similar, and maybe identical, issue when trying to load a core files generated from a node process running the 64 bits binary of node version 4.2.2 on a RHEL 6 Linux distribution with a Linux kernel at version 2.6.32-573.7.1.el6.x86_64. If we look at the node binary that the process was running when it generated that core file to determine at which address the V8 version symbols are located, we get the following output:
So we can tell that the addresses of these symbols are between
The Now we can take a look at the core file and see if these memory regions are present. I can't share the core file itself publicly, but here are the memory areas that
It seems that there's no mapping in this core file that corresponds to a region that would include the To confirm that this is what's going on, here's a DTrace script that I used to understand what
When running the following command, where
we get the following output from the DTrace script mentioned above:
We can see that mdb fails to read from address Now, let's generate a core file from a node process running node Using
When using
which means that the V8 versioning info was found. The DTrace script mentioned above outputs the following (truncated):
which shows So it seems that it might be possible that for two identical binaries, on very similar platforms, some core files do not contain the I'm not sure what could be causing this. We talked about the possibility that We also talked about having |
I don't see any Javascript frames after parsing of the coredump: mdb ./node/bin/node ./core.16
You will find all the artifacts used for debugging and reproducing the defect node-dump-artifacts I built the mdb_v8 on a Joyent Instance (nodejs 15.1.2). |
@kelapure This doesn't mean mdb_v8 isn't working. It could be because your Node application isn't doing anything. If there's nothing active, then all you'll see on the stack is just libuv polling as this is expected behaviour. Have you tried to take a core dump of a Node process hot on CPU? Take a core dump of a simple Node process that runs an infinite for loop, and see if you can see JS stacks. |
@yunong ah interesting ... I will run an infinite loop app and then take a core dump when it is stuck. Thanks for the tip. More forthcoming .... |
@yunong you are right. I recreated an infinite loop and took a core dump of the node.js process. I can now can see the JS frames in addition to the native frames. I built
This defect is now closed. The artifacts used to validate the working debug session are here |
This issue cannot be recreated with the latest mdb_v8.so built on the Joyent box. For completeness, I was taking core dumps of the node.js runtime within Cloud Foundry setup by the Node.js buildpack. For detail see http://cloud.rohitkelapure.com/2016/04/debugging-nodejs-high-cpu-crash-and.html |
The error message that was mentioned in the first comment:
indicates that mdb_v8 was unable to find the V8 versioning symbols in the core file, which is required to inspect it properly. Later comments mention that mdb_v8 was able to inspect a Linux core file (the error message mentioned above is not present). This means that the versioning information, along with other required data, was present. I would think that these different comments describe different results from different runs of mdb_v8 that load different core files. So the problem seems to be, as I described in my comment, that sometimes Linux core files are generated with some required information missing, and not that versions of mdb_v8 older than the latest version are unable to load some core files generated on Linux. It seems to me we still don't know what causes this, and that this problem is not fixed. Thus, I think we should:
|
@misterdjules i can confirm this is still an issue with core dumps from ubuntu created by node 8 i used mdb_v8_amd64.so v1.3 |
@robertkowalski Hey Robert, great to hear from you again! Can you paste the whole output that you got from mdb_v8 in your case? I'd just want to make sure that the error you encountered is the same as the one mention in the original comment for this issue. mdb_v8 currently does not support inspecting core dumps generated from node processes using Node.js at versions > 6.x regardless of on which platform those core dumps were generated, so I'm thinking that you may have encountered different errors. |
ha, you are right, its even a different message
uh noes, yes i read that later in the issue tracker here. core dump tooling for node doesn't look well right now :/ |
@robertkowalski https://github.com/nodejs/llnode supports Node.js at versions > 8.x, but it doesn't provide the same functionality as mdb_v8. |
I have tried multiple times to get the mdb debugger working with core dumps generated on linux to no avail.
The app in question uses node 0.12.7.The node.js process runs in a Cloud Foundry container. The debugging was done on a SmartOS ec2 box.
The latest mdb_V8 module released is 1.1.2 from November 2015. I even tried building from the master and loading it to no avail. Can someone please illustrate how to do this with a simple instructions.
How does one sanity check the inputs to the mdb. Is mdb_v8 module broken for linux cores.
The text was updated successfully, but these errors were encountered: