BUG: spinlock bad magic, do_task_stat

From: Michael Trimarchi
Date: Wed Jun 17 2015 - 02:40:11 EST


Hi

I'm trying to understand the reason of this failure. I'm running a
3.0.x kernel but I have seen that there are not so much differents in proc
fs. Anyone have an idea what could be the reason and where this unlock happen?

Michael

[10669.296142] BUG: spinlock bad magic on CPU#0, top/11656
[10669.301849] lock: c67ff444, .magic: fb3e22bc, .owner: top/11656, .owner_cpu: 0
[10669.309783] Backtrace:
[10669.312530] [<c01ad3e0>] (dump_backtrace+0x0/0x10c) from [<c0746bf0>] (dump_stack+0x18/0x1c)
[10669.321685] r7:00000000 r6:c08e0894 r5:c5f24d00 r4:c67ff444
[10669.328063] [<c0746bd8>] (dump_stack+0x0/0x1c) from [<c03c6368>] (spin_bug+0x9c/0xac)
[10669.336608] [<c03c62cc>] (spin_bug+0x0/0xac) from [<c03c6400>] (do_raw_spin_unlock+0x88/0xcc)
[10669.345855] r6:c6648720 r5:c62ca700 r4:c67ff444
[10669.351074] [<c03c6378>] (do_raw_spin_unlock+0x0/0xcc) from [<c074a4b4>] (_raw_spin_unlock_irqrestore+0x14/0x44)
[10669.362091] r5:c62ca700 r4:60000113
[10669.366119] [<c074a4a0>] (_raw_spin_unlock_irqrestore+0x0/0x44) from [<c02e161c>] (do_task_stat+0x1f0/0x5e0)
[10669.376770] r5:c62ca700 r4:c730e700
[10669.380859] [<c02e142c>] (do_task_stat+0x0/0x5e0) from [<c02e1a28>] (proc_tgid_stat+0x1c/0x24)
[10669.390167] [<c02e1a0c>] (proc_tgid_stat+0x0/0x24) from [<c02dddd4>] (proc_single_show+0x54/0x98)
[10669.399780] [<c02ddd80>] (proc_single_show+0x0/0x98) from [<c02b497c>] (seq_read+0x1e4/0x4ac)
[10669.409027] r9:00000001 r8:c792ff08 r7:c792ff70 r6:00000001 r5:c58d36c0
[10669.416412] r4:c58cf720
[10669.419403] [<c02b4798>] (seq_read+0x0/0x4ac) from [<c02945d4>] (vfs_read+0xb4/0x148)
[10669.427886] [<c0294520>] (vfs_read+0x0/0x148) from [<c0294744>] (sys_read+0x44/0x74)
[10669.436309] r8:00000000 r7:00000003 r6:00000400 r5:0002e598 r4:c58d36c0
[10669.443939] [<c0294700>] (sys_read+0x0/0x74) from [<c01a9380>] (ret_fast_syscall+0x0/0x30)
[10669.452880] r9:c792e000 r8:c01a9528 r6:befff924 r5:4004757c r4:4004c7d4
[10717.397125] BUG: sleeping function called from invalid context at /home/buildusr/paypad/kernel/arch/arm/mm/fault.c:310
[10717.419494] in_atomic(): 0, irqs_disabled(): 0, pid: 11701, name: top
[10717.433837] Backtrace:
[10717.439392] [<c01ad3e0>] (dump_backtrace+0x0/0x10c) from [<c0746bf0>] (dump_stack+0x18/0x1c)
[10717.460205] r7:00000005 r6:001458b1 r5:c096a080 r4:c58ec000
[10717.466613] [<c0746bd8>] (dump_stack+0x0/0x1c) from [<c01e4f60>] (__might_sleep+0x108/0x128)
[10717.499176] [<c01e4e58>] (__might_sleep+0x0/0x128) from [<c074cde4>] (do_page_fault+0x1e4/0x28c)
[10717.511627] r6:29ed61f7 r5:c732c700 r4:c58ede50
[10717.530670] [<c074cc00>] (do_page_fault+0x0/0x28c) from [<c074cf2c>] (do_translation_fault+0xa0/0xa8)
[10717.548645] [<c074ce8c>] (do_translation_fault+0x0/0xa8) from [<c01a353c>] (do_DataAbort+0x3c/0xa4)
[10717.566284] r7:c58ede50 r6:29ed61f7 r5:c09829e4 r4:00000005
[10717.572662] [<c01a3500>] (do_DataAbort+0x0/0xa4) from [<c074a96c>] (__dabt_svc+0x4c/0x60)
[10717.598175] Exception stack(0xc58ede50 to 0xc58ede98)
[10717.611602] de40: 29ed60df 00000000 00000000 fffffeb4
[10717.630096] de60: c09a063c c58edef0 00000017 29ed60df c58edf78 c58edef0 c09a063c c58edebc
[10717.650604] de80: c58ede98 c58ede98 c02de990 c02de998 20000113 ffffffff
[10717.671020] r7:29ed60df r6:00000017 r5:c58ede84 r4:ffffffff
[10717.677459] [<c02de908>] (next_tgid+0x0/0xf4) from [<c02df4dc>] (proc_pid_readdir+0x118/0x234)
[10717.697113] r7:c02a57f0 r6:00000016 r5:c78f8680 r4:c5826900
[10717.712493] [<c02df3c4>] (proc_pid_readdir+0x0/0x234) from [<c02dbc64>] (proc_root_readdir+0x4c/0x50)
[10717.733032] [<c02dbc18>] (proc_root_readdir+0x0/0x50) from [<c02a5bf0>] (vfs_readdir+0x98/0xb8)
[10717.754699] r7:00000000 r6:c740c050 r5:c02a57f0 r4:c5826900
[10717.764709] [<c02a5b58>] (vfs_readdir+0x0/0xb8) from [<c02a5c88>] (sys_getdents64+0x78/0xc0)
[10717.789611] r8:c01a9528 r7:c5826900 r6:00028018 r5:00001068 r4:00000000
[10717.805328] [<c02a5c10>] (sys_getdents64+0x0/0xc0) from [<c01a9380>] (ret_fast_syscall+0x0/0x30)
[10717.824584] r7:000000d9 r6:00000000 r5:00028018 r4:00028008
[10717.834106] Unable to handle kernel paging request at virtual address 29ed61f7
[10717.853332] pgd = c58fc000
[10717.861755] [29ed61f7] *pgd=00000000
[10717.869415] Internal error: Oops: 5 [#1] PREEMPT SMP
[10717.874786] Modules linked in: pvrsrvkm_sgx540_120 gps_drv wl12xx mac80211 cfg80211 compat
[10717.884185] CPU: 0 Tainted: G W (3.0.31-RC-00332-gbb0b5c3 #7)
[10717.891662] PC is at next_tgid+0x90/0xf4
[10717.895904] LR is at next_tgid+0x88/0xf4
[10717.900177] pc : [<c02de998>] lr : [<c02de990>] psr: 20000113
[10717.900177] sp : c58ede98 ip : c58ede98 fp : c58edebc
[10717.912658] r10: c09a063c r9 : c58edef0 r8 : c58edf78
[10717.918365] r7 : 29ed60df r6 : 00000017 r5 : c58edef0 r4 : c09a063c
[10717.925476] r3 : fffffeb4 r2 : 00000000 r1 : 00000000 r0 : 29ed60df
[10717.932556] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[10717.940338] Control: 10c5387d Table: 858fc04a DAC: 00000015
[10717.946533]
[10717.946563] PC: 0xc02de918:
[10717.951293] e918 e24bc024 e1a05000 e1a04001 e1a06002 e88c000c e51b0020 e3500000 0a000009
[10717.960662] e938 f57ff05f e2803008 e1932f9f e2422001 e1831f92 e3310000 1afffffa f57ff05f
[10717.970092] e958 e3520000 0a000024 ebfd8ace e1a01004 e1a00006 ebfccc31 e1a01004 e2507000
[10717.979461] e978 0a000011 ebfcc9e1 e3a01000 e1a06000 e1a00007 ebfcc9b9 e2507000 0a000003
[10717.988861] e998 e5972118 e597311c e1520003 0a00000b e2866001 e1a01004 e1a00006 ebfccc1f
[10717.998260] e9b8 e1a01004 e2507000 1affffed ebfd8fa5 e88500c0 e1a00005 e24bd01c e89da8f0
[10718.007659] e9d8 e2873008 e1932f9f e2822001 e1831f92 e3310000 1afffffa eafffff3 ebfc56e1
[10718.017059] e9f8 eaffffd8 e1a0c00d e92dd8f0 e24cb004 e3510000 e1a05000 1a000025 e5954020
[10718.026428]
[10718.026428] LR: 0xc02de910:
[10718.031158] e910 e24cb004 e24dd008 e24bc024 e1a05000 e1a04001 e1a06002 e88c000c e51b0020
[10718.040588] e930 e3500000 0a000009 f57ff05f e2803008 e1932f9f e2422001 e1831f92 e3310000
[10718.049987] e950 1afffffa f57ff05f e3520000 0a000024 ebfd8ace e1a01004 e1a00006 ebfccc31
[10718.059387] e970 e1a01004 e2507000 0a000011 ebfcc9e1 e3a01000 e1a06000 e1a00007 ebfcc9b9
[10718.068817] e990 e2507000 0a000003 e5972118 e597311c e1520003 0a00000b e2866001 e1a01004
[10718.078186] e9b0 e1a00006 ebfccc1f e1a01004 e2507000 1affffed ebfd8fa5 e88500c0 e1a00005
[10718.087585] e9d0 e24bd01c e89da8f0 e2873008 e1932f9f e2822001 e1831f92 e3310000 1afffffa
[10718.097015] e9f0 eafffff3 ebfc56e1 eaffffd8 e1a0c00d e92dd8f0 e24cb004 e3510000 e1a05000
[10718.106445]
[10718.106445] SP: 0xc58ede18:
[10718.111145] de18 00000002 00000000 c58edf78 c02a5928 000011da 00000000 ffffffff c58ede84
[10718.120574] de38 00000017 29ed60df c58edebc c58ede50 c074a96c c01a350c 29ed60df 00000000
[10718.129943] de58 00000000 fffffeb4 c09a063c c58edef0 00000017 29ed60df c58edf78 c58edef0
[10718.139373] de78 c09a063c c58edebc c58ede98 c58ede98 c02de990 c02de998 20000113 ffffffff
[10718.148803] de98 00000016 c78f8680 c5826900 c78f8680 00000016 c02a57f0 c58edf24 c58edec0
[10718.158233] deb8 c02df4dc c02de914 00000002 c02deae0 c78f8680 00000000 00000034 00000000
[10718.167602] ded8 c782c000 c09a063c 00003132 c022603c c02b2104 c5826900 00000016 c78f8680
[10718.177032] def8 00000000 c5826900 c02a57f0 c58edf78 00000000 c740c020 c58ec000 00000000
[10718.186431]
[10718.186431] IP: 0xc58ede18:
[10718.191131] de18 00000002 00000000 c58edf78 c02a5928 000011da 00000000 ffffffff c58ede84
[10718.200561] de38 00000017 29ed60df c58edebc c58ede50 c074a96c c01a350c 29ed60df 00000000
[10718.209960] de58 00000000 fffffeb4 c09a063c c58edef0 00000017 29ed60df c58edf78 c58edef0
[10718.219360] de78 c09a063c c58edebc c58ede98 c58ede98 c02de990 c02de998 20000113 ffffffff
[10718.228790] de98 00000016 c78f8680 c5826900 c78f8680 00000016 c02a57f0 c58edf24 c58edec0
[10718.238189] deb8 c02df4dc c02de914 00000002 c02deae0 c78f8680 00000000 00000034 00000000
[10718.247558] ded8 c782c000 c09a063c 00003132 c022603c c02b2104 c5826900 00000016 c78f8680
[10718.256927] def8 00000000 c5826900 c02a57f0 c58edf78 00000000 c740c020 c58ec000 00000000
[10718.266357]
[10718.266357] FP: 0xc58ede3c:
[10718.271057] de3c 29ed60df c58edebc c58ede50 c074a96c c01a350c 29ed60df 00000000 00000000
[10718.280487] de5c fffffeb4 c09a063c c58edef0 00000017 29ed60df c58edf78 c58edef0 c09a063c
[10718.289886] de7c c58edebc c58ede98 c58ede98 c02de990 c02de998 20000113 ffffffff 00000016
[10718.299285] de9c c78f8680 c5826900 c78f8680 00000016 c02a57f0 c58edf24 c58edec0 c02df4dc
[10718.308654] debc c02de914 00000002 c02deae0 c78f8680 00000000 00000034 00000000 c782c000
[10718.318084] dedc c09a063c 00003132 c022603c c02b2104 c5826900 00000016 c78f8680 00000000
[10718.327514] defc c5826900 c02a57f0 c58edf78 00000000 c740c020 c58ec000 00000000 c58edf44
[10718.336883] df1c c58edf28 c02dbc64 c02df3d0 c5826900 c02a57f0 c740c050 00000000 c58edf74
[10718.346313]
[10718.346313] R3: 0xfffffe34:
[10718.351043] fe34 ******** ******** ******** ******** ******** ******** ******** ********
[10718.360412] fe54 ******** ******** ******** ******** ******** ******** ******** ********
[10718.369842] fe74 ******** ******** ******** ******** ******** ******** ******** ********
[10718.379241] fe94 ******** ******** ******** ******** ******** ******** ******** ********
[10718.388610] feb4 ******** ******** ******** ******** ******** ******** ******** ********
[10718.398010] fed4 ******** ******** ******** ******** ******** ******** ******** ********
[10718.407440] fef4 ******** ******** ******** ******** ******** ******** ******** ********
[10718.416839] ff14 ******** ******** ******** ******** ******** ******** ******** ********
[10718.426239]
[10718.426239] R4: 0xc09a05bc:
[10718.430999] 05bc c08c4180 c020d010 c0256260 c020ce10 00000000 c7914540 c79143c0 c02562b4
[10718.440368] 05dc c08c4180 c020cf80 c0256260 c020cdcc 00000000 c79142a0 c79142a0 c02562b4
[10718.449798] 05fc c020cd08 c0251aa8 c0251aa8 c0251aa8 c020cc40 c0251aa8 c0251aa8 c0251aa8
[10718.459228] 061c c020cb58 c0251aa8 c0251aa8 c0251aa8 00000009 00008000 00008000 0000012d
[10718.468658] 063c 00000002 00007e51 c7818000 00002db5 c782c000 c7802280 00000000 00000000
[10718.478057] 065c c780d1e0 00000001 00000000 00000000 c5f1de98 c5f247e4 00000000 00000000
[10718.487457] 067c 00000000 c09a063c 00000000 00000000 00000001 00000000 00000000 dead4ead
[10718.496887] 069c ffffffff ffffffff c09a06a4 c09a06a4 00000000 00000000 c09a068c 00000000
[10718.506256]
[10718.506256] R5: 0xc58ede70:
[10718.510925] de70 c58edf78 c58edef0 c09a063c c58edebc c58ede98 c58ede98 c02de990 c02de998
[10718.520355] de90 20000113 ffffffff 00000016 c78f8680 c5826900 c78f8680 00000016 c02a57f0
[10718.529754] deb0 c58edf24 c58edec0 c02df4dc c02de914 00000002 c02deae0 c78f8680 00000000
[10718.539154] ded0 00000034 00000000 c782c000 c09a063c 00003132 c022603c c02b2104 c5826900
[10718.548583] def0 00000016 c78f8680 00000000 c5826900 c02a57f0 c58edf78 00000000 c740c020
[10718.557952] df10 c58ec000 00000000 c58edf44 c58edf28 c02dbc64 c02df3d0 c5826900 c02a57f0
[10718.567352] df30 c740c050 00000000 c58edf74 c58edf48 c02a5bf0 c02dbc24 c5826900 c58edf78
[10718.576751] df50 c58edf74 00000000 00001068 00028018 c5826900 c01a9528 c58edfa4 c58edf78
[10718.586181]
[10718.586181] R8: 0xc58edef8:
[10718.590881] def8 00000000 c5826900 c02a57f0 c58edf78 00000000 c740c020 c58ec000 00000000
[10718.600280] df18 c58edf44 c58edf28 c02dbc64 c02df3d0 c5826900 c02a57f0 c740c050 00000000
[10718.609680] df38 c58edf74 c58edf48 c02a5bf0 c02dbc24 c5826900 c58edf78 c58edf74 00000000
[10718.619049] df58 00001068 00028018 c5826900 c01a9528 c58edfa4 c58edf78 c02a5c88 c02a5b64
[10718.628479] df78 00028820 00028808 00000860 ffffffea 00028008 00028018 00000000 000000d9
[10718.637908] df98 00000000 c58edfa8 c01a9380 c02a5c1c 00028008 00028018 00000003 00028018
[10718.647277] dfb8 00001068 00000000 00028008 00028018 00000000 000000d9 0001f700 000250fc
[10718.656677] dfd8 000250f4 0001f700 00000000 befffa10 4001cd87 40010988 60000110 00000003
[10718.666046]
[10718.666076] R9: 0xc58ede70:
[10718.670745] de70 c58edf78 c58edef0 c09a063c c58edebc c58ede98 c58ede98 c02de990 c02de998
[10718.680145] de90 20000113 ffffffff 00000016 c78f8680 c5826900 c78f8680 00000016 c02a57f0
[10718.689575] deb0 c58edf24 c58edec0 c02df4dc c02de914 00000002 c02deae0 c78f8680 00000000
[10718.698913] ded0 00000034 00000000 c782c000 c09a063c 00003132 c022603c c02b2104 c5826900
[10718.708374] def0 00000016 c78f8680 00000000 c5826900 c02a57f0 c58edf78 00000000 c740c020
[10718.717742] df10 c58ec000 00000000 c58edf44 c58edf28 c02dbc64 c02df3d0 c5826900 c02a57f0
[10718.727111] df30 c740c050 00000000 c58edf74 c58edf48 c02a5bf0 c02dbc24 c5826900 c58edf78
[10718.736511] df50 c58edf74 00000000 00001068 00028018 c5826900 c01a9528 c58edfa4 c58edf78
[10718.745910]
[10718.745910] R10: 0xc09a05bc:
[10718.750701] 05bc c08c4180 c020d010 c0256260 c020ce10 00000000 c7914540 c79143c0 c02562b4
[10718.760101] 05dc c08c4180 c020cf80 c0256260 c020cdcc 00000000 c79142a0 c79142a0 c02562b4
[10718.769531] 05fc c020cd08 c0251aa8 c0251aa8 c0251aa8 c020cc40 c0251aa8 c0251aa8 c0251aa8
[10718.778930] 061c c020cb58 c0251aa8 c0251aa8 c0251aa8 00000009 00008000 00008000 0000012d
[10718.788299] 063c 00000002 00007e51 c7818000 00002db5 c782c000 c7802280 00000000 00000000
[10718.797729] 065c c780d1e0 00000001 00000000 00000000 c5f1de98 c5f247e4 00000000 00000000
[10718.807159] 067c 00000000 c09a063c 00000000 00000000 00000001 00000000 00000000 dead4ead
[10718.816528] 069c ffffffff ffffffff c09a06a4 c09a06a4 00000000 00000000 c09a068c 00000000
[10718.825927] Process top (pid: 11701, stack limit = 0xc58ec2f8)
[10718.832275] Stack: (0xc58ede98 to 0xc58ee000)
[10718.837005] de80: 00000016 c78f8680
[10718.845886] dea0: c5826900 c78f8680 00000016 c02a57f0 c58edf24 c58edec0 c02df4dc c02de914
[10718.854766] dec0: 00000002 c02deae0 c78f8680 00000000 00000034 00000000 c782c000 c09a063c
[10718.863586] dee0: 00003132 c022603c c02b2104 c5826900 00000016 c78f8680 00000000 c5826900
[10718.872497] df00: c02a57f0 c58edf78 00000000 c740c020 c58ec000 00000000 c58edf44 c58edf28
[10718.881378] df20: c02dbc64 c02df3d0 c5826900 c02a57f0 c740c050 00000000 c58edf74 c58edf48
[10718.890197] df40: c02a5bf0 c02dbc24 c5826900 c58edf78 c58edf74 00000000 00001068 00028018
[10718.899108] df60: c5826900 c01a9528 c58edfa4 c58edf78 c02a5c88 c02a5b64 00028820 00028808
[10718.907989] df80: 00000860 ffffffea 00028008 00028018 00000000 000000d9 00000000 c58edfa8
[10718.916870] dfa0: c01a9380 c02a5c1c 00028008 00028018 00000003 00028018 00001068 00000000
[10718.925720] dfc0: 00028008 00028018 00000000 000000d9 0001f700 000250fc 000250f4 0001f700
[10718.934631] dfe0: 00000000 befffa10 4001cd87 40010988 60000110 00000003 00000000 00000000
[10718.943511] Backtrace:
[10718.946258] [<c02de908>] (next_tgid+0x0/0xf4) from [<c02df4dc>] (proc_pid_readdir+0x118/0x234)
[10718.955627] r7:c02a57f0 r6:00000016 r5:c78f8680 r4:c5826900
[10718.962005] [<c02df3c4>] (proc_pid_readdir+0x0/0x234) from [<c02dbc64>] (proc_root_readdir+0x4c/0x50)
[10718.972015] [<c02dbc18>] (proc_root_readdir+0x0/0x50) from [<c02a5bf0>] (vfs_readdir+0x98/0xb8)
[10718.981445] r7:00000000 r6:c740c050 r5:c02a57f0 r4:c5826900
[10718.987823] [<c02a5b58>] (vfs_readdir+0x0/0xb8) from [<c02a5c88>] (sys_getdents64+0x78/0xc0)
[10718.997009] r8:c01a9528 r7:c5826900 r6:00028018 r5:00001068 r4:00000000
[10719.004608] [<c02a5c10>] (sys_getdents64+0x0/0xc0) from [<c01a9380>] (ret_fast_syscall+0x0/0x30)
[10719.014160] r7:000000d9 r6:00000000 r5:00028018 r4:00028008
[10719.020568] Code: e1a00007 ebfcc9b9 e2507000 0a000003 (e5972118)
[10719.034790] ---[ end trace 65f8ea860415c051 ]---
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/