rx / gdbsim-r5f562n7 / serial errors
Host environment
- Operating system: Fedora 34
- OS/kernel version: Linux hostname 5.12.15-300.fc34.x86_64 #1 SMP Wed Jul 7 19:46:50 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Architecture: x86_64
- QEMU flavor: qemu-system-rx
- QEMU version: QEMU emulator version 6.0.90 (v6.1.0-rc0-139-g202abcd3)
- QEMU command line: './qemu-system-rx -display none -vga none -chardev socket,id=mon,path=/var/tmp/avo_qemu_sock_is9cwmyn/qemu-301098-monitor.sock -mon chardev=mon,mode=control -machine gdbsim-r5f562n7 -chardev socket,id=console,path=/var/tmp/avo_qemu_sock_is9cwmyn/qemu-301098-console.sock,server=on,wait=off -serial c hardev:console -kernel /home/cleber/avocado/data/cache/by_location/5d29c6014ce65b96ded6262d802b731fe6932d45/zImage -dtb /home/cleber/avocado/data/cache/by_location/511 dea4840e5a58c711a8d07fccbb3e5edbebe1c/rx-virt.dtb -no-reboot'
Emulated/Virtualized environment
- Operating system: Linux
- OS/kernel version: Linux version 4.19.0+
- Architecture: rx
Description of problem
Test hangs (about once every two executions) because the console emits an error and expected content is not found. Console content on a failed test execution:
15:49:05 DEBUG| Linux version 4.19.0+ (yo-satoh@yo-satoh-debian) (gcc version 9.0.0 20181105 (experimental) (GCC)) #137 Wed Feb 20 23:20:02 JST 2019
15:49:05 DEBUG| Built 1 zonelists, mobility grouping on. Total pages: 8128
15:49:05 DEBUG| Kernel command line:
15:49:05 DEBUG| Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
15:49:05 DEBUG| Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
15:49:05 DEBUG| Memory: 14648K/32768K available (871K kernel code, 95K rwdata, 140K rodata, 96K init, 175K bss, 18120K reserved, 0K cma-reserved)
15:49:05 DEBUG| NR_IRQS: 256
15:49:05 DEBUG| rx-cmt: used for periodic clock events
15:49:05 DEBUG| clocksource: rx-tpu: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1274173631191 ns
15:49:05 DEBUG| 96.00 BogoMIPS (lpj=480000)
15:49:05 DEBUG| pid_max: default: 4096 minimum: 301
15:49:05 DEBUG| Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
15:49:05 DEBUG| Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
15:49:05 DEBUG| clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
15:49:05 DEBUG| clocksource: Switched to clocksource rx-tpu
15:49:05 DEBUG| workingset: timestamp_bits=30 max_order=12 bucket_order=0
15:49:05 DEBUG| SuperH (H)SCI(F) driver initialized
15:49:05 DEBUG| 88240.serial: ttySC0 at MMIO 0x88240 (irq = 215, base_baud = 0) is a sci
15:49:05 DEBUG| console [ttySC0] enabled
15:49:05 DEBUG| 88248.serial: ttySC1 at MMIO 0x88248 (irq = 219, base_baud = 0) is a sci
15:49:05 DEBUG| random: get_random_bytes called from 0x01002e48 with crng_init=0
15:49:05 DEBUG| Freeing unused kernel memory: 96K
15:49:05 DEBUG| This architecture does not have kernel memory protection.
15:49:05 DEBUG| Run /sbin/init as init process
15:49:05 DEBUG| Run /etc/init as init process
15:49:05 DEBUG| Run /bin/init as init process
15:49:05 DEBUG| Run /bin/sh as init process
15:49:05 DEBUG| Sash command shell (version 1.1.1)
15:49:05 DEBUG| />sh-sci 88240.serial: overrun error
15:49:05 DEBUG| sh-sci 88240.serial: frame error
15:49:05 DEBUG| sh-sci 88240.serial: parity error
15:49:09 DEBUG| random: fast init done
Instead of the last 4 lines seen here, a successful test contains:
20:59:53 DEBUG| Sash command shell (version 1.1.1)
20:59:53 DEBUG| /> printenv
20:59:53 DEBUG| HOME=/
20:59:53 DEBUG| TERM=linux
20:59:53 DEBUG| >>> {'execute': 'quit'}
20:59:53 DEBUG| <<< {'return': {}}
It was also observed that the test is much more prone to fail when it runs restricted to a single CPU (with taskset). It's not clear to me if this is a Kernel or QEMU issue.
Steps to reproduce
- ./configure --target-list=rx-softmmu
- meson compile
- make check-venv
- ./tests/venv/bin/avocado run tests/acceptance/machine_rx_gdbsim.py:RxGdbSimMachine.test_linux_sash