xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Minjun Hong <nickeysgo@gmail.com>, xen-devel@lists.xen.org
Subject: Re: Faulting linear address??
Date: Fri, 8 Sep 2017 09:40:21 +0200	[thread overview]
Message-ID: <1504856421.3847.1.camel@citrix.com> (raw)
In-Reply-To: <CAFX_q-E5ExGMG48aF1=c=MtdwCTbiTKeqy6n8SSQ6e81-89QHg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3645 bytes --]

On Fri, 2017-09-08 at 14:33 +0900, Minjun Hong wrote:
> 1) I worked on the scheduler(credit scheduler) and I had a kernel
> panic by my modification.
>
To do what?

Can you show here what you are changing, e.g., by putting together a
quick patch?

It does not have to be properly formatted and follow all the rules of a
proper patch submission... it can just be a diff against original code,
to understand what you are changing.

> 2) I tried to get any information for debugging so that, I used
> serial console and could gain the serial logs like following: 
> 
> (XEN) ----[ Xen-4.5.0  x86_64  debug=n  Not tainted ]----
>
First of all, when debugging, you should use a debug hypervisor, i.e.,
a build of Xen, done with 'debug=y', or in general, with debug enabled.

Also, Xen-4.5.0. Can you move to a more recent version?

> (XEN) CPU:    2
> (XEN) RIP:    e008:[<ffff82d080120973>] csched_schedule+0x373/0x1180
> (XEN) RFLAGS: 0000000000010086   CONTEXT: hypervisor
> [..]
> (XEN) Xen call trace:
> (XEN)    [<ffff82d080120973>]
> csched_schedule+0x373/0x1180
> (XEN)    [<ffff82d080128cb3>] schedule+0xf3/0x590
> (XEN)    [<ffff82d08015f295>] reprogram_timer+0x75/0xe0
> (XEN)    [<ffff82d08012f64e>] timer_softirq_action+0x13e/0x210
> (XEN)    [<ffff82d08012c03c>] __do_softirq+0x7c/0xd0
> (XEN)    [<ffff82d080162e3a>] idle_loop+0x3a/0x70
>
Again, use a debug hypervisor, compiled with frame pointers.

> (XEN) Pagetable walk from ffff830088002c98:
> (XEN)  L4[0x106] = 0000000086075063 ffffffffffffffff
> (XEN)  L3[0x002] = 0000000086071063 ffffffffffffffff
> (XEN)  L2[0x040] = 0000000000000000 ffffffffffffffff
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 2:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0000]
> (XEN) Faulting linear address: ffff830088002c98
> (XEN) ****************************************

> I want to know where I should start debugging from.
> However, although I'm using serial console, I could get not enough
> clues only from the kernel log:
> 1) I could figure out what line and file caused the panic by its call
> trace, but it is too rough so it does not help me.
>
That's exactly from where you usually start: looking at what's at the
instruction that cause the system to explode, in your case, at address
0xffff82d080120973.

You can figure that out by disassembling the Xen hypervisor binary,
with `objdump', and looking up that address. Or you can use addr2line,
to have an indication of the same thing, but in the C sources.

I'm not sure what you mean with "it is too rough". At least the address
of the instruction that caused the system to fail in the Xen binary, is
usually pretty accurate (then, of course, you have to look at
surrounding instructions, check how you got there, etc.).

Again, make sure you use a debug hypervisor.

> 2) What linear address brings about this situation; 'Faulting linear
> address', but it is just an address and not recognizable something
> that human cannot read.
> 
> I think, literally, the 'Faulting linear address' is key point
> because I heard that it represents bad address that I should never
> access.
>
It is, but the only way of understanding why you hit such an access
violation, is understand what the code is doing when it happens.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-09-08  7:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08  5:33 Faulting linear address?? Minjun Hong
2017-09-08  7:40 ` Dario Faggioli [this message]
2017-09-10 17:00   ` Minjun Hong
2017-09-11 13:49     ` Dario Faggioli

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=1504856421.3847.1.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=nickeysgo@gmail.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).