From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: Faulting linear address?? Date: Fri, 8 Sep 2017 09:40:21 +0200 Message-ID: <1504856421.3847.1.camel@citrix.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6666760542581017114==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Minjun Hong , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============6666760542581017114== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-vfv0rEs7r9eD+n6H0Per" --=-vfv0rEs7r9eD+n6H0Per Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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:=C2=A0 >=20 > (XEN) ----[ Xen-4.5.0 =C2=A0x86_64 =C2=A0debug=3Dn =C2=A0Not tainted ]---= - > First of all, when debugging, you should use a debug hypervisor, i.e., a build of Xen, done with 'debug=3Dy', or in general, with debug enabled. Also, Xen-4.5.0. Can you move to a more recent version? > (XEN) CPU: =C2=A0 =C2=A02 > (XEN) RIP: =C2=A0 =C2=A0e008:[] csched_schedule+0x373/0= x1180 > (XEN) RFLAGS: 0000000000010086 =C2=A0 CONTEXT: hypervisor > [..] > (XEN) Xen call trace: > (XEN) =C2=A0 =C2=A0[] > csched_schedule+0x373/0x1180 > (XEN) =C2=A0 =C2=A0[] schedule+0xf3/0x590 > (XEN) =C2=A0 =C2=A0[] reprogram_timer+0x75/0xe0 > (XEN) =C2=A0 =C2=A0[] timer_softirq_action+0x13e/0x210 > (XEN) =C2=A0 =C2=A0[] __do_softirq+0x7c/0xd0 > (XEN) =C2=A0 =C2=A0[] idle_loop+0x3a/0x70 > Again, use a debug hypervisor, compiled with frame pointers. > (XEN) Pagetable walk from ffff830088002c98: > (XEN) =C2=A0L4[0x106] =3D 0000000086075063 ffffffffffffffff > (XEN) =C2=A0L3[0x002] =3D 0000000086071063 ffffffffffffffff > (XEN) =C2=A0L2[0x040] =3D 0000000000000000 ffffffffffffffff > (XEN) > (XEN) **************************************** > (XEN) Panic on CPU 2: > (XEN) FATAL PAGE FAULT > (XEN) [error_code=3D0000] > (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=C2=A0too 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. >=20 > 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 --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-vfv0rEs7r9eD+n6H0Per Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZskloAAoJEBZCeImluHPuDssP/jQMeqBSfX3LKYsLjdch9cv2 T7jaq+KoWnB4zG0kdQFm2Ch4k97JGYgu0iQ3mmxBEY1DzGqwNq1LPXNmsx0bk6Je M7+ZhzLi3Pp/NpenTaogbYe1DDXFB58lhHL+7wqY1NXTFvaX619GGDPDazAw3TsH J6tMKmdCyLnSSn+QyRn8pmDoGYr2hjZKJQJeRVBYGGem9fSjihpB3axKrRAaSNCs seMpIKKF+FUcRKpGcokviT6LMQ5TmHr1aceWau9KSrWU+xvys72CiTN1JamyBFxD y0CpuVVz0l5g4gRgfOF8CAaeXrcl63Nh85WhdfWP52w3I7EriSuafD7C7ncSREhd QJpeCRHaTDyAtNDE4pxEgCgQwvdIPSwdldq6QbRH+SAkz7ukxRncaNJ4z7Wh9fxm kuq/ji+/yq/ylby0ugth9Y5cV2/4MCjgt2RJ2d2hqtUL09YlX7gw5kp8EHs6GfCq bPPX/xtLNGeUDL9DG8AhhufTME49SyHd68X+91KT9fHjsZ/MX7ZdBF20H4QukyG7 yE2VTaSzbIIn9NW7vtSJPIPgCrACjtLRv7FQgd+Ztuky/HyHUBL7JJXKUW19Zzr8 3E8eaULJRKMAJNeo0lQdvbOq36hv41O61N6UT2PFo5xdkZxqUV8W8WaGwelVKur1 0W6i0NgaN2X4jVTldqQ7 =YSN5 -----END PGP SIGNATURE----- --=-vfv0rEs7r9eD+n6H0Per-- --===============6666760542581017114== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6666760542581017114==--