All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrej.skvortzov@gmail.com (Andrey Skvortsov)
To: kernelnewbies@lists.kernelnewbies.org
Subject: module debugging
Date: Tue, 25 Aug 2015 16:40:26 +0300	[thread overview]
Message-ID: <20150825134026.GA16214@localhost.localdomain> (raw)
In-Reply-To: <CANLpX=76+3g-+Dz-kO6uan8SjTxLXWtuyD-FMn6U_bja=iV1XQ@mail.gmail.com>

On 22 Aug, Salam Farhat wrote:
> On Fri, Aug 21, 2015 at 8:33 AM, <Valdis.Kletnieks@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 

  reply	other threads:[~2015-08-25 13:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 11:06 module debugging Salam Farhat
2015-08-21 12:03 ` leo kirotawa
2015-08-21 12:33 ` Valdis.Kletnieks at vt.edu
2015-08-22 11:46   ` Salam Farhat
2015-08-25 13:40     ` Andrey Skvortsov [this message]
2015-08-23  9:40 ` Fabien R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150825134026.GA16214@localhost.localdomain \
    --to=andrej.skvortzov@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.