内核恐慌似乎与这些变化无关

发布于 2024-08-30 13:41:42 字数 384 浏览 3 评论 0原文

我在 Linux 内核 2.4 中对 sched.c 进行了更改(家庭作业),现在系统陷入内核恐慌。奇怪的是:它似乎通过了很多启动检查和初始化,并且仅在最后才出现恐慌,显示以下堆栈跟踪:

update_process_times
do_timer
timer_interrupt
handle_IRQ_event
do_IRQ
call_do_IRQ
do)wp_page
handle_mm_fault
do_page_fault
do_sigaction
sys_rt_sigaction
do_page_fault
error_code

并且错误是:“在中断处理程序中 - 不同步”

我知道这很难说没有任何代码,但任何人都可以做出有根据的猜测来指出我正确的方向吗?

I made changes in sched.c in Linux kernel 2.4 (homework), and now the system goes into kernel panic. The strange thing is: it seems to pass A LOT of booting checks and initializations, and panics only at the very end, showing hte following stack trace:

update_process_times
do_timer
timer_interrupt
handle_IRQ_event
do_IRQ
call_do_IRQ
do)wp_page
handle_mm_fault
do_page_fault
do_sigaction
sys_rt_sigaction
do_page_fault
error_code

And the error is: "In interrupt handler - not synching"

I know it's hard to tell without any code, but can anybody make an educated guess to point me in the right direction?

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

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

发布评论

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

评论(1

咆哮 2024-09-06 13:41:42

在调试内核问题时,我可以给你我自己的个人口头禅:“这总是你的错。”

我经常看到由于覆盖我正在工作的地方之外的内存而导致的问题——例如,如果我向硬件提供了错误的 DMA 地址。你可能不知何故搞坏了一把锁;在这种情况下,如果您看到超时,这似乎是可能的:忘记锁定的锁导致由于挂起而发生超时。

对我来说, update_process_times 中的恐慌可能表明任务结构指针有问题......但我真的不知道。

请记住,在发生故障之前很久,内核中的事情经常会出错,因此代码中任何地方的错误位都可能是罪魁祸首,即使它看起来不应该产生影响。如果可以的话,我建议逐步添加或删除代码并检查问题以查看是否可以隔离它。

I can give you my own personal mantra when debugging kernel problems: "it's always your fault."

I often see issues due to overwriting memory outside where I'm working -- if I feed hardware an incorrect address for DMA for example. You may be screwing up a lock somehow; that seems possible in this case if you are seeing a timeout: a forgotten locked lock is causing a timeout to occur due to a hang.

To me, a panic in update_process_times might suggest a problem with the task struct pointer... but I really have no idea.

Keep in mind that things in the kernel often go wrong long before a failure occurs, so a wrong bit anywhere in your code may be to blame, even if it doesn't seem like it should have an effect. If you can, I recommend incrementally adding or removing your code and checking for the problem to see if you can isolate it.

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