[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#952404: scanbd: crash on startup: kernel internal error: Oops 206 with current raspbian buster on rpi4 4g



Thanks for testing, I appreciate it very much!

I am interested which exact commands you were using for qemu?
I haven't used it for emulating the raspi yet and had some trouble finding useful/working settings.
The qemu model versatiblepb ('-M versatilepb') works for emulating the initial raspi1
and it provides networking. While the latest model I found working is '-M raspi3' 
with '-dtb bcm2710-rpi-3-b.dtb' from the raspbian image.
However, I did not get it running with raspi4 related settings
('-cpu cortex-a72' and '-dtb bcm2711-rpi-4-b.dtb' and 4G RAM).

I used the following script for raspi1 emulation and setting up the raspbian image
with networking for upgrading the system ('apt-get update && apt-get dist-upgrade')
and installing scanbd ('apt-get install scanbd'):

    imgfn=2020-02-13-raspbian-buster-lite.img
    offset="$(fdisk -l "$imgfn" | awk '/img2/ {print $2}')"
    offset=$((offset*512))
    mountp=/mnt/raspbian
    sudo mkdir -p "$mountp"
    sudo mount -v -o offset=$offset -t ext4 "$imgfn" "$mountp"
    sudo sh -c "echo > $mountp/etc/ld.so.preload"
    sudo umount "$mountp"
    qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -serial stdio -audiodev none,id=none -drive format=raw,file="$imgfn" -kernel kernel-qemu-4.19.50-buster -dtb versatile-pb.dtb -append 'root=/dev/sda2 panic=1 rootfstype=ext4 rw' -no-reboot -nic user,model=virtio-net-pci,hostfwd=tcp::5022-:22

After these preparations, to emulate the raspi3 on aarch64, I used:

    qemu-system-aarch64 -M raspi3 -cpu cortex-a53 -m 1024 -kernel kernel8.img -serial mon:stdio -nographic -audiodev none,id=none -drive format=raw,file="$imgfn" -dtb bcm2710-rpi-3-b.dtb -append 'console=ttyAMA0 root=PARTUUID=738a4d67-02 rootwait rootfstype=ext4 rw' -no-reboot

Right after successful boot, I showed my that scanbd is defunct:

    # ps ax | grep scanbd
      245 ?        Zsl    0:09 [scanbd] <defunct>
      422 ttyAMA0  S+     0:00 grep scanbd

Killing that defunct process and restarting scanbd in foreground produced
an Oops as well (reproducible in this raspi3 qemu setting):

    # kill -9 245
    root@raspberrypi:~# ps ax | grep scanbd
      424 ttyAMA0  S+     0:00 grep scanbd
    root@raspberrypi:~# export SANE_CONFIG_DIR=/etc/scanbd
    root@raspberrypi:~# scanbd -f -c /etc/scanbd/scanbd.conf
    scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
    [  248.273492] Unable to handle kernel paging request at virtual address ffffffbefee003bd
    [  248.276850] Mem abort info:
    [  248.277181]   ESR = 0x96000006
    [  248.277520]   Exception class = DABT (current EL), IL = 32 bits
    [  248.277979]   SET = 0, FnV = 0
    [  248.278249]   EA = 0, S1PTW = 0
    [  248.278618] Data abort info:
    [  248.281919]   ISV = 0, ISS = 0x00000006
    [  248.282685]   CM = 0, WnR = 0
    [  248.283296] swapper pgtable: 4k pages, 39-bit VAs, pgdp = 0000000017e1e18d
    [  248.284288] [ffffffbefee003bd] pgd=0000000000d66003, pud=0000000000d66003, pmd=0000000000000000
    [  248.287752] Internal error: Oops: 96000006 [#2] PREEMPT SMP
    [  248.288350] Modules linked in: sha256_generic cfg80211 rfkill 8021q garp stp llc raspberrypi_hwmon hwmon uio_pdrv_genirq uio ip_tables x_tables ipv6
    [  248.290447] Process scanbd (pid: 432, stack limit = 0x000000005b20de07)
    [  248.291505] CPU: 1 PID: 432 Comm: scanbd Tainted: G      D W         4.19.97-v8+ #1294
    [  248.291791] Hardware name: Raspberry Pi 3 Model B (DT)
    [  248.292221] pstate: 40000005 (nZcv daif -PAN -UAO)
    [  248.293119] pc : read_port+0xa8/0x138
    [  248.293338] lr : __vfs_read+0x60/0x178
    [  248.293529] sp : ffffff800a513cc0
    [  248.293709] x29: ffffff800a513cc0 x28: ffffffc034f71d00 
    [  248.294015] x27: 0000000000000000 x26: 0000000000000000 
    [  248.294281] x25: 0000000046000000 x24: 0000000000000011 
    [  248.294650] x23: 00000000ffea3b23 x22: ffffff800a513e20 
    [  248.294950] x21: 00000000ffea3b23 x20: ffffff800a513e20 
    [  248.295227] x19: 0000000000000001 x18: 0000000000000000 
    [  248.295493] x17: 0000000000000000 x16: 0000000000000001 
    [  248.295740] x15: 0000000000000000 x14: 0000000000000000 
    [  248.296279] x13: 0000000000000000 x12: 0000000000000000 
    [  248.296943] x11: ffffffbefee00000 x10: 0000000000000000 
    [  248.297399] x9 : 00000000ffea3b23 x8 : 000000000000ffff 
    [  248.297889] x7 : ffffffc034f71d00 x6 : 00000000000003bd 
    [  248.298162] x5 : 0000000000000000 x4 : 00000000ffea3b23 
    [  248.298652] x3 : 0000007fffffffff x2 : ffffffbefee003bd 
    [  248.299031] x1 : 00000000ffea3b23 x0 : 0000007fffffffff 
    [  248.299815] Call trace:
    [  248.300313]  read_port+0xa8/0x138
    [  248.300845]  __vfs_read+0x60/0x178
    [  248.301218]  vfs_read+0x94/0x150
    [  248.301902]  ksys_read+0x74/0xf0
    [  248.302460]  __arm64_sys_read+0x24/0x30
    [  248.304005]  el0_svc_common+0xf4/0x1c0
    [  248.304744]  el0_svc_compat_handler+0x30/0x40
    [  248.305163]  el0_svc_compat+0x8/0x18
    [  248.306136] Code: ea20009f 9a9f0089 d503229f 8b0b00c2 (39400042) 
    [  248.308521] ---[ end trace 70c280beaea0275a ]---

    Message from syslogd@raspberrypi at Mar  4 18:53:49 ...
     kernel:[  248.287752] Internal error: Oops: 96000006 [#2] PREEMPT SMP

    Message from syslogd@raspberrypi at Mar  4 18:53:49 ...
     kernel:[  248.290447] Process scanbd (pid: 432, stack limit = 0x000000005b20de07)

    Message from syslogd@raspberrypi at Mar  4 18:53:49 ...
     kernel:[  248.306136] Code: ea20009f 9a9f0089 d503229f 8b0b00c2 (39400042)

A note on the environment:
qemu 4.2 on ubuntu focal (upcoming 20.04) was used which itself was running in
a virtual machine (VMware, 4 cores, 8G RAM) to have the latest available package.

    root@raspberrypi:~# lsb_release -a
    No LSB modules are available.
    Distributor ID:	Raspbian
    Description:	Raspbian GNU/Linux 10 (buster)
    Release:	10
    Codename:	buster

    root@raspberrypi:~# lscpu | grep Arch
    Architecture:        aarch64

    root@raspberrypi:~# uname -r
    4.19.97-v8+

I am happy to provide more information, just let me know.
Thanks for reading!


Reply to: