Date: Thu, 15 Oct 2015 15:00:15 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Mattia Rossi <mattia.rossi.mate@gmail.com> Cc: Jason Harmening <jason.harmening@gmail.com>, ARM <freebsd-arm@freebsd.org> Subject: Re: testing of busdma updates for armv5 Message-ID: <20151015120015.GA2257@kib.kiev.ua> In-Reply-To: <561F3B00.80404@gmail.com> References: <561AA64C.5010001@gmail.com> <561B679D.8020501@gmail.com> <CAM=8qa=fHXjX7qGeCSc=M2d7jPLb7D5hfR01mV7X5rgOSbOh2g@mail.gmail.com> <561CEBE4.7060304@gmail.com> <561CEE85.1000301@gmail.com> <561E1312.1030908@gmail.com> <CAM=8qaki5FVKTE=oq7AEBNczTF0Wp8yx73BKVGaymTP8j=ORQw@mail.gmail.com> <561F3B00.80404@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 15, 2015 at 07:34:56AM +0200, Mattia Rossi wrote: > Hi Jason, > > sorry, I don't think your patch has anything to do with it. Since I > updated the source tree from scratch after the previous patch mess, I > must have deleted some patch that I had applied and was using for hte > last year or so, because currently I simply can't get the system to boot > anymore. Something to do with mounting my ufs root fs... > > Fatal kernel mode data abort: 'Alignment Fault 1' > trapframe: 0xd733a720 > FSR=00000001, FAR=0000012b, spsr=60000013 Faulted address is reported as 0x12b, which sounds as if some sort of NULL or NULL-like pointer dereference was performed. The trace below is suspicious, most of the frames are consistent with an attempt to load a module. spa_* symbols should not have anything common with UFS, and runtime module load could only happen after the root is mounted. Do you use zfs, or have zfs module loaded, or zfs compiled into the kernel ? Can you boot into single-user mode ? Please look up the source line for the vaccess+0x58 in your kernel. > r0 =00000000, r1 =000081a4, r2 =00000127, r3 =00000000 > r4 =00000000, r5 =000081a4, r6 =00000100, r7 =00000000 > r8 =00004080, r9 =00000001, r10=00000000, r11=d733a7d0 > r12=d733a824, ssp=d733a7b0, slr=c0d46d60, pc =c0b70768 > > [ thread pid 36 tid 100050 ] > Stopped at vaccess+0x54: ldr r0, [r2, #0x004] > db> bt > Tracing pid 36 tid 100050 td 0xc3c8f350 > db_trace_self() at db_trace_self > pc = 0xc0d85054 lr = 0xc094836c (db_hex2dec+0x1dc) > sp = 0xd733a420 fp = 0xd733a438 > db_hex2dec() at db_hex2dec+0x1dc > pc = 0xc094836c lr = 0xc0947fc4 (db_command_loop+0x2dc) > sp = 0xd733a440 fp = 0xd733a4e0 > r4 = 0x00000001 r5 = 0x00000000 > r6 = 0xc0f3776f r10 = 0xc0ec8f38 > db_command_loop() at db_command_loop+0x2dc > pc = 0xc0947fc4 lr = 0xc0947d34 (db_command_loop+0x4c) > sp = 0xd733a4e8 fp = 0xd733a4f8 > r4 = 0xc0ddc953 r5 = 0xc0dfad18 > r6 = 0xc0f37758 r7 = 0xc0ec924c > r8 = 0xc0f2b420 r9 = 0xc0f2b424 > r10 = 0x00000013 > db_command_loop() at db_command_loop+0x4c > pc = 0xc0947d34 lr = 0xc094a948 (db_fetch_ksymtab+0x298) > sp = 0xd733a500 fp = 0xd733a618 > r4 = 0x00000000 r5 = 0xc0f37764 > r6 = 0xc0f2b440 r10 = 0x00000013 > db_fetch_ksymtab() at db_fetch_ksymtab+0x298 > pc = 0xc094a948 lr = 0xc0b05dd8 (kdb_trap+0xc0) > sp = 0xd733a620 fp = 0xd733a640 > r4 = 0x00000000 r5 = 0x00000001 > r6 = 0xc0f2b440 r7 = 0xc0ec924c > kdb_trap() at kdb_trap+0xc0 > pc = 0xc0b05dd8 lr = 0xc0d96d34 (abort_handler+0x79c) > sp = 0xd733a648 fp = 0xd733a660 > r4 = 0xd733a720 r5 = 0x00000001 > r6 = 0x600000d3 r7 = 0x0000012b > r8 = 0x0000012b r9 = 0x00000001 > r10 = 0x00000013 > abort_handler() at abort_handler+0x79c > pc = 0xc0d96d34 lr = 0xc0d96edc (badaddr_read+0x140) > sp = 0xd733a668 fp = 0xd733a678 > r4 = 0xd733a720 r5 = 0xc3c8f350 > r6 = 0xc0d96e6c r7 = 0x00000000 > badaddr_read() at badaddr_read+0x140 > pc = 0xc0d96edc lr = 0xc0d968a4 (abort_handler+0x30c) > sp = 0xd733a680 fp = 0xd733a718 > r4 = 0xd733a720 r5 = 0xc3c8f350 > abort_handler() at abort_handler+0x30c > pc = 0xc0d968a4 lr = 0xc0d86694 (exception_exit) > sp = 0xd733a720 fp = 0xd733a7d0 > r4 = 0xffffffff r5 = 0xffff1004 > r6 = 0x00000100 r7 = 0x00000000 > r8 = 0x00004080 r9 = 0x00000001 > r10 = 0x00000000 > exception_exit() at exception_exit > pc = 0xc0d86694 lr = 0xc0d46d60 (ufs_vinit+0x490) > sp = 0xd733a7b0 fp = 0xd733a7d0 > r0 = 0x00000000 r1 = 0x000081a4 > r2 = 0x00000127 r3 = 0x00000000 > r4 = 0x00000000 r5 = 0x000081a4 > r6 = 0x00000100 r7 = 0x00000000 > r8 = 0x00004080 r9 = 0x00000001 > r10 = 0x00000000 r12 = 0xd733a824 > vaccess() at vaccess+0x58 > pc = 0xc0b7076c lr = 0xc0d46d60 (ufs_vinit+0x490) > sp = 0xd733a7d8 fp = 0xd733a7f8 > r4 = 0x00000000 r5 = 0x00000100 > r6 = 0x00000127 r7 = 0xc3c8f350 > r8 = 0x00000127 r9 = 0x00000000 > r10 = 0x00000100 > ufs_vinit() at ufs_vinit+0x490 > pc = 0xc0d46d60 lr = 0xc0db2124 (VOP_ACCESSX_APV+0xd4) > sp = 0xd733a800 fp = 0xd733a810 > r4 = 0xd733a81c r5 = 0xc0f07360 > r6 = 0x00000000 r10 = 0x00000100 > VOP_ACCESSX_APV() at VOP_ACCESSX_APV+0xd4 > pc = 0xc0db2124 lr = 0xc0b5e130 (vop_stdaccess+0x4c) > sp = 0xd733a818 fp = 0xd733a838 > r4 = 0xc0f0a9e4 r5 = 0xc0ef32ac > r6 = 0x00000000 r10 = 0x00000100 > vop_stdaccess() at vop_stdaccess+0x4c > pc = 0xc0b5e130 lr = 0xc0db2018 (VOP_ACCESS_APV+0xd4) > sp = 0xd733a840 fp = 0xd733a850 > r4 = 0xd733a88c r10 = 0x00000100 > VOP_ACCESS_APV() at VOP_ACCESS_APV+0xd4 > pc = 0xc0db2018 lr = 0xc0b7c16c (vn_open_vnode+0xf4) > sp = 0xd733a858 fp = 0xd733a8c0 > r4 = 0xc3db27e0 r5 = 0x00000101 > r6 = 0x00000014 r10 = 0x00000100 > vn_open_vnode() at vn_open_vnode+0xf4 > pc = 0xc0b7c16c lr = 0xc0b7be28 (vn_open_cred+0x2fc) > sp = 0xd733a8c8 fp = 0xd733a9b8 > r4 = 0xd733a9d8 r5 = 0xc3db27e0 > r6 = 0xd733a9d8 r7 = 0x00000101 > r8 = 0x00000000 r9 = 0x00000000 > r10 = 0x00000000 > vn_open_cred() at vn_open_cred+0x2fc > pc = 0xc0b7be28 lr = 0xc3dea978 (kobj_open_file+0xa0) > sp = 0xd733a9c0 fp = 0xd733aa98 > r4 = 0xc3fdcd80 r5 = 0x00000000 > r6 = 0xd733a9d8 r7 = 0xc3c8f350 > r8 = 0xc0f09928 r9 = 0xd733abb8 > r10 = 0xc3d11c00 > kobj_open_file() at kobj_open_file+0xa0 > pc = 0xc3dea978 lr = 0xc3e7fc78 (spa_config_load+0x3c) > sp = 0xd733aaa0 fp = 0xd733aac8 > r4 = 0x027b0000 r5 = 0xc3d12400 > r6 = 0xc3f94cb0 r7 = 0x1f7f0000 > r8 = 0x00000003 r10 = 0xc3d11c00 > spa_config_load() at spa_config_load+0x3c > pc = 0xc3e7fc78 lr = 0xc3e86550 (spa_init+0x144) > sp = 0xd733aad0 fp = 0xd733aae8 > r4 = 0x027b0000 r5 = 0xc3f94cfc > r6 = 0xc3f94cb0 r7 = 0x1f7f0000 > r8 = 0x00000003 r9 = 0xd733abb8 > spa_init() at spa_init+0x144 > pc = 0xc3e86550 lr = 0xc3ed5324 ($a.37+0x78) > sp = 0xd733aaf0 fp = 0xd733ab20 > r4 = 0xc3fd72d4 r5 = 0xc3fd72f0 > r6 = 0xc3f8d150 r7 = 0xc3f70bce > r8 = 0xc0f39178 r10 = 0xc3d11c00 > $a.37() at $a.37+0x78 > pc = 0xc3ed5324 lr = 0xc0ab8c78 (module_register_init+0xb0) > sp = 0xd733ab28 fp = 0xd733ab48 > r4 = 0xc0f39150 r5 = 0xc3ceec80 > r6 = 0xc3f8d150 r7 = 0xc3f70bce > r8 = 0xc0f39178 r10 = 0xc3d11c00 > module_register_init() at module_register_init+0xb0 > pc = 0xc0ab8c78 lr = 0xc0aad0dc (linker_reference_module+0xd1c) > sp = 0xd733ab50 fp = 0xd733ada0 > r4 = 0xc0f39178 r5 = 0xc3f73660 > r6 = 0xc3f8d17c r7 = 0xc3cd1780 > r8 = 0xc3ceec80 r9 = 0xd733abb8 > linker_reference_module() at linker_reference_module+0xd1c > pc = 0xc0aad0dc lr = 0xc0aae784 (kern_kldload+0xbc) > sp = 0xd733ada8 fp = 0xd733adc0 > r4 = 0xd733adcc r5 = 0xc3d11c00 > r6 = 0xc3d11c00 r7 = 0x00000000 > r8 = 0xd733adf8 r9 = 0xbfbff9ec > r10 = 0x00000000 > kern_kldload() at kern_kldload+0xbc > pc = 0xc0aae784 lr = 0xc0aae850 (sys_kldload+0x60) > sp = 0xd733adc8 fp = 0xd733ade0 > r4 = 0xc3c8f350 r5 = 0xc3d11c00 > r6 = 0x00000000 r7 = 0x00000000 > sys_kldload() at sys_kldload+0x60 > pc = 0xc0aae850 lr = 0xc0d96278 (swi_handler+0x26c) > sp = 0xd733ade8 fp = 0xd733ae48 > r4 = 0xc3c8f350 r5 = 0xc3c94700 > r6 = 0x60000013 r10 = 0x00000000 > swi_handler() at swi_handler+0x26c > pc = 0xc0d96278 lr = 0xc0d86624 (swi_exit) > sp = 0xd733ae50 fp = 0xbfbffe28 > r4 = 0xbfbfff54 r5 = 0x00000000 > r6 = 0x00000000 r7 = 0x00000130 > r8 = 0x00000001 r9 = 0xbfbff9ec > r10 = 0xbfbff970 > swi_exit() at swi_exit > pc = 0xc0d86624 lr = 0xc0d86624 (swi_exit) > sp = 0xd733ae50 fp = 0xbfbffe28 > db> > > On 14/10/15 18:58, Jason Harmening wrote: > > Oops, that's an assertion I put in _bus_dmamap_load_buffer() to > > prevent data corruption if my assumptions on page layout turned out to > > be wrong. > > But it looks like that assertion is too aggressive and is catching > > something that isn't a bug for armv5 (it would be a bug for armv7 though). > > > > Can you try this patch instead? > > > > On Wed, Oct 14, 2015 at 3:32 AM, Mattia Rossi > > <mattia.rossi.mailinglists@gmail.com > > <mailto:mattia.rossi.mailinglists@gmail.com>> wrote: > > > > Hi Mat, > > > > No worries, it's not that big of a hurry. In fact, here is an > > updated > > patch, which adds a check (ported from x86 busdma) to prevent > > overflow > > of the temporary mappings used for bounce buffers. > > > > Hi Jason, > > > > the kernel seems not to be too happy about your patch - this > > happens immediately after trying to mountroot: > > > > panic: Non-contiguous vm_page_t at addr 0x135c000 > > KDB: enter: panic > > [ thread pid 13 tid 100029 ] > > Stopped at kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! > > db> bt > > Tracing pid 13 tid 100029 td 0xc397c000 > > db_trace_self() at db_trace_self > > pc = 0xc0d84a68 lr = 0xc094836c (db_hex2dec+0x1dc) > > sp = 0xd5f958e8 fp = 0xd5f95900 > > db_hex2dec() at db_hex2dec+0x1dc > > pc = 0xc094836c lr = 0xc0947fc4 (db_command_loop+0x2dc) > > sp = 0xd5f95908 fp = 0xd5f959a8 > > r4 = 0x00000001 r5 = 0x00000000 > > r6 = 0xc0f3326f r10 = 0xc0ec88b8 > > db_command_loop() at db_command_loop+0x2dc > > pc = 0xc0947fc4 lr = 0xc0947d34 (db_command_loop+0x4c) > > sp = 0xd5f959b0 fp = 0xd5f959c0 > > r4 = 0xc0ddc3cf r5 = 0xc0dfa794 > > r6 = 0xc0f33258 r7 = 0xc0ec8bcc > > r8 = 0xc0f27420 r9 = 0xc0f27424 > > r10 = 0xc0b0568c > > db_command_loop() at db_command_loop+0x4c > > pc = 0xc0947d34 lr = 0xc094a948 (db_fetch_ksymtab+0x298) > > sp = 0xd5f959c8 fp = 0xd5f95ae0 > > r4 = 0x00000000 r5 = 0xc0f33264 > > r6 = 0xc0f27440 r10 = 0xc0b0568c > > db_fetch_ksymtab() at db_fetch_ksymtab+0x298 > > pc = 0xc094a948 lr = 0xc0b05dd8 (kdb_trap+0xc0) > > sp = 0xd5f95ae8 fp = 0xd5f95b08 > > r4 = 0x00000000 r5 = 0x00000001 > > r6 = 0xc0f27440 r7 = 0xc0ec8bcc > > kdb_trap() at kdb_trap+0xc0 > > pc = 0xc0b05dd8 lr = 0xc0d971c4 (undefinedinstruction+0x2f8) > > sp = 0xd5f95b10 fp = 0xd5f95b80 > > r4 = 0x00000000 r5 = 0x00000000 > > r6 = 0xc0d96e1c r7 = 0xe7ffffff > > r8 = 0xc397c000 r9 = 0xd5f95b88 > > r10 = 0xc0b0568c > > undefinedinstruction() at undefinedinstruction+0x2f8 > > pc = 0xc0d971c4 lr = 0xc0d860a8 (exception_exit) > > sp = 0xd5f95b88 fp = 0xd5f95c20 > > r4 = 0xffffffff r5 = 0xffff1004 > > r6 = 0xc0e30bd3 r7 = 0xc0f34d78 > > r8 = 0xc0f19548 r9 = 0xc397c000 > > r10 = 0x0135c000 > > exception_exit() at exception_exit > > pc = 0xc0d860a8 lr = 0xc0b05680 (kdb_enter+0x3c) > > sp = 0xd5f95c18 fp = 0xd5f95c20 > > r0 = 0xc0f27434 r1 = 0x00000000 > > r2 = 0xc0dfe674 r3 = 0xc0dfe2cd > > r4 = 0xc0dfa6f1 r5 = 0xd5f95c64 > > r6 = 0xc0e30bd3 r7 = 0xc0f34d78 > > r8 = 0xc0f19548 r9 = 0xc397c000 > > r10 = 0x0135c000 r12 = 0x00000000 > > kdb_enter() at kdb_enter+0x4c > > pc = 0xc0b05690 lr = 0xc0acf358 (vpanic+0xb8) > > sp = 0xd5f95c28 fp = 0xd5f95c40 > > r4 = 0x00000100 r10 = 0x0135c000 > > vpanic() at vpanic+0xb8 > > pc = 0xc0acf358 lr = 0xc0acf270 (kassert_panic+0x110) > > sp = 0xd5f95c48 fp = 0xd5f95c5c > > r4 = 0xc0e30bd3 r5 = 0xd5f95c64 > > r6 = 0xc3cb4000 r7 = 0xd3f1f000 > > r8 = 0xd3f1f000 r9 = 0x00001000 > > kassert_panic() at kassert_panic+0x110 > > pc = 0xc0acf270 lr = 0xc0d82238 > > (_bus_dmamap_load_buffer+0x1bc) > > sp = 0xd5f95c70 fp = 0xd5f95ca8 > > r4 = 0x00001000 r5 = 0x00001000 > > r6 = 0xc3cb4000 r10 = 0x0135c000 > > _bus_dmamap_load_buffer() at _bus_dmamap_load_buffer+0x1bc > > pc = 0xc0d82238 lr = 0xc0aff960 (bus_dmamap_load+0x94) > > sp = 0xd5f95cb0 fp = 0xd5f95cf0 > > r4 = 0x00002000 r5 = 0xd3f1e000 > > r6 = 0xc3cd9460 r7 = 0xc3cbe680 > > r8 = 0xc09af25c r9 = 0xc3ca2c20 > > r10 = 0x00000000 > > bus_dmamap_load() at bus_dmamap_load+0x94 > > pc = 0xc0aff960 lr = 0xc09af244 (usb_pc_load_mem+0x134) > > sp = 0xd5f95cf8 fp = 0xd5f95d18 > > r4 = 0x00002000 r5 = 0xc3ca2c20 > > r6 = 0x00000000 r7 = 0x00000000 > > r8 = 0xc3ca1000 r9 = 0xc3ca1440 > > r10 = 0x00000001 > > usb_pc_load_mem() at usb_pc_load_mem+0x134 > > pc = 0xc09af244 lr = 0xc09af70c (usb_bdma_work_loop+0x28c) > > sp = 0xd5f95d20 fp = 0xd5f95d48 > > r4 = 0xc3ca101c r5 = 0x00000003 > > r6 = 0xc3ca1cd0 r7 = 0xc3ca10ac > > usb_bdma_work_loop() at usb_bdma_work_loop+0x28c > > pc = 0xc09af70c lr = 0xc09c8548 (usb_command_wrapper+0x104) > > sp = 0xd5f95d50 fp = 0xd5f95d58 > > r4 = 0xc3ca101c r5 = 0x00000000 > > r6 = 0x00002000 r7 = 0x00000010 > > r8 = 0xc3721ee0 r9 = 0x00000001 > > r10 = 0x00000000 > > usb_command_wrapper() at usb_command_wrapper+0x104 > > pc = 0xc09c8548 lr = 0xc09c813c (usbd_transfer_submit+0x628) > > sp = 0xd5f95d60 fp = 0xd5f95d80 > > r4 = 0xc3ca1440 r5 = 0xc3721c78 > > usbd_transfer_submit() at usbd_transfer_submit+0x628 > > pc = 0xc09c813c lr = 0xc09acc60 > > (usb_proc_explore_unlock+0x2178) > > sp = 0xd5f95d88 fp = 0xd5f95da8 > > r4 = 0xc3c6e400 r5 = 0xc3ca1440 > > r6 = 0x00002000 r7 = 0x00002000 > > r8 = 0xc3ca1440 r10 = 0x00000000 > > usb_proc_explore_unlock() at usb_proc_explore_unlock+0x2178 > > pc = 0xc09acc60 lr = 0xc09c74d8 (usbd_transfer_setup+0xcb4) > > sp = 0xd5f95db0 fp = 0xd5f95de8 > > r4 = 0xc3ca1030 r5 = 0xc3ca14f3 > > r6 = 0x00000000 r7 = 0xc3ca1000 > > usbd_transfer_setup() at usbd_transfer_setup+0xcb4 > > pc = 0xc09c74d8 lr = 0xc09c8548 (usb_command_wrapper+0x104) > > sp = 0xd5f95df0 fp = 0xd5f95df8 > > r4 = 0xc3ca1030 r5 = 0x00000000 > > r6 = 0xc3721d0c r7 = 0xc3ca1058 > > r8 = 0x00000000 r9 = 0x00000001 > > r10 = 0x00000000 > > usb_command_wrapper() at usb_command_wrapper+0x104 > > pc = 0xc09c8548 lr = 0xc09c76f4 (usbd_transfer_setup+0xed0) > > sp = 0xd5f95e00 fp = 0xd5f95e08 > > r4 = 0xc0de5e81 r5 = 0xc3ca1000 > > usbd_transfer_setup() at usbd_transfer_setup+0xed0 > > pc = 0xc09c76f4 lr = 0xc09c2e20 (usb_proc_create+0x198) > > sp = 0xd5f95e10 fp = 0xd5f95e28 > > r4 = 0xc3721cfc r5 = 0xc3721d04 > > usb_proc_create() at usb_proc_create+0x198 > > pc = 0xc09c2e20 lr = 0xc0aa032c (fork_exit+0x84) > > sp = 0xd5f95e30 fp = 0xd5f95e48 > > r4 = 0xc397c000 r5 = 0xc36a7000 > > r6 = 0xc09c2d78 r7 = 0xc0f09258 > > r8 = 0xd5f95e50 r9 = 0xc3721cfc > > fork_exit() at fork_exit+0x84 > > pc = 0xc0aa032c lr = 0xc0d86038 (swi_exit) > > sp = 0xd5f95e50 fp = 0x00000000 > > r4 = 0xc09c2d78 r5 = 0xc3721cfc > > r6 = 0x00000000 r7 = 0x00000000 > > r8 = 0x00000000 r9 = 0x00000000 > > swi_exit() at swi_exit > > pc = 0xc0d86038 lr = 0xc0d86038 (swi_exit) > > sp = 0xd5f95e50 fp = 0x00000000 > > db> > > > > > > > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151015120015.GA2257>