"kyua test -k /usr/tests/Kyuafile" got Bus Error on arm (rpi2) under FreeBSD projects/clang380-import -r295601

Mark Millard markmi at dsl-only.net
Sat Feb 20 06:06:51 UTC 2016


Context: armv7-a/cortex-a7 (on a RPI2B) with SCTLR bit[1]==1 so requiring strict alignment. "kyua test -k /usr/tests/Kyuafile" on a FreeBSD projects/clang380-import -r295601 build.

> usr.sbin/rpcbind/addrmerge_test:addrmerge_bindip6  ->  *** Fatal signal 10 received
> *** Log file is /root/.kyua/logs/kyua.20160220-020456.log
> *** Please report this problem to kyua-discuss at googlegroups.com detailing what you were doing before the crash happened; if possible, include the log file mentioned above
> Bus error (core dumped)

The tail of the large log file looks like:

> 20160220-035605 I 69058 utils/cmdline/ui.cpp:103: stdout: usr.sbin/rpcbind/addrmerge_test:addrmerge_bindip  ->  
> 20160220-035605 I 69058 engine/scheduler.cpp:1084: Spawning /usr/tests/usr.sbin/rpcbind/addrmerge_test:addrmerge_bindip
> 20160220-035605 I 69058 utils/process/executor.cpp:774: Spawned subprocess with exec_handle 99534
> 20160220-035605 I 69058 utils/process/executor.cpp:630: Waited for subprocess with exec_handle 99534
> 20160220-035605 I 69058 utils/process/executor.cpp:368: Cleaning up exit_handle for exec_handle 99534
> 20160220-035605 I 69058 utils/cmdline/ui.cpp:103: stdout: failed: 1 checks failed; see output for more details  [0.017s]
> 20160220-035605 I 69058 utils/cmdline/ui.cpp:103: stdout: usr.sbin/rpcbind/addrmerge_test:addrmerge_bindip6  ->  
> 20160220-035605 I 69058 engine/scheduler.cpp:1084: Spawning /usr/tests/usr.sbin/rpcbind/addrmerge_test:addrmerge_bindip6
> 20160220-035605 I 69058 utils/process/executor.cpp:774: Spawned subprocess with exec_handle 99535
> 20160220-035605 I 69058 utils/process/executor.cpp:630: Waited for subprocess with exec_handle 99535
> 20160220-035605 W 69058 utils/process/executor.cpp:350: Implicitly cleaning up exit_handle for exec_handle 99535; ignoring errors!
> 20160220-035605 I 69058 utils/process/executor.cpp:368: Cleaning up exit_handle for exec_handle 99535

gdb of the core dump shows:

> (gdb) print/x $pc
> $2 = 0x1c000
> (gdb) bt
> #0  std::__1::__tree_next<std::__1::__tree_node_base<void*>*> (__x=0xbfbfd274) at __tree:126
> warning: (Internal error: pc 0x56c3f in read in psymtab, but not in symtab.)
> 
> #1  0x00056c40 in std::__1::__tree<std::__1::__value_type<int, long long>, std::__1::__map_value_compare<int, std::__1::__value_type<int, long long>, std::__1::less<int>, true>, std::__1::allocator<std::__1::__value_type<int, long long> > >::erase () at __tree:647
> warning: (Internal error: pc 0x56c40 in read in psymtab, but not in symtab.)
> 
> warning: (Internal error: pc 0x56c3f in read in psymtab, but not in symtab.)
> 
> #2  0x0005180c in drivers::run_tests::drive (kyuafile_path=@0xbfbfd8f0, build_root=<value optimized out>, store_path=@0xbfbfd964, filters=@0xbfbfd8e0, user_config=@0xbfbfddc4, hooks=@0xbfbfd908)
>     at map:1232
> warning: (Internal error: pc 0x409bb in read in psymtab, but not in symtab.)
> 
> #3  0x000409bc in cli::cmd_test::run () at cli/cmd_test.cpp:158
> warning: (Internal error: pc 0x409bc in read in psymtab, but not in symtab.)
> 
> warning: (Internal error: pc 0x409bb in read in psymtab, but not in symtab.)
> 
> #4  0x0001ba40 in utils::cmdline::base_command<utils::config::tree>::main (this=0x20a1b640, ui=0xbfbfe9cc, args=@0xbfbfdeb4, data=@0xbfbfddc4) at base_command.ipp:96
> #5  0x000127b0 in (anonymous namespace)::run_subcommand (ui=0xbfbfe9cc, command=0x20a1b640, args=@0xbfbfdeb4, user_config=@0xbfbfddc4) at cli/main.cpp:139
> #6  0x00011a24 in (anonymous namespace)::safe_main (ui=0xbfbfe9cc, argc=4, argv=0xbfbfed0c, mock_command=<value optimized out>) at cli/main.cpp:228
> #7  0x0000f458 in cli::main (ui=0xbfbfe9cc, argc=4, argv=0xbfbfed0c, mock_command=<value optimized out>) at cli/main.cpp:280
> #8  0x00012104 in cli::main (argc=4, argv=0xbfbfed0c) at cli/main.cpp:353
> #9  0x0000ee84 in main (argc=4, argv=0xbfbfed0c) at main.cpp:49

> (gdb) x/32i $pc-124
> 0x1bf84 <_ZNSt3__13mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_3setIS6_NS_4lessIS6_EENS4_IS6_EEEES9_NS4_INS_4pairIKS6_SB_EEEEED2Ev+40>:	pop	{r11, pc}
> 0x1bf88 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_>:	sub	sp, sp, #84	; 0x54
> 0x1bf8c <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+4>:	mov	r1, r0
> 0x1bf90 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+8>:	str	r0, [sp, #24]
> 0x1bf94 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+12>:	ldr	r0, [r0, #4]
> 0x1bf98 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+16>:	add	r2, sp, #32	; 0x20
> 0x1bf9c <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+20>:	str	r2, [sp, #40]
> 0x1bfa0 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+24>:	mvn	r2, #0	; 0x0
> 0x1bfa4 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+28>:	str	r2, [sp, #36]
> 0x1bfa8 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+32>:	ldr	r2, [sp, #40]
> 0x1bfac <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+36>:	mov	r3, #0	; 0x0
> 0x1bfb0 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+40>:	str	r3, [r2]
> 0x1bfb4 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+44>:	ldr	r2, [sp, #32]
> 0x1bfb8 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+48>:	str	r1, [sp, #8]
> 0x1bfbc <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+52>:	str	r0, [sp, #4]
> 0x1bfc0 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+56>:	str	r2, [sp]
> 0x1bfc4 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+60>:	b	0x1bfc8 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+64>
> 0x1bfc8 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+64>:	ldr	r0, [sp]
> 0x1bfcc <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+68>:	str	r0, [sp, #12]
> 0x1bfd0 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+72>:	add	r1, sp, #12	; 0xc
> 0x1bfd4 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+76>:	str	r1, [sp, #80]
> 0x1bfd8 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+80>:	b	0x1bfdc <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+84>
> 0x1bfdc <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+84>:	ldr	r0, [sp, #4]
> 0x1bfe0 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+88>:	cmp	r0, #0	; 0x0
> 0x1bfe4 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+92>:	beq	0x1c058 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+208>
> 0x1bfe8 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+96>:	b	0x1bfec <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+100>
> 0x1bfec <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+100>:	ldr	r0, [sp, #24]
> 0x1bff0 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+104>:	ldr	r0, [r0, #4]
> 0x1bff4 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+108>:	str	r0, [sp, #60]
> 0x1bff8 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+112>:	b	0x1bffc <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+116>
> 0x1bffc <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+116>:	ldr	r0, [sp, #60]
> 0x1c000 <_ZNSt3__111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_+120>:	ldr	r0, [r0]
> (gdb) info reg
> r0             0x1	1
> r1             0xbfbfd018	-1077948392
> r2             0x0	0
> r3             0x0	0
> r4             0xbfbfd080	-1077948288
> r5             0xbfbfd964	-1077946012
> r6             0xbfbfd8ec	-1077946132
> r7             0xbfbfd8f0	-1077946128
> r8             0x0	0
> r9             0xbfbfed20	-1077940960
> r10            0xbfbfed0c	-1077940980
> r11            0xbfbfd108	-1077948152
> r12            0xbfbfd274	-1077947788
> sp             0xbfbfd00c	-1077948404
> lr             0x56c40	355392
> pc             0x1c000	114688
> fps            0x20810d70	545328496
> cpsr           0x20000010	536870928

For reference:

> #0  std::__1::__tree_next<std::__1::__tree_node_base<void*>*> (__x=0xbfbfd274) at __tree:126
> 126	    while (__x->__left_ != nullptr)

> #1  0x00056c40 in std::__1::__tree<std::__1::__value_type<int, long long>, std::__1::__map_value_compare<int, std::__1::__value_type<int, long long>, std::__1::less<int>, true>, std::__1::allocator<std::__1::__value_type<int, long long> > >::erase () at __tree:647
> 647	          __tree_next(static_cast<typename __node::base::pointer>(__ptr_)));

> #2  0x0005180c in drivers::run_tests::drive (kyuafile_path=@0xbfbfd8f0, build_root=<value optimized out>, store_path=@0xbfbfd964, filters=@0xbfbfd8e0, user_config=@0xbfbfddc4, hooks=@0xbfbfd908)
>     at map:1232
> 1232	    iterator erase(iterator __p)       {return __tree_.erase(__p.__i_);}

> #3  0x000409bc in cli::cmd_test::run () at cli/cmd_test.cpp:158
> 158	    const drivers::run_tests::result result = drivers::run_tests::drive(

The FreeBSD port was built in a context with:

> # more /etc/make.conf 
> DEFAULT_VERSIONS+=perl5=5.22
> WRKDIRPREFIX=/usr/obj/portswork
> WITH_DEBUG=
> WITH_DEBUG_FILES=
> MALLOC_PRODUCTION=
> TO_TYPE=armv6
> TOOLS_TO_TYPE=arm-gnueabi
> VERSION_CONTEXT=11.0
> CFLAGS+=-target ${TO_TYPE}--freebsd${VERSION_CONTEXT}-gnueabi -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=softfp -mno-unaligned-access


Attempting to get a report for what kyua completed before the failure results in:

# kyua report --results-file=/usr/tests
kyua: E: Invalid metadata schema: attempt to write a readonly database (sqlite op: sqlite3_prepare_v2) (sqlite db: /root/.kyua/store/results.usr_tests.20160220-020457-015507.db).


===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-arm mailing list