Advertisement
Guest User

Lock error

a guest
Mar 24th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.91 KB | None | 0 0
  1. ========================================================
  2. WARNING: possible irq lock inversion dependency detected
  3. 4.15.0+ #2 Tainted: G O
  4. --------------------------------------------------------
  5. tracer_test/274 just changed the state of lock:
  6. (trc_lock){+...}, at: [<4df3db5f>] trc_ioctl+0xa2/0x1c0 [tracer]
  7. but this lock was taken by another, HARDIRQ-safe lock in the past:
  8. (&(&vblk->vqs[i].lock)->rlock){-.-.}
  9.  
  10.  
  11. and interrupts could create inverse lock ordering between them.
  12.  
  13.  
  14. other info that might help us debug this:
  15. Chain exists of:
  16. &(&vblk->vqs[i].lock)->rlock --> &(kretprobe_table_locks[i].lock) --> trc_lock
  17.  
  18. Possible interrupt unsafe locking scenario:
  19.  
  20. CPU0 CPU1
  21. ---- ----
  22. lock(trc_lock);
  23. local_irq_disable();
  24. lock(&(&vblk->vqs[i].lock)->rlock);
  25. lock(&(kretprobe_table_locks[i].lock));
  26. <Interrupt>
  27. lock(&(&vblk->vqs[i].lock)->rlock);
  28.  
  29. *** DEADLOCK ***
  30.  
  31. no locks held by tracer_test/274.
  32.  
  33. the shortest dependencies between 2nd lock and 1st lock:
  34. -> (&(&vblk->vqs[i].lock)->rlock){-.-.} ops: 460 {
  35. IN-HARDIRQ-W at:
  36. lock_acquire+0x69/0x80
  37. _raw_spin_lock_irqsave+0x46/0x60
  38. virtblk_done+0x34/0xc0
  39. vring_interrupt+0x20/0x50
  40. vp_interrupt+0x5a/0xb0
  41. __handle_irq_event_percpu+0x57/0xe0
  42. handle_irq_event_percpu+0x1d/0x50
  43. handle_irq_event+0x32/0x60
  44. handle_fasteoi_irq+0x7a/0x160
  45. handle_irq+0x7a/0xb0
  46. do_IRQ+0x55/0x120
  47. common_interrupt+0x39/0x40
  48. blk_mq_dispatch_rq_list+0x76/0x470
  49. blk_mq_do_dispatch_sched+0x50/0xb0
  50. blk_mq_sched_dispatch_requests+0xfd/0x180
  51. __blk_mq_run_hw_queue+0xa3/0x1d0
  52. blk_mq_run_work_fn+0x25/0x30
  53. process_one_work+0x16f/0x410
  54. worker_thread+0x37/0x420
  55. kthread+0xcf/0x100
  56. ret_from_fork+0x2e/0x38
  57. IN-SOFTIRQ-W at:
  58. lock_acquire+0x69/0x80
  59. _raw_spin_lock_irqsave+0x46/0x60
  60. virtblk_done+0x34/0xc0
  61. vring_interrupt+0x20/0x50
  62. vp_interrupt+0x5a/0xb0
  63. __handle_irq_event_percpu+0x57/0xe0
  64. handle_irq_event_percpu+0x1d/0x50
  65. handle_irq_event+0x32/0x60
  66. handle_fasteoi_irq+0x7a/0x160
  67. handle_irq+0x7a/0xb0
  68. do_IRQ+0x55/0x120
  69. common_interrupt+0x39/0x40
  70. __do_softirq+0x80/0x1f2
  71. do_softirq_own_stack+0x57/0x70
  72. irq_exit+0x7d/0x90
  73. smp_apic_timer_interrupt+0x4f/0x90
  74. apic_timer_interrupt+0x3a/0x40
  75. vp_notify+0xf/0x20
  76. virtqueue_notify+0xf/0x30
  77. virtio_queue_rq+0x27f/0x2f0
  78. blk_mq_dispatch_rq_list+0x66/0x470
  79. blk_mq_do_dispatch_sched+0x50/0xb0
  80. blk_mq_sched_dispatch_requests+0xfd/0x180
  81. __blk_mq_run_hw_queue+0xa3/0x1d0
  82. __blk_mq_delay_run_hw_queue+0xb7/0xc0
  83. blk_mq_run_hw_queue+0x24/0x80
  84. blk_mq_sched_insert_requests+0x54/0x80
  85. blk_mq_flush_plug_list+0xfd/0x110
  86. blk_flush_plug_list+0x9d/0x1e0
  87. blk_finish_plug+0x29/0x40
  88. __do_page_cache_readahead+0x2de/0x370
  89. filemap_fault+0x526/0x5a0
  90. ext4_filemap_fault+0x27/0x40
  91. __do_fault+0x18/0x70
  92. handle_mm_fault+0x357/0x8f0
  93. __do_page_fault+0x1dd/0x520
  94. do_page_fault+0xb/0x10
  95. common_exception+0x7c/0x82
  96. INITIAL USE at:
  97. lock_acquire+0x69/0x80
  98. _raw_spin_lock_irqsave+0x46/0x60
  99. virtio_queue_rq+0xc7/0x2f0
  100. blk_mq_dispatch_rq_list+0x66/0x470
  101. blk_mq_do_dispatch_sched+0x50/0xb0
  102. blk_mq_sched_dispatch_requests+0xfd/0x180
  103. __blk_mq_run_hw_queue+0xa3/0x1d0
  104. blk_mq_run_work_fn+0x25/0x30
  105. process_one_work+0x16f/0x410
  106. worker_thread+0x37/0x420
  107. kthread+0xcf/0x100
  108. ret_from_fork+0x2e/0x38
  109. }
  110. ... key at: [<43d50c97>] __key.38703+0x0/0x8
  111. ... acquired at:
  112. _raw_spin_lock_irqsave+0x46/0x60
  113. pre_handler_kretprobe+0xb7/0x140
  114. aggr_pre_handler+0x3b/0x70
  115. kprobe_int3_handler+0xc4/0x150
  116. do_int3+0x57/0x120
  117. int3+0x39/0x40
  118. __kmalloc+0x1/0x210
  119. virtqueue_add_sgs+0xf4/0x420
  120. virtio_queue_rq+0x177/0x2f0
  121. blk_mq_dispatch_rq_list+0x66/0x470
  122. blk_mq_do_dispatch_sched+0x50/0xb0
  123. blk_mq_sched_dispatch_requests+0xfd/0x180
  124. __blk_mq_run_hw_queue+0xa3/0x1d0
  125. __blk_mq_delay_run_hw_queue+0xb7/0xc0
  126. blk_mq_run_hw_queue+0x24/0x80
  127. blk_mq_sched_insert_requests+0x54/0x80
  128. blk_mq_flush_plug_list+0xfd/0x110
  129. blk_flush_plug_list+0x9d/0x1e0
  130. blk_finish_plug+0x29/0x40
  131. __do_page_cache_readahead+0x2de/0x370
  132. filemap_fault+0x526/0x5a0
  133. ext4_filemap_fault+0x27/0x40
  134. __do_fault+0x18/0x70
  135. handle_mm_fault+0x357/0x8f0
  136. __do_page_fault+0x1dd/0x520
  137. do_page_fault+0xb/0x10
  138. common_exception+0x7c/0x82
  139.  
  140. -> (&(kretprobe_table_locks[i].lock)){....} ops: 783 {
  141. INITIAL USE at:
  142. lock_acquire+0x69/0x80
  143. _raw_spin_lock_irqsave+0x46/0x60
  144. kprobe_flush_task+0x3b/0xc0
  145. finish_task_switch+0xf5/0x210
  146. __schedule+0x209/0x5e0
  147. schedule+0x30/0x80
  148. schedule_timeout+0x12e/0x220
  149. rcu_gp_kthread+0x4ba/0x7c0
  150. kthread+0xcf/0x100
  151. ret_from_fork+0x2e/0x38
  152. }
  153. ... key at: [<bee617ff>] __key.33539+0x0/0x8
  154. ... acquired at:
  155. _raw_spin_lock+0x39/0x50
  156. kmalloc_ret+0x14/0xc0 [tracer]
  157. trampoline_handler+0xfa/0x1a0
  158. kretprobe_trampoline+0x18/0x30
  159.  
  160. -> (trc_lock){+...} ops: 23 {
  161. HARDIRQ-ON-W at:
  162. lock_acquire+0x69/0x80
  163. _raw_spin_lock+0x39/0x50
  164. trc_ioctl+0xa2/0x1c0 [tracer]
  165. do_vfs_ioctl+0x84/0x7b0
  166. SyS_ioctl+0x34/0x60
  167. do_fast_syscall_32+0x97/0x2b0
  168. entry_SYSENTER_32+0x4c/0x7b
  169. INITIAL USE at:
  170. lock_acquire+0x69/0x80
  171. _raw_spin_lock+0x39/0x50
  172. kmalloc_ret+0x14/0xc0 [tracer]
  173. trampoline_handler+0xfa/0x1a0
  174. kretprobe_trampoline+0x18/0x30
  175. }
  176. ... key at: [<6e906a15>] trc_lock+0x10/0xffffef40 [tracer]
  177. ... acquired at:
  178. mark_lock+0x307/0x610
  179. __lock_acquire+0x50e/0x1710
  180. lock_acquire+0x69/0x80
  181. _raw_spin_lock+0x39/0x50
  182. trc_ioctl+0xa2/0x1c0 [tracer]
  183. do_vfs_ioctl+0x84/0x7b0
  184. SyS_ioctl+0x34/0x60
  185. do_fast_syscall_32+0x97/0x2b0
  186. entry_SYSENTER_32+0x4c/0x7b
  187.  
  188.  
  189. stack backtrace:
  190. CPU: 0 PID: 274 Comm: tracer_test Tainted: G O 4.15.0+ #2
  191. Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
  192. Call Trace:
  193. dump_stack+0x5f/0x89
  194. print_irq_inversion_bug.part.21+0x16c/0x175
  195. check_usage_backwards+0x108/0x110
  196. ? print_shortest_lock_dependencies+0x1a0/0x1a0
  197. mark_lock+0x307/0x610
  198. ? __switch_to_asm+0x1a/0x40
  199. ? print_shortest_lock_dependencies+0x1a0/0x1a0
  200. __lock_acquire+0x50e/0x1710
  201. ? trace_hardirqs_on_caller+0x11c/0x1a0
  202. ? finish_task_switch+0xb0/0x210
  203. ? trace_hardirqs_on+0xb/0x10
  204. ? _raw_spin_unlock_irq+0x22/0x30
  205. ? finish_task_switch+0x6e/0x210
  206. ? __schedule+0x209/0x5e0
  207. lock_acquire+0x69/0x80
  208. ? trc_ioctl+0xa2/0x1c0 [tracer]
  209. _raw_spin_lock+0x39/0x50
  210. ? trc_ioctl+0xa2/0x1c0 [tracer]
  211. ? kmalloc_ret+0xc0/0xc0 [tracer]
  212. trc_ioctl+0xa2/0x1c0 [tracer]
  213. ? kmalloc_ret+0xc0/0xc0 [tracer]
  214. do_vfs_ioctl+0x84/0x7b0
  215. ? hrtimer_nanosleep+0xbf/0x1a0
  216. ? __might_fault+0x41/0xa0
  217. SyS_ioctl+0x34/0x60
  218. do_fast_syscall_32+0x97/0x2b0
  219. entry_SYSENTER_32+0x4c/0x7b
  220. EIP: 0xb7fc9b35
  221. EFLAGS: 00000296 CPU: 0
  222. EAX: ffffffda EBX: 00000003 ECX: 4004012a EDX: 00000117
  223. ESI: 080ee00c EDI: 00000006 EBP: bf88f7c8 ESP: bf88f788
  224. DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement