-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some cht tests failed for 32-bit MIPS and ARMv5TE targets #87
Comments
Terminal log from the testing (MIPS)On the host$ cross test --target mips-unknown-linux-musl --no-default-features
Finished test [unoptimized + debuginfo] target(s) in 0.34s
Running unittests (/target/mips-unknown-linux-musl/debug/deps/moka-a8b7658fdc5b39d9)
running 61 tests
test cht::segment::map::tests::concurrent_growth ... memory allocation of 1052 bytes failed
error: test failed, to rerun pass '--lib'
Caused by:
process didn't exit successfully: `qemu-mips /target/mips-unknown-linux-musl/debug/deps/moka-a8b7658fdc5b39d9` (signal: 6, SIGABRT: process abort signal)
^C
$ file ./target/mips-unknown-linux-musl/debug/deps/moka-a8b7658fdc5b39d9
./target/mips-unknown-linux-musl/debug/deps/moka-a8b7658fdc5b39d9:
ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1,
dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75,
with unknown capability 0x10000 = 0x70403, not stripped In the VM (MIPS)$ qemu-system-mips -version
QEMU emulator version 6.1.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
$ qemu-system-mips -M malta \
-hda openwrt-21.02.1-malta-be-rootfs-ext4.img \
-kernel openwrt-21.02.1-malta-be-vmlinux.elf \
-nographic -append "root=/dev/sda console ttyS0"
...
OpenWrt 21.02.1, r16325-88151b8303
root@OpenWrt:~# uname -a
Linux OpenWrt 5.4.154 #0 SMP Sun Oct 24 09:01:35 2021 mips GNU/Linux
root@OpenWrt:~# scp -p $REMOTE_HOST:moka/target/mips-unknown-linux-musl/debug/deps/moka-a8b7658fdc5b39d9 moka-tests
root@OpenWrt:~# ls -l
-rwxr-xr-x 1 root root 68371460 Feb 7 00:53 moka-tests
root@OpenWrt:~# ./moka-tests --test-threads 1 cht
running 18 tests
test cht::segment::map::tests::concurrent_growth ... ok
test cht::segment::map::tests::concurrent_growth_and_removal ... ok
test cht::segment::map::tests::concurrent_insert_with_or_modify ... ok
test cht::segment::map::tests::concurrent_insertion ... ok
test cht::segment::map::tests::concurrent_insertion_and_removal ... ok
test cht::segment::map::tests::concurrent_overlapped_growth ... ok
test cht::segment::map::tests::concurrent_overlapped_insertion ... ok
test cht::segment::map::tests::concurrent_overlapped_removal ... ok
test cht::segment::map::tests::concurrent_removal ... ok
test cht::segment::map::tests::drop_many_values ... ok
test cht::segment::map::tests::drop_many_values_concurrent ... ok
test cht::segment::map::tests::drop_value ... ok
test cht::segment::map::tests::growth ... ok
test cht::segment::map::tests::insert_with_or_modify ... ok
test cht::segment::map::tests::insertion ... ok
test cht::segment::map::tests::removal ... ok
test cht::segment::map::tests::remove_if ... ok
test cht::segment::map::tests::single_segment ... ok
test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out; finished in 2145.54s
root@OpenWrt:~# poweroff |
Closing this issue for now without confirming the one failing test on ARMv5TE. I will reopen if necessary. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For v0.7.2, we copied some source files of the concurrent hash table (cht) from moka-cht crate and removed moka-cht from the dependencies. When we enabled tests for the cht in Moka, we saw some tests failed for 32-bit MIPS and ARMv5TE targets. We disabled these failing tests and released v0.7.2. #86 (comment)
Since then, I have done some investigation, and came to the following conclusion:
Here is a summary of my investigation:
The issue
Some cht tests failed for 32-bit MIPS and ARMv5TE targets. These platforms are used by the some users of aliyundrive-webdav because SoC chips with these architectures are still common in home Wi-Fi routers and NAS models.
Failing tests
mips-unknown-linux-musl
andmipsel-unknown-linux-musl
targetsconcurrent_growth
concurrent_growth_and_removal
concurrent_insert_with_or_modify
concurrent_insertion
concurrent_insertion_and_removal
concurrent_overlapped_insertion
concurrent_overlapped_removal
concurrent_removal
Error
memory allocation of 1052 bytes failed. signal: 6, SIGABRT: process abort signal.
armv5te-unknown-linux-musleabi
targetconcurrent_overlapped_growth
Error
signal: 4, SIGILL: illegal instruction
Some backgrounds
cross test
) is more complicated. It relies on QEMU emulation, so testing may fail due to QEMU bugs rather than bugs in your crate."Investigation: Running the tests on a VM instead of the user space emulator
To check whether or not those failures are caused by the issues with the user space emulator, I ran the same tests using the system emulator with a MIPS-based emulated CPU (
qemu-system-mips -M malta
).OpenWrt project distributes firmware (embedded Linux) files that can run on QEMU system emulators. One of these firmware files is for MIPS architecture: "OpenWrt in QEMU MIPS"
Steps
qemu-system-mips
(a virtual machine) using the OpenWrt firmware.Result (MIPS)
I verified that all cht tests succeeded on the MIPS system emulator. I concluded the failures were due to some issues in the user space emulator and we can safely ignore them.
A note on ARMv5TE architecture
I could not do the same test for ARMv5TE.
versatileab
,versatilepb
) emulate ARMv5TE-base SoCs:The text was updated successfully, but these errors were encountered: