Skip to content

Commit 9ba29bb

Browse files
committed
contest: crash: don't overlap crashes
We include previous 5 lines in the crash to capture all of the intro lines to the warning / splat. Tianyi reports that for short errors like refleak this leads to previous stack trace leaking into the new one. Reset the "previous lines" to make sure this doesn't happen. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9efdb98 commit 9ba29bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

contest/remote/lib/crash.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def extract_crash(outputs, prompt, get_filters):
5555
in_crash &= line[-2:] != '] '
5656
in_crash &= not line.startswith(prompt)
5757
if not in_crash:
58+
last5 = [""] * 5
5859
finger_prints.add(crash_finger_print(get_filters(),
5960
crash_lines[start:]))
6061
else:
@@ -108,11 +109,9 @@ def test_refleak(self):
108109
lines, fingers = extract_crash(TestCrashes.refleak, "xx__->", lambda : None)
109110
self.assertGreater(len(lines), 50)
110111
self.assertEqual(fingers,
111-
{'dev_hard_start_xmit:__dev_queue_xmit:ip6_finish_output2:ip6_finish_output:netdev_get_by_index',
112-
'___sys_sendmsg:__sys_sendmsg:do_syscall_64:dst_init:dst_alloc',
113-
'dst_init:dst_alloc:ip6_dst_alloc:ip6_rt_pcpu_alloc:ip6_pol_route',
114-
'___sys_sendmsg:__sys_sendmsg:do_syscall_64:ipv6_add_dev:addrconf_notify',
115-
'dev_hard_start_xmit:__dev_queue_xmit:arp_solicit:neigh_probe:dst_init'})
112+
{'netdev_get_by_index:fib6_nh_init:nh_create_ipv6:nexthop_create:rtm_new_nexthop',
113+
'ipv6_add_dev:addrconf_notify:notifier_call_chain:register_netdevice:veth_newlink',
114+
'dst_init:dst_alloc:ip6_dst_alloc:ip6_rt_pcpu_alloc:ip6_pol_route'})
116115

117116
def test_hung_task(self):
118117
self.assertTrue(has_crash(TestCrashes.hung_task))

0 commit comments

Comments
 (0)