分析来自Node.js的核心转储的工具 [英] Tools to analyze core dump from Node.js

查看:89
本文介绍了分析来自Node.js的核心转储的工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用gcore进行Node.js进程的代码转储,那么最好的分析工具是什么?

If I use gcore to make a code dump of a Node.js process, what are the best tools to analyze it?

灵感来自: 分析Java核心转储的工具

在我的特定情况下,我有兴趣调查一些内存泄漏,因此,我真的很想进行一些堆分析.也欢迎使用通用工具,甚至仪器包和技术.我发现Node.js非常有趣,但是运行时分析工具还不存在.

In my specific case, I'm interested in investigating some memory leaks, so I'm really curious to get some heap analysis. General tools and even instrumentation packages and techniques are also welcome. I'm finding Node.js to be very interesting, but the runtime analysis tools are just not there yet.

推荐答案

对于调查崩溃,我发现

For investigating crashes, I've found node-segfault-handler to be invaluable. It's a module I cooked up to get a native-code stack trace in the event of a hard-crash with a signal - eg deref of NULL leading to SIGSEGV

为了调查内存/分配问题,以下是我到目前为止收集的一些数据:

For investigating memory / allocation issues, here's some of the data I've collected thus far:

1) Dave Patheco的博客文章-作者讨论了如何使用MDB插件来获取JS堆栈等.不幸的是,据我所知,该插件的源代码从未发布过(也没有任何二进制形式).

1) Blog post by Dave Patheco - the author talks about using a plugin to MDB for getting JS stacks and such. Sadly, as far as I can tell, the source of that plugin was never released (nor any binary form).

2)动态环境中的事后调试-《 ACM队列》文章也由作者撰写Dave Patheco(从博客文章链接).尽管它可以用于出色的背景阅读,但本文并没有很多具体的工具和技术.

2) Postmortem Debugging in Dynamic Environments - ACM Queue article also written by Dave Patheco (linked from the blog post). While it makes for GREAT background reading, the article doesn't have many concrete tools and techniques in it.

3) node-panic -一种纯JS工具,用于在发生以下情况时转储状态断言失败类型崩溃.无助于调试源自本机代码错误(SIGSEGV等)的崩溃

3) node-panic - A pure-JS tool for dumping state in the event of an assert-failure type crash. Does nothing to help debug crashes that originate from native code faults (SIGSEGV, etc)

4) Joyent:调试生产系统-Bryan Cantrill在他推荐的工具和技术(谢谢).

4) Joyent: Debugging Production Systems - talk by Bryan Cantrill on the tools and techniques he recommends (thx crickeys).

这篇关于分析来自Node.js的核心转储的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆