module debugging

Andrey Skvortsov andrej.skvortzov at gmail.com
Tue Aug 25 09:40:26 EDT 2015


On 22 Aug, Salam Farhat wrote:
> On Fri, Aug 21, 2015 at 8:33 AM, <Valdis.Kletnieks at vt.edu> wrote:
> 
> > On Fri, 21 Aug 2015 07:06:58 -0400, Salam Farhat said:
> >
> > > I am using a kernel module that I modified slightly to work on my current
> > > kernel version. It is running on a virtual machine and on a heavy load it
> > > goes into an infinite loop and freezes the system. I can tell that the
> > > virtual machine is using 100% of its assigned cpu.
> >
> > Try giving the VM a second virtual CPU, if you have only one CPU and it
> > gets hung sufficiently hard, the debugging stuff won't have a chance to
> > run.
> >
> > Oh, and make sure you configure your kernel for SMP.
> >
> 
> It has 4 cores and kernel is already configured for smp.
> 
> Sysrq is a pretty cool option, but other than reboot almost no other
> commands run including 'e', 'f', ;i;.
> 
> It seems I might have to resort to debugging by the process of elimination
> (removing code until it doesn't hang and so on.. ).
> 
> Any other ideas I would appreciate it.
If you use qemu-kvm to run your VM, you could try to use gdb to debug
your kernel running inside of VM.

man qemu:

 -s  Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234.


-- 
Best regards,
Andrey Skvortsov

Secure eMail with gnupg: See http://www.gnupg.org/
PGP Key ID: 0x57A3AEAD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150825/89f7fc7d/attachment.bin 


More information about the Kernelnewbies mailing list