当 glibc 改变时内核发生恐慌

发布于 2024-12-18 11:19:18 字数 356 浏览 5 评论 0原文

对于自定义板,我对 malloc 代码中的 glibc 做了一些更改。替换根文件系统中的 glibc 并编译内核以拥有此根文件系统。当内核启动时,我收到内核恐慌并显示错误:

  not syncing- attempted to kill init!

Here init is a link to busybox which is Dynamicly generated。

我相信这是因为 init 进程无法运行,因为它可能试图访问 glibc 的功能,最终导致它崩溃。您能否告诉我此时 glibc 是否会出现?如果是,我如何才能到达故障位置,因为内核恐慌没有为我提供有用的信息。

谢谢, 卡皮尔

for a custom board, i made few changes to glibc in malloc code. replaced the glibc in the root filesystem and compiled the kernel to have this root-filesystem. When the kernel boots, i get a kernel panic with error:

  not syncing- attempted to kill init!

Here init is a link to busybox which is compiled dynamically.

I believe its due to the fact that the init process is not able to run because it might be trying to access glibc's functionality which eventually causes it to crash. Can you please tell me if at this time glibc will be even present?, and if yes, how can i reach to the location of the fault as the kernel panic does not provides me useful info.

thanks,
Kapil

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖阳 2024-12-25 11:19:18

我不知道你的问题的直接答案,但我总是这样做来获取更多信息来调试此类问题(内核恐慌),它总是对我有帮助。您应该启用内核 oops 模块功能。当发生内核恐慌时,这将为您提供在内核恐慌之前调用的所有例程的追溯。它在终端上打印它。在崩溃之前了解系统来自何处非常有帮助。我不知道你使用的是什么平台,但我使用的是 ARM,我可以从菜单配置中做到这一点。其他平台可能也类似。

I don't know a straight answer to your question but here is what I always do to get more information to debug that kind of problem (kernel panic) and it always helped me. You should enable the Kernel oops module feature. When a kernel panic happen, this will give you a trace back of all routine that were called before that kernel panic. It prints it on the terminal. It is very helpful to see where the system comes from before the crash. I don't know what platform you are using but I'm using ARM and I can do that from the menu config. It's probably similar for other platform.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文