Skip to content
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

[question] emtpy result when read core file #427

Open
kevalin opened this issue Jan 4, 2023 · 2 comments
Open

[question] emtpy result when read core file #427

kevalin opened this issue Jan 4, 2023 · 2 comments

Comments

@kevalin
Copy link

kevalin commented Jan 4, 2023

I use docker container to run Node.js apps. Sometimes, I got many core files, like this core.33067 that It is about 650M size.
So I copy the core files to my pc DebianOS, has same node version v14.16.0.

root@bullseye:/vagrant_data/core-files# llnode node -c core.30066
(lldb) target create "node" --core "core.30066"
Core file '/vagrant_data/core-files/core.30066' (x86_64) was loaded.

(lldb) plugin load '/usr/local/share/.config/yarn/global/node_modules/llnode/llnode.so'
(lldb) settings set prompt '(llnode) '
(llnode) v8 bt
[llnode][LoadConstant ../src/constants.cc:88] Failed to load constant frametype_JavaScriptFrame, default to -1
[llnode][DoExecute ../src/llnode.cc:82] Failed to load pointer from v8 memory
 * thread #1: tid = 30066, 0x00007f44e26619f3, name = 'node', stop reason = signal SIGABRT
  * frame #0: 0x00007f44e26619f3
(llnode) exit

I don't know anyone step is wrong. Do I use same os env to read core file? I don't know.
Could u help me? Thanks.

@No9
Copy link
Member

No9 commented Jan 4, 2023

Hi @kevalin
It seems like you are debugging a crashed docker process rather than the node.js process.
Can you confirm how you are running the docker container to obtain the node.js core dump?

I would expect to see something like the following.
Note the explicit volume mount so that the guest container can save to shared storage:
e.g. docker run --ulimit core=-1 --mount source=coredumps_volume,target=/cores ab3ca583c907 ./node command

And how the the host kernel.core_pattern is configured.
e.g. On the docker host run sysctl -n kernel.core_pattern

@kevalin
Copy link
Author

kevalin commented Jan 9, 2023

Hi @kevalin It seems like you are debugging a crashed docker process rather than the node.js process. Can you confirm how you are running the docker container to obtain the node.js core dump?

I would expect to see something like the following. Note the explicit volume mount so that the guest container can save to shared storage: e.g. docker run --ulimit core=-1 --mount source=coredumps_volume,target=/cores ab3ca583c907 ./node command

And how the the host kernel.core_pattern is configured. e.g. On the docker host run sysctl -n kernel.core_pattern

Hello @No9

This is my docker host config

[root@xxx-0001 ~]# sysctl -n kernel.core_pattern
core
[root@xxx-0001 ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63455
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65535
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 63455
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

login in docker container

/app # sysctl -a | grep core
kernel.core_pattern = core
kernel.core_pipe_limit = 0
kernel.core_uses_pid = 1

App directory of docker container has mounted to host volume, so I can read core file on my host.

@kevalin kevalin closed this as completed Jan 9, 2023
@kevalin kevalin reopened this Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants