From bc03b8a24e21274c42f6ed3f1617578fa3996dbd Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Wed, 5 Apr 2017 17:51:04 +0200 Subject: report: more regexps for parsing report header lines --- report/report.go | 24 ++++++++++++++++++++-- report/report_test.go | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/report/report.go b/report/report.go index 0fc8f03ab..90930196d 100644 --- a/report/report.go +++ b/report/report.go @@ -43,7 +43,7 @@ var oopses = []*oops{ "KASAN: %[1]v", }, { - compile("BUG: unable to handle kernel paging request(?:.*\\n)+?.*IP: {{PC}} +{{FUNC}}"), + compile("BUG: unable to handle kernel paging request(?:.*\\n)+?.*IP: (?:{{PC}} +)?{{FUNC}}"), "BUG: unable to handle kernel paging request in %[1]v", }, { @@ -51,7 +51,7 @@ var oopses = []*oops{ "BUG: unable to handle kernel paging request", }, { - compile("BUG: unable to handle kernel NULL pointer dereference(?:.*\\n)+?.*IP: {{PC}} +{{FUNC}}"), + compile("BUG: unable to handle kernel NULL pointer dereference(?:.*\\n)+?.*IP: (?:{{PC}} +)?{{FUNC}}"), "BUG: unable to handle kernel NULL pointer dereference in %[1]v", }, { @@ -70,6 +70,14 @@ var oopses = []*oops{ compile("BUG: .*still has locks held!(?:.*\\n)+?.*{{PC}} +{{FUNC}}"), "BUG: still has locks held in %[1]v", }, + { + compile("BUG: bad unlock balance detected!(?:.*\\n)+?.*{{PC}} +{{FUNC}}"), + "BUG: bad unlock balance in %[1]v", + }, + { + compile("BUG: held lock freed!(?:.*\\n)+?.*{{PC}} +{{FUNC}}"), + "BUG: held lock freed in %[1]v", + }, { compile("BUG: Bad rss-counter state"), "BUG: Bad rss-counter state", @@ -104,6 +112,18 @@ var oopses = []*oops{ compile("INFO: possible circular locking dependency detected \\](?:.*\\n)+?.*is trying to acquire lock(?:.*\\n)+?.*at: {{PC}} +{{FUNC}}"), "possible deadlock in %[1]v", }, + { + compile("INFO: possible irq lock inversion dependency detected \\](?:.*\\n)+?.*just changed the state of lock(?:.*\\n)+?.*at: {{PC}} +{{FUNC}}"), + "possible deadlock in %[1]v", + }, + { + compile("INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected \\](?:.*\\n)+?.*is trying to acquire(?:.*\\n)+?.*at: {{PC}} +{{FUNC}}"), + "possible deadlock in %[1]v", + }, + { + compile("INFO: possible recursive locking detected \\](?:.*\\n)+?.*is trying to acquire lock(?:.*\\n)+?.*at: {{PC}} +{{FUNC}}"), + "possible deadlock in %[1]v", + }, { compile("INFO: inconsistent lock state \\](?:.*\\n)+?.*takes(?:.*\\n)+?.*at: {{PC}} +{{FUNC}}"), "inconsistent lock state in %[1]v", diff --git a/report/report_test.go b/report/report_test.go index c6aa57a05..5112dae59 100644 --- a/report/report_test.go +++ b/report/report_test.go @@ -30,6 +30,11 @@ unrelateed line [ 772.919010] RSP: 0018:ffff880066befc88 EFLAGS: 00010006 `: `BUG: unable to handle kernel paging request in __memset`, + ` +[ 1019.110825] BUG: unable to handle kernel paging request at 000000010000001a +[ 1019.112065] IP: skb_release_data+0x258/0x470 +`: `BUG: unable to handle kernel paging request in skb_release_data`, + ` BUG: unable to handle kernel paging request at 00000000ffffff8a IP: [] __call_rcu.constprop.76+0x1f/0x280 kernel/rcu/tree.c:3046 @@ -124,6 +129,11 @@ unrelateed line [ 149.188010] IP: [] __lock_acquire+0x2bd/0x3410 `: `BUG: unable to handle kernel NULL pointer dereference in __lock_acquire`, + ` +[ 55.112844] BUG: unable to handle kernel NULL pointer dereference at 000000000000001a +[ 55.113569] IP: skb_release_data+0x258/0x470 +`: `BUG: unable to handle kernel NULL pointer dereference in skb_release_data`, + ` [ 50.583499] WARNING: CPU: 2 PID: 2636 at ipc/shm.c:162 shm_open.isra.5.part.6+0x74/0x80 [ 50.583499] Modules linked in: @@ -152,6 +162,33 @@ kacpi_hotplug/246 is trying to acquire lock: (kacpid){+.+.+.}, at: [] flush_workqueue+0x0/0xb0 `: `possible deadlock in flush_workqueue`, + ` +[ 44.025025] ========================================================= +[ 44.025025] [ INFO: possible irq lock inversion dependency detected ] +[ 44.025025] 4.10.0-rc8+ #228 Not tainted +[ 44.025025] --------------------------------------------------------- +[ 44.025025] syz-executor6/1577 just changed the state of lock: +[ 44.025025] (&(&r->consumer_lock)->rlock){+.+...}, at: [] tun_queue_purge+0xe6/0x210 +`: `possible deadlock in tun_queue_purge`, + + ` +[ 121.451623] ====================================================== +[ 121.452013] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] +[ 121.452013] 4.10.0-rc8+ #228 Not tainted +[ 121.453507] ------------------------------------------------------ +[ 121.453507] syz-executor1/19557 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: +[ 121.453507] (&(&r->consumer_lock)->rlock){+.+...}, at: [] tun_device_event+0x897/0xc70 +`: `possible deadlock in tun_device_event`, + + ` +[ 48.981019] ============================================= +[ 48.981019] [ INFO: possible recursive locking detected ] +[ 48.981019] 4.11.0-rc4+ #198 Not tainted +[ 48.981019] --------------------------------------------- +[ 48.981019] kauditd/901 is trying to acquire lock: +[ 48.981019] (audit_cmd_mutex){+.+.+.}, at: [] audit_receive+0x79/0x360 +`: `possible deadlock in audit_receive`, + ` [ 131.449768] ====================================================== [ 131.449777] [ INFO: possible circular locking dependency detected ] @@ -246,6 +283,24 @@ r0 = ioctl$KVM_CREATE_VM(0xffffffffffffffff, 0xae01, 0x0) [ 734.717436] [] ? perf_event_mmap+0x77/0xb20 `: `BUG: still has locks held in pipe_lock`, + ` +===================================== +[ BUG: bad unlock balance detected! ] +4.10.0+ #179 Not tainted +------------------------------------- +syz-executor1/21439 is trying to release lock (sk_lock-AF_INET) at: +[] sctp_sendmsg+0x2a3b/0x38a0 net/sctp/socket.c:2007 +`: `BUG: bad unlock balance in sctp_sendmsg`, + + ` +[ 633.049984] ========================= +[ 633.049987] [ BUG: held lock freed! ] +[ 633.049993] 4.10.0+ #260 Not tainted +[ 633.049996] ------------------------- +[ 633.050005] syz-executor7/27251 is freeing memory ffff8800178f8180-ffff8800178f8a77, with a lock still held there! +[ 633.050009] (slock-AF_INET6){+.-...}, at: [] sk_clone_lock+0x3d9/0x12c0 +`: `BUG: held lock freed in sk_clone_lock`, + ` [ 2569.618120] BUG: Bad rss-counter state mm:ffff88005fac4300 idx:0 val:15 `: `BUG: Bad rss-counter state`, -- cgit mrf-deployment