0
votes
0answers
19 views

How to display printk messages filtered by level as they come?

I wrote a hello word module that performs a printk when it is loaded in level ALERT and another printk when it is released with level INFO: #include <linux/module.h> #include ...
3
votes
0answers
38 views

Kernel bisect: when a patch is failing for a reason other than original bisect purpose, what do you do? [on hold]

Let's say you're trying to find the cause of a bug between 3.11.0 and 3.12.0. The bug is really difficult to catch, because it may or may not manifest itself over several days of regular workload ...
0
votes
1answer
299 views

How to enable printk selectively?

I want to print some statements from kernel but not all. So can I use printk selectively? By selectively I mean I want to enable printk only at particular places and disable it everywhere else. ...
0
votes
2answers
131 views

System too slow [closed]

My linux system is responding very slowly.I should wait to get the result of my command. How can i investigate to know the problem of his behavior?
7
votes
2answers
836 views

How exactly does printk work internally?

I know printf needs help from the OS to do its job. I also know printf does not work in the Linux source code as there is no library. And so we have printk for debugging. How does printk work ...
1
vote
1answer
283 views

Resolving executable user stack trace addresses in ftrace

I'm trying to obtain a user stack trace in ftrace, but for some reason, only my user program cannot resolve the addresses to symbols. First, the OS I'm using is: $ uname -a Linux mypc ...
10
votes
2answers
834 views

Observing a hard-disk write in kernel space (with drivers/modules)

Apologies in advance if this post is a bit dense/messy, but I'm having a hard time formulating it better... Basically, I would like to study what happens upon a hard disk write, and I'd like to know: ...
2
votes
1answer
250 views

How can I run gdb in one machine and run kgdb kernel in another machine?

I want to run two machine: debugged machine: compiled kernel with kgdb option. debugger machine: for running gdb How can I debug machine 1 from machine 2?
2
votes
0answers
55 views

kgdb not returning control to gdb

I've compiled a kernel with kgdb support and I'm trying to debug it. I have two machines running, a debug machine (running the kgdb kernel) and the machine I'm using to debug it. They are connected ...
4
votes
1answer
2k views

Kernel and QEMU : Unable to mount root fs error

I am trying to run a distro in the virtual disk image with a custom kernel,so that I can experiment and debug the kernel. I followed this to make a disk image and then install Debian to it. Now I ...
2
votes
1answer
865 views

Debugging Linux Kernel with QEMU

I was trying to study the debugging of kernel using QEMU. I tried initially and failed due to the fact that there was no virtual file system. The answers to this post suggests that there should be a ...
1
vote
1answer
168 views

Linux, Debugger program development

We are trying to implement the debugger program which will takes either PID or Program name as input and Invoke the gdb by using PID. Below is two small programs are written, Not able to figure out ...
7
votes
1answer
1k views

How to debug system freeze?

I'm experiencing strange bug when I close lid of my laptop - system freezes (no reaction on keys, no response form ssh) hard and displays some strange colour effects. The kernel log (after reboot) ...
4
votes
1answer
2k views

What is the difference between /proc/self/stack and output from pstack?

I have been looking through the documentation for /proc and the "stack" object being a new'ish object in proc, I have also looked through the kernel commit to create it -- however the documentation ...