Date: Mon, 16 Apr 2018 20:46:55 +0530 From: Udit agarwal <dev.madaari@gmail.com> To: Stanislav Sedov <stas@freebsd.org> Cc: freebsd-arm@freebsd.org, Russell Haley <russ.haley@gmail.com> Subject: Re: kernel panic while building SDIO driver Message-ID: <CAM0bxh8UwrLwC5jjZ-05o5%2Bz0fXakGVgfXhiN-JK3BAjne3UBA@mail.gmail.com> In-Reply-To: <EB523BC3-316D-4907-8238-AF9E15F59DD7@freebsd.org> References: <CAM0bxh9OUK%2BJOuxig6EsiaCB6ke5=MJPab=2EHZ23QyvXN_a6A@mail.gmail.com> <EB523BC3-316D-4907-8238-AF9E15F59DD7@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, The error seems to occur during mmc_scan_lun call (at line 318 freebsd/mmc_xpt.c <https://github.com/freebsd/freebsd/blob/07e520e17e91077fc4187ac8902d2144a3= ecfb5f/sys/cam/mmc/mmc_xpt.c> ) within mmc_action. Also, below is the backtrace info (if it is usefull) db> bt Tracing pid 4 tid 100048 td 0xd2fa0ae0 lock order reversal: (sleepable after non-sleepable) 1st 0xc30e1464 CAM device lock (CAM device lock) @ /BBB/src/sys/cam/cam_xpt.c:832 2nd 0xc07f7718 kernel linker (kernel linker) @ /BBB/src/sys/kern/kern_linker.c:592 stack backtrace: db_trace_self() at db_trace_self pc =3D 0xc0527124 lr =3D 0xc00cf82c (db_stack_trace+0x108) sp =3D 0xd0dc07d8 fp =3D 0xd0dc07f0 db_stack_trace() at db_stack_trace+0x108 pc =3D 0xc00cf82c lr =3D 0xc00cf480 (db_command+0x258) sp =3D 0xd0dc07f8 fp =3D 0xd0dc0898 r4 =3D 0x00000001 r5 =3D 0x00000000 r6 =3D 0xc05c54b9 r10 =3D 0xc086f560 db_command() at db_command+0x258 pc =3D 0xc00cf480 lr =3D 0xc00cf218 (db_command_loop+0x74) sp =3D 0xd0dc08a0 fp =3D 0xd0dc08b0 r4 =3D 0xc059c562 r5 =3D 0xc05bd4c0 r6 =3D 0xc086f54c r7 =3D 0xc06957f0 r8 =3D 0xc06e9849 r9 =3D 0xc0807908 r10 =3D 0x00000010 db_command_loop() at db_command_loop+0x74 pc =3D 0xc00cf218 lr =3D 0xc00d2c34 (db_trap+0x12c) sp =3D 0xd0dc08b8 fp =3D 0xd0dc09d0 r4 =3D 0x00000000 r5 =3D 0xc086f558 On Sun, Apr 15, 2018 at 11:23 PM, Stanislav Sedov <stas@freebsd.org> wrote: > > > On Apr 15, 2018, at 8:01 AM, Udit agarwal <dev.madaari@gmail.com> wrote= : > > > > Hi, > > I have been trying to build the kernel (for BBB) invoking SDIO driver > from > > FreeBSD latest src tree using BEAGLEBONE-MMCCAM kernconf file(Yes, I > added > > that file manually). I seems like the kernel panics due to sleep > > lock(complete logs: > > https://gist.github.com/madaari/4779d75e7f1ab88369318a40cb026d9b ) > > > > mmc_dev_async(async_code=3D0x20, path_id=3D1, target_id=3D0, lun_id=3D0 > > Got AC_PATH_REGISTERED -- whatever... > > mmc_dev_async(async_code=3D0x20, path_id=3D1, target_id=3Dffffffff, > > lun_id=3Dffffffff > > usbus0: 480Mbps High Speed USB v2.0 > > usbus1: 480Mbps High Speed USB v2.0 > > (noperiph:sdhci_slot0:0:-1:ffffffff): XPT_SCAN_{BUS,TGT,LUN} > > Kernel page fault with the following non-sleepable locks held: > > exclusive sleep mutex CAM device lock (CAM device lock) r =3D 0 > (0xc30e1464) > > lock2 > > stack backtrace: > > Fatal kernel mode data abort: 'Translation Fault (L1)' on read > > trapframe: 0xd0dc0ac0 > > FSR=3D00000005, FAR=3D00000010, spsr=3D60000013 > > r0 =3D00000061, r1 =3D00000188, r2 =3Dd0dc0a8c, r3 =3D60000013 > > r4 =3Dc30e0000, r5 =3Dc30dec40, r6 =3D00000000, r7 =3Dd0dc0b68 > > r8 =3Dc086f528, r9 =3Dc068f050, r10=3D00000000, r11=3Dd0dc0d10 > > r12=3D00000062, ssp=3Dd0dc0b50, slr=3Dc002b77c, pc =3Dc002b5c0 > > [ thread pid 4 tid 100048 ] > > Stopped at mmc_action+0x94: ldr r6, [r6, #0x010] > > db> > > > > Any idea how to resolve this? > > > > It actually panicked on read fault (see L1 translation failure) on trying > to read the address which isn=E2=80=99t mapped. From the obstruction pri= nted, it > appears to be r6, which is 0x0 =E2=80=94 most likely a NULL pointer deref= erence in > the code. What is at mmc_action+0x95 in your kernel? > > -- > Stas >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM0bxh8UwrLwC5jjZ-05o5%2Bz0fXakGVgfXhiN-JK3BAjne3UBA>