diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-01-14 17:41:04 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-14 17:41:04 +0100 |
| commit | f034b65deaeaffccf8d1053ec2701f941ec6dd18 (patch) | |
| tree | 24c2538569da431e22023f197a8286a58f667e0d | |
| parent | 744a007c1935c734a72775488c9ae0c2d0a90153 (diff) | |
pkg/report: add parsing of trusty crashes
Update #933
| -rw-r--r-- | pkg/report/linux.go | 13 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/guilty/42 | 25 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/353 | 42 | ||||
| -rw-r--r-- | pkg/report/testdata/linux/report/354 | 41 |
4 files changed, 121 insertions, 0 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go index fe55ebb99..b438461a8 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -85,6 +85,7 @@ func ctorLinux(target *targets.Target, kernelSrc, kernelObj string, ignores []*r regexp.MustCompile(`^net/core/sock.c`), regexp.MustCompile(`^net/core/skbuff.c`), regexp.MustCompile(`^fs/proc/generic.c`), + regexp.MustCompile(`^trusty/`), // Trusty sources are not in linux kernel tree. } // These pattern do _not_ start a new report, i.e. can be in a middle of another report. ctx.reportStartIgnores = []*regexp.Regexp{ @@ -1408,4 +1409,16 @@ var linuxOopses = []*oops{ }, []*regexp.Regexp{}, }, + { + []byte("trusty: panic"), + []oopsFormat{ + { + title: compile("trusty: panic.* ASSERT FAILED"), + report: compile("trusty: panic \\(.*?\\):(?: DEBUG)? ASSERT FAILED at \\(.*?\\): (.*)"), + fmt: "trusty: ASSERT FAILED: %[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, } diff --git a/pkg/report/testdata/linux/guilty/42 b/pkg/report/testdata/linux/guilty/42 new file mode 100644 index 000000000..4e2b61919 --- /dev/null +++ b/pkg/report/testdata/linux/guilty/42 @@ -0,0 +1,25 @@ +FILE: drivers/trusty/trusty.c + +trusty: app-mgmt-test-srv2: 146: Channel wait failed: 0(4) +trusty: panic (caller 0xffffffffe000fbb8): ASSERT FAILED at (trusty/kernel/lib/trusty/ipc.c:472): !list_in_list(&chan->node) +trusty: HALT: (reason = 9) +trusty crashed[ 388.879777] ------------[ cut here ]------------ +WARNING: CPU: 0 PID: 36 at drivers/trusty/trusty.c:215 trusty_std_call32+0x220/0x240 drivers/trusty/trusty.c:215 +Kernel panic - not syncing: panic_on_warn set ... + +CPU: 0 PID: 36 Comm: kworker/0:1 Not tainted 4.9.22-622951-geb1249894645c-dirty #15 +Hardware name: linux,dummy-virt (DT) +Workqueue: trusty-nop-wq nop_work_func +Call trace: +[<ffff200008091958>] dump_backtrace+0x0/0x440 arch/arm64/kernel/traps.c:69 +[<ffff200008091db8>] show_stack+0x20/0x30 arch/arm64/kernel/traps.c:219 +[<ffff20000893a0a8>] __dump_stack lib/dump_stack.c:15 [inline] +[<ffff20000893a0a8>] dump_stack+0x100/0x150 lib/dump_stack.c:51 +[<ffff20000832d678>] panic+0x208/0x3e0 kernel/panic.c:179 +[<ffff20000811acb8>] __warn+0x280/0x2f0 kernel/panic.c:542 +[<ffff200008939138>] report_bug+0x1a8/0x270 lib/bug.c:170 +[<ffff200008092174>] bug_handler.part.2+0x3c/0xf8 arch/arm64/kernel/traps.c:682 +[<ffff200008092278>] bug_handler+0x48/0x68 arch/arm64/kernel/traps.c:679 +[<ffff200008085c3c>] call_break_hook arch/arm64/kernel/debug-monitors.c:300 [inline] +[<ffff200008085c3c>] brk_handler+0x1e4/0x2e0 arch/arm64/kernel/debug-monitors.c:316 +[<ffff200008081a78>] do_debug_exception+0xd0/0x230 arch/arm64/mm/fault.c:665 diff --git a/pkg/report/testdata/linux/report/353 b/pkg/report/testdata/linux/report/353 new file mode 100644 index 000000000..73a61ec76 --- /dev/null +++ b/pkg/report/testdata/linux/report/353 @@ -0,0 +1,42 @@ +TITLE: trusty: ASSERT FAILED: !list_in_list(&chan->node) + +[ 1117.120317] trusty: app-mgmt-test-srv2: 146: Channel wait failed: 0(4) +[ 1117.129650] trusty: panic (caller [ 1117.140866] trusty: 0xffffffffe000fbb8): ASSERT FAILED at (trusty/kernel/lib/trusty/ipc.c:472): !list_in_list(&chan->node) +[ 1117.141580] trusty: HALT: (reason = 9) +[ 1117.182531] trusty crashed[ 1117.184796] ------------[ cut here ]------------ +[ 1117.186349] WARNING: CPU: 0 PID: 4 at drivers/trusty/trusty.c:215 trusty_std_call32+0x220/0x240 +[ 1117.187036] Kernel panic - not syncing: panic_on_warn set ... +[ 1117.187036] +[ 1117.188047] CPU: 0 PID: 4 Comm: kworker/0:0 Not tainted 4.9.22-622951-geb1249894645c-dirty #15 +[ 1117.188495] Hardware name: linux,dummy-virt (DT) +[ 1117.189224] Workqueue: trusty-nop-wq nop_work_func +[ 1117.189958] Call trace: +[ 1117.190313] [<ffff200008091958>] dump_backtrace+0x0/0x440 +[ 1117.190782] [<ffff200008091db8>] show_stack+0x20/0x30 +[ 1117.191180] [<ffff20000893a0a8>] dump_stack+0x100/0x150 +[ 1117.191568] [<ffff20000832d678>] panic+0x208/0x3e0 +[ 1117.191959] [<ffff20000811acb8>] __warn+0x280/0x2f0 +[ 1117.192355] [<ffff200008939138>] report_bug+0x1a8/0x270 +[ 1117.192772] [<ffff200008092174>] bug_handler.part.2+0x3c/0xf8 +[ 1117.193201] [<ffff200008092278>] bug_handler+0x48/0x68 +[ 1117.193601] [<ffff200008085c3c>] brk_handler+0x1e4/0x2e0 +[ 1117.194006] [<ffff200008081a78>] do_debug_exception+0xd0/0x230 +[ 1117.194498] Exception stack(0xffff8000738e37f0 to 0xffff8000738e3920) +[ 1117.195005] 37e0: 00000000fffffff5 0001000000000000 +[ 1117.195491] 3800: ffff8000738e3a30 ffff2000093a2ed0 0000000080000145 000000000000003d +[ 1117.196038] 3820: 1ffff0000e71c75c ffff200009c8a180 ffff8000728cb5a0 ffff200009c8a140 +[ 1117.196568] 3840: 0000000041b58ab3 ffff200009e881a8 ffff2000080819a8 0000000000000000 +[ 1117.197038] 3860: 1ffff0000e71c75c ffff200009c8a180 ffff8000728cb5a0 0000000000000000 +[ 1117.197501] 3880: ffff8000738a4b4c 0000000000000000 0000000000000000 000000000e714969 +[ 1117.197965] 38a0: 0000000000000000 0000000000000000 ffff8000738e3a30 ffff8000738e3a30 +[ 1117.198429] 38c0: ffff8000738e39f0 00000000ffffffc8 ffff8000738e3910 ffff20000832e7f0 +[ 1117.198952] 38e0: ffff10000e71c72a ffff200009c8a140 ffff8000738e3a30 ffff8000738e3a30 +[ 1117.199416] 3900: 000000000000000e ffff8000738a4380 0000000000000000 1ffff0000e714969 +[ 1117.199954] [<ffff200008083658>] el1_dbg+0x18/0x74 +[ 1117.200329] [<ffff2000093a2fc8>] nop_work_func+0xd8/0x180 +[ 1117.200726] [<ffff20000816143c>] process_one_work+0x75c/0x11a0 +[ 1117.201130] [<ffff200008162274>] worker_thread+0x3f4/0x1080 +[ 1117.201523] [<ffff200008172f58>] kthread+0x258/0x2b8 +[ 1117.201894] [<ffff200008083e80>] ret_from_fork+0x10/0x50 +[ 1117.203628] Kernel Offset: disabled +[ 1117.203954] Memory Limit: none diff --git a/pkg/report/testdata/linux/report/354 b/pkg/report/testdata/linux/report/354 new file mode 100644 index 000000000..c2a277f53 --- /dev/null +++ b/pkg/report/testdata/linux/report/354 @@ -0,0 +1,41 @@ +TITLE: trusty: ASSERT FAILED: list_in_list(&ref->ref_node) + +[ 740.950561] trusty: panic (caller 0xffffffffe000fbd0): DEBUG ASSERT FAILED at (trusty/kernel/include/shared/lk/reflist.h:63): list_in_list(&ref->ref_node) +[ 740.951499] trusty: HALT: (reason = 9) +[ 740.964262] trusty crashed[ 740.966534] ------------[ cut here ]------------ +[ 740.968400] WARNING: CPU: 0 PID: 36 at drivers/trusty/trusty.c:215 trusty_std_call32+0x220/0x240 +[ 740.969096] Kernel panic - not syncing: panic_on_warn set ... +[ 740.969096] +[ 740.970247] CPU: 0 PID: 36 Comm: kworker/0:1 Not tainted 4.9.22-622951-geb1249894645c-dirty #15 +[ 740.970818] Hardware name: linux,dummy-virt (DT) +[ 740.971636] Workqueue: trusty-nop-wq nop_work_func +[ 740.972429] Call trace: +[ 740.972895] [<ffff200008091958>] dump_backtrace+0x0/0x440 +[ 740.973426] [<ffff200008091db8>] show_stack+0x20/0x30 +[ 740.973891] [<ffff20000893a0a8>] dump_stack+0x100/0x150 +[ 740.974456] [<ffff20000832d678>] panic+0x208/0x3e0 +[ 740.974977] [<ffff20000811acb8>] __warn+0x280/0x2f0 +[ 740.975577] [<ffff200008939138>] report_bug+0x1a8/0x270 +[ 740.976211] [<ffff200008092174>] bug_handler.part.2+0x3c/0xf8 +[ 740.976808] [<ffff200008092278>] bug_handler+0x48/0x68 +[ 740.977374] [<ffff200008085c3c>] brk_handler+0x1e4/0x2e0 +[ 740.977947] [<ffff200008081a78>] do_debug_exception+0xd0/0x230 +[ 740.978686] Exception stack(0xffff8000739f37f0 to 0xffff8000739f3920) +[ 740.979605] 37e0: 00000000fffffff5 0001000000000000 +[ 740.980306] 3800: ffff8000739f3a30 ffff2000093a2ed0 0000000080000145 000000000000003d +[ 740.980779] 3820: 1ffff0000e73e75c ffff200009c8a180 ffff8000729835a0 ffff200009c8a140 +[ 740.981252] 3840: 0000000041b58ab3 ffff200009e881a8 ffff2000080819a8 0000000000000000 +[ 740.981719] 3860: 1ffff0000e73e75c ffff200009c8a180 ffff8000729835a0 0000000000000000 +[ 740.982176] 3880: ffff8000739dcb4c 0000000000000000 0000000000000000 000000000e73b969 +[ 740.982640] 38a0: 0000000000000000 0000000000000000 ffff8000739f3a30 ffff8000739f3a30 +[ 740.983101] 38c0: ffff8000739f39f0 00000000ffffffc8 ffff8000739f3910 ffff20000832e7f0 +[ 740.983578] 38e0: ffff10000e73e72a ffff200009c8a140 ffff8000739f3a30 ffff8000739f3a30 +[ 740.984038] 3900: 000000000000000e ffff8000739dc380 0000000000000000 1ffff0000e73b969 +[ 740.984586] [<ffff200008083658>] el1_dbg+0x18/0x74 +[ 740.984970] [<ffff2000093a2fc8>] nop_work_func+0xd8/0x180 +[ 740.985366] [<ffff20000816143c>] process_one_work+0x75c/0x11a0 +[ 740.985777] [<ffff200008162274>] worker_thread+0x3f4/0x1080 +[ 740.986163] [<ffff200008172f58>] kthread+0x258/0x2b8 +[ 740.986581] [<ffff200008083e80>] ret_from_fork+0x10/0x50 +[ 740.987974] Kernel Offset: disabled +[ 740.988352] Memory Limit: none |
