I have been trying to upgrade unit tests to use boost from host instead of
depending on externals. One one the previous patches I sent fixed
compilation errors.
However when I update the tests makefile and manifest file I see that some
tests fail with very similar page fault error on Fedora 30 which comes with
boost 1.69.0. The same tests pass just fine on latest Ubuntu 19.10 hat
comes with older boost 1.67.0.
Here is the patch:
diff --git a/modules/tests/Makefile b/modules/tests/Makefile
index e4ef8dcc..a5633308 100644
--- a/modules/tests/Makefile
+++ b/modules/tests/Makefile
@@ -177,12 +177,9 @@ zfs-only-boost-tests := tst-rename.so
boost-tests += $($(fs_type)-only-boost-tests)
-BOOSTLIBS=$(src)/external/$(ARCH)/misc.bin/usr/lib64
$(boost-tests:%=$(out)/tests/%): LIBS += \
- $(BOOSTLIBS)/libboost_unit_test_framework.so \
- $(BOOSTLIBS)/libboost_filesystem.so
-$(boost-tests:%=$(out)/tests/%): CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0 \
- -isystem $(src)/external/$(ARCH)/misc.bin/usr/include
+ -lboost_unit_test_framework \
+ -lboost_filesystem
tests += $(boost-tests)
diff --git a/modules/tests/usr.manifest.skel
b/modules/tests/usr.manifest.skel
index 2de441f9..7653760a 100644
--- a/modules/tests/usr.manifest.skel
+++ b/modules/tests/usr.manifest.skel
@@ -1,4 +1,4 @@
-/usr/lib/&/libboost_unit_test_framework.so.1.55.0: %(miscbase)s/usr/lib64/&
-/usr/lib/&/libboost_filesystem.so.1.55.0: %(miscbase)s/usr/lib64/&
-/usr/lib/&/libboost_system.so.1.55.0: %(miscbase)s/usr/lib64/&
+/usr/lib/&/libboost_unit_test_framework.so.1.69.0: /lib64/&
+/usr/lib/&/libboost_filesystem.so.1.69.0: /lib64/&
+/usr/lib/&/libboost_system.so.1.69.0: /lib64/&
/testrunner.so: ./tests/testrunner.so
The error looks similar and affects tst-rcu-hashtable, tst-rcu-list and
tst-rename. There may be more tests after tst-rename that fail like that:
TEST tst-rcu-hashtable.so Running OSv on qemu with
parameters: [-s -e --power-off-on-abort /tests/tst-rcu-hashtable.so
--pass-args=-monitor unix:qemu-monitor,server,nowait --block-device-cache
unsafe]
OSv v0.54.0-44-g5526c8ab
eth0: 192.168.122.15
Booted up in 186.88 ms
Cmdline: /tests/tst-rcu-hashtable.so
Running 2 test cases...
*** No errors detected
Aborted
[backtrace]
0x00000000402197c3 <???+1075943363>
0x0000000040463f7e <osv::handle_mmap_fault(unsigned long, int,
exception_frame*)+30>
0x000000004033da01 <mmu::vm_fault(unsigned long, exception_frame*)+385>
0x000000004039d62f <page_fault+143>
0x000000004039c486 <???+1077527686>
0x000010000041f5f6 <???+4322806>
0x0000000040352c5c <elf::object::run_fini_funcs()+140>
0x0000000040354616 <elf::program::remove_object(elf::object*)+118>
0x0000000040354e30 <???+1077235248>
0x0000000040354ae4 <elf::program::remove_object(elf::object*)+1348>
0x0000000040354e30 <???+1077235248>
0x000000004042c14f <osv::application::join()+623>
0x000000004022a504 <do_main_thread(void*)+2644>
0x000000004045fdb5 <???+1078328757>
0x00000000403f9ce7 <thread_main_c+39>
0x000000004039d402 <???+1077531650>
Test tst-rcu-hashtable.so FAILED
Traceback (most recent call last):
File "./scripts/test.py", line 204, in <module>
main()
File "./scripts/test.py", line 183, in main
run_tests()
File "./scripts/test.py", line 174, in run_tests
run(tests_to_run)
File "./scripts/test.py", line 94, in run
run_test(test)
File "./scripts/test.py", line 69, in run_test
test.run()
File "/git-repos/osv/scripts/tests/testing.py", line 38, in run
run_command_in_guest(self.command, hypervisor=self.hypervisor,
run_py_args=self.run_py_args).join()
File "/git-repos/osv/scripts/tests/testing.py", line 186, in join
raise Exception('Guest failed')
Exception: Guest failed
Somewhat broken gdb stacktrace looks like this:
(gdb) bt
#0 0x00000000403a36f2 in processor::cli_hlt () at arch/x64/processor.hh:247
#1 arch::halt_no_interrupts () at arch/x64/arch.hh:48
#2 osv::halt () at arch/x64/power.cc:26
#3 0x0000000040239d4e in abort (fmt=fmt@entry=0x406414bf "Aborted\n")
at runtime.cc:132
#4 0x00000000402028ab in abort () at runtime.cc:98
#5 0x00000000402197c4 in osv::generate_signal (siginfo=...,
ef=0xffff80000123c068) at libc/signal.cc:124
#6 0x0000000040463f7f in osv::handle_mmap_fault (addr=<optimized out>,
sig=<optimized out>, ef=<optimized out>) at libc/signal.cc:139
#7 0x000000004033da02 in mmu::vm_fault (addr=17592187015168,
addr@entry=17592187015648, ef=ef@entry=0xffff80000123c068)
at core/mmu.cc:1337
#8 0x000000004039d630 in page_fault (ef=0xffff80000123c068)
at arch/x64/mmu.cc:42
#9 <signal handler called>
#10 0x00001000000ed1e0 in ?? ()
#11 0x000000004023a2f7 in __cxxabiv1::__cxa_finalize (dso=<optimized out>)
at runtime.cc:183
#12 0x000010000041f5f7 in ?? ()
#13 0x0000200000100940 in ?? ()
#14 0x0000000040352c5d in elf::object::run_fini_funcs
(this=0xffffa0000160ee00)
at core/elf.cc:1070
It happens consistently. Any idea what might be wrong?
Waldek
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/osv-dev/5539bd38-a7d8-485f-ba51-40b90c16d0f5%40googlegroups.com.