Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux how to debug OS freeze issue

I am working on a kernel module and a user-space application to test that module.

The problem is that during testing my system hangs/freeze.

I have placed lots of debug prints in the code.

The last message that is printed is just before linux select call in my user-space application. Does select somehow freeze the system?

So, How can i debug that where is problem? whether the problem is on user-space application or kernel module?

like image 702
MA1 Avatar asked May 31 '26 08:05

MA1


1 Answers

As n.m mentioned, your userspace program can't freeze Linux, so its an error in your kernel module. The best way to debug this is to use a kernel debugger, and figure out what your module is doing wrong.

Common errors are uninitialized pointers that your module passes to the kernel or locking issues, so take a close look at those.

like image 94
Vanwaril Avatar answered Jun 01 '26 23:06

Vanwaril



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!