<br><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 9:27 PM, Daniel Pletea <span dir="ltr">&lt;<a href="mailto:dani.pletea@gmail.com">dani.pletea@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div><div class="h5">On Tue, Apr 10, 2012 at 9:24 PM, Daniel Pletea <span dir="ltr">&lt;<a href="mailto:dani.pletea@gmail.com" target="_blank">dani.pletea@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div><div>2012/4/10 Daniel Baluta <span dir="ltr">&lt;<a href="mailto:daniel.baluta@gmail.com" target="_blank">daniel.baluta@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


2012/4/10 Daniel Pletea &lt;<a href="mailto:dani.pletea@gmail.com" target="_blank">dani.pletea@gmail.com</a>&gt;:<br>
<div><div>&gt; Salut,<br>
&gt;<br>
&gt; Am un bug: spinlock recursion; pe care nu reusesc sa il rezolv. Nu imi dau<br>
&gt; seama de unde vine. Ce am facut pana acum a fost sa primesc bio-urile de la<br>
&gt; nivel userspace. Am creat cate un bio pentru fiecare operatie de citire si<br>
&gt; i-am dat submit catre PHYSICAL_DISK1, pe sectorul 0 (adica am facut un bio<br>
&gt; de citire dummy pe sectorul 0). Am alocat pagina, am pust event. Am folosit<br>
&gt; workqueues, iar in work_handler, dupa wait_for_completion am avut grija sa<br>
&gt; fac free la tot ce era nevoie. De asemenea nu folosesc nici un spinlock.<br>
&gt;<br>
&gt; Am rulat ./test de mai multe ori. Uneori se termina bine, uneori se ajunge<br>
&gt; la acest spinlock recursion.<br>
&gt;<br>
&gt; Sa pun si call traceul ? E cam mare.<br>
<br>
</div></div>Bună,<br>
<br>
Da pune și trace-ul.<br>
<br>
thanks,<br>
Daniel.<br>
_______________________________________________<br>
<a href="http://elf.cs.pub.ro/so2/wiki/resurse/lista-discutii" target="_blank">http://elf.cs.pub.ro/so2/wiki/resurse/lista-discutii</a></blockquote></div></div><div><br><br>Call Trace:<br> [&lt;c010a8f5&gt;] ? show_regs+0x25/0x30<br>


 [&lt;c059d665&gt;] nmi_watchdog_tick+0x1c5/0x1f0<br> [&lt;c059c6fb&gt;] do_nmi+0x13b/0x290<br> [&lt;c059c170&gt;] nmi_stack_correct+0x2f/0x34<br> [&lt;c01200e0&gt;] ? adjust_for_32bit_ctr+0x20/0xb0<br> [&lt;c0123c65&gt;] ? default_send_IPI_mask_logical+0x75/0xf0<br>


 [&lt;c0123a60&gt;] default_send_IPI_all+0x90/0xa0<br> [&lt;c01240a7&gt;] arch_trigger_all_cpu_backtrace+0x37/0x70<br> [&lt;c037a59e&gt;] do_raw_spin_lock+0x12e/0x140<br> [&lt;c059ab56&gt;] _raw_spin_lock_irqsave+0x76/0x90<br>


 [&lt;c036969a&gt;] ? cfq_idle_slice_timer+0x2a/0xe0<br> [&lt;c036969a&gt;] cfq_idle_slice_timer+0x2a/0xe0<br> [&lt;c015b611&gt;] run_timer_softirq+0x161/0x370<br> [&lt;c015b589&gt;] ? run_timer_softirq+0xd9/0x370<br> [&lt;c0369670&gt;] ? cfq_idle_slice_timer+0x0/0xe0<br>


 [&lt;c0152c43&gt;] __do_softirq+0xa3/0x1e0<br> [&lt;c017ddb8&gt;] ? __lock_acquire+0x178/0x500<br> [&lt;c017ddb8&gt;] ? __lock_acquire+0x178/0x500<br> [&lt;c0152dc5&gt;] do_softirq+0x45/0x50<br> [&lt;c01531a5&gt;] irq_exit+0x85/0x90<br>


 [&lt;c05a191a&gt;] smp_apic_timer_interrupt+0x5a/0x89<br> [&lt;c059be41&gt;] apic_timer_interrupt+0x31/0x38<br> [&lt;c02100d8&gt;] ? sys_swapoff+0x1e8/0x970<br> [&lt;c0219c36&gt;] ? __slab_alloc+0x116/0x600<br> [&lt;c0165a16&gt;] ? __queue_work+0x36/0x50<br>


 [&lt;c021a291&gt;] kmem_cache_alloc_notrace+0xb1/0xc0<br> [&lt;d082319f&gt;] ? send_test_bio+0x1f/0x180 [ssr]<br> [&lt;d082319f&gt;] ? send_test_bio+0x1f/0x180 [ssr]<br> [&lt;d082319f&gt;] send_test_bio+0x1f/0x180 [ssr]<br>


 [&lt;c013394f&gt;] ? kmap_atomic_prot+0x4f/0xf0<br> [&lt;c059eb89&gt;] ? sub_preempt_count+0x9/0xb0<br> [&lt;d08233ca&gt;] my_block_request+0xca/0x198 [ssr]<br> [&lt;c0357fde&gt;] __generic_unplug_device+0x2e/0x40<br> [&lt;c0358016&gt;] generic_unplug_device+0x26/0x40<br>


 [&lt;c035904c&gt;] blk_unplug+0x2c/0x70<br> [&lt;c03590a0&gt;] blk_backing_dev_unplug+0x10/0x20<br> [&lt;c024e79f&gt;] block_sync_page+0x3f/0x50<br> [&lt;c01e6c67&gt;] sync_page+0x37/0x50<br> [&lt;c01e6c8d&gt;] sync_page_killable+0xd/0x40<br>


 [&lt;c0599117&gt;] __wait_on_bit_lock+0x47/0x90<br> [&lt;c013b69b&gt;] ? get_parent_ip+0xb/0x40<br> [&lt;c01e6c80&gt;] ? sync_page_killable+0x0/0x40<br> [&lt;c01e6b6b&gt;] __lock_page_killable+0x7b/0x90<br> [&lt;c0169b70&gt;] ? wake_bit_function+0x0/0x50<br>


 [&lt;c01e862e&gt;] generic_file_aio_read+0x47e/0x730<br> [&lt;c0228af4&gt;] do_sync_read+0xa4/0xe0<br> [&lt;c013b69b&gt;] ? get_parent_ip+0xb/0x40<br> [&lt;c0348136&gt;] ? apparmor_file_permission+0x16/0x20<br> [&lt;c031a6a4&gt;] ? security_file_permission+0x14/0x20<br>


 [&lt;c0228b94&gt;] ? rw_verify_area+0x64/0xe0<br> [&lt;c059954d&gt;] ? mutex_unlock+0xd/0x10<br> [&lt;c022956f&gt;] vfs_read+0x9f/0x1a0<br> [&lt;c0253d00&gt;] ? block_llseek+0x0/0xf0<br> [&lt;c0228a50&gt;] ? do_sync_read+0x0/0xe0<br>


 [&lt;c02296b2&gt;] sys_read+0x42/0x70<br> [&lt;c059b998&gt;] syscall_call+0x7/0xb<br> [&lt;c0590000&gt;] ? cpu_detect+0x6f/0xc3<br> </div></div></blockquote></div></div><div><br>Nu e acesta trace-ul. Revin imediat cu trace-ul &quot;bun&quot;.<br>

<br>Sorry <br></div></div><br>
</blockquote></div><br>Acesta este call trace-ul &quot;bun&quot;:<br><br>&quot;[  235.962093] BUG: spinlock recursion on CPU#0, test/2291<br>[  235.962595]  lock: d08238e0, .magic: dead4ead, .owner: test/2291, .owner_cpu:<br>
 0<br>[  235.963238] Pid: 2291, comm: test Not tainted 2.6.35.10-so-so2 #2<br>[  235.963702] Call Trace:<br>[  235.964106]  [&lt;c0597fee&gt;] ? printk+0x2d/0x2f<br>[  235.964581]  [&lt;c037a383&gt;] spin_bug+0xa3/0xf0<br>
[  235.966913]  [&lt;c037a55a&gt;] do_raw_spin_lock+0xea/0x140<br>[  235.967426]  [&lt;c017bab1&gt;] ? put_lock_stats+0x21/0x30<br>[  235.967919]  [&lt;c036969a&gt;] ? cfq_idle_slice_timer+0x2a/0xe0<br>[  235.968550]  [&lt;c035800f&gt;] ? generic_unplug_device+0x1f/0x40<br>
[  235.969068]  [&lt;c059ab56&gt;] _raw_spin_lock_irqsave+0x76/0x90<br>[  235.969570]  [&lt;c036969a&gt;] ? cfq_idle_slice_timer+0x2a/0xe0<br>[  235.970023]  [&lt;c036969a&gt;] cfq_idle_slice_timer+0x2a/0xe0<br>[  235.970448]  [&lt;c015b611&gt;] run_timer_softirq+0x161/0x370<br>
[  235.970913]  [&lt;c015b589&gt;] ? run_timer_softirq+0xd9/0x370<br>[  235.971731]  [&lt;c0369670&gt;] ? cfq_idle_slice_timer+0x0/0xe0<br>[  235.972313]  [&lt;c0152c43&gt;] __do_softirq+0xa3/0x1e0<br>[  235.972815]  [&lt;c017ddb8&gt;] ? __lock_acquire+0x178/0x500<br>
[  235.973289]  [&lt;c017ddb8&gt;] ? __lock_acquire+0x178/0x500<br>[  235.973807]  [&lt;c0152dc5&gt;] do_softirq+0x45/0x50<br>[  235.974270]  [&lt;c01531a5&gt;] irq_exit+0x85/0x90<br>[  235.974696]  [&lt;c05a191a&gt;] smp_apic_timer_interrupt+0x5a/0x89<br>
[  235.975202]  [&lt;c059be41&gt;] apic_timer_interrupt+0x31/0x38<br>[  235.975741]  [&lt;c02100d8&gt;] ? sys_swapoff+0x1e8/0x970<br>[  235.976197]  [&lt;c0219c36&gt;] ? __slab_alloc+0x116/0x600<br>[  235.976651]  [&lt;c0165a16&gt;] ? __queue_work+0x36/0x50<br>
[  235.977220]  [&lt;c021a291&gt;] kmem_cache_alloc_notrace+0xb1/0xc0<br>[  235.977935]  [&lt;d082319f&gt;] ? send_test_bio+0x1f/0x180 [ssr]<br>[  235.978552]  [&lt;d082319f&gt;] ? send_test_bio+0x1f/0x180 [ssr]<br>[  235.979263]  [&lt;d082319f&gt;] send_test_bio+0x1f/0x180 [ssr]<br>
[  235.981221]  [&lt;c013394f&gt;] ? kmap_atomic_prot+0x4f/0xf0<br>[  235.982220]  [&lt;c059eb89&gt;] ? sub_preempt_count+0x9/0xb0<br>[  235.982687]  [&lt;d08233ca&gt;] my_block_request+0xca/0x198 [ssr]<br>[  235.983151]  [&lt;c0357fde&gt;] __generic_unplug_device+0x2e/0x40<br>
[  235.983604]  [&lt;c0358016&gt;] generic_unplug_device+0x26/0x40<br>[  235.984051]  [&lt;c035904c&gt;] blk_unplug+0x2c/0x70<br>[  235.984474]  [&lt;c03590a0&gt;] blk_backing_dev_unplug+0x10/0x20<br>[  235.984900]  [&lt;c024e79f&gt;] block_sync_page+0x3f/0x50<br>
[  235.985392]  [&lt;c01e6c67&gt;] sync_page+0x37/0x50<br>[  235.985815]  [&lt;c01e6c8d&gt;] sync_page_killable+0xd/0x40<br>[  235.986311]  [&lt;c0599117&gt;] __wait_on_bit_lock+0x47/0x90<br>[  235.986783]  [&lt;c013b69b&gt;] ? get_parent_ip+0xb/0x40<br>
[  235.987382]  [&lt;c01e6c80&gt;] ? sync_page_killable+0x0/0x40<br>[  235.987794]  [&lt;c01e6b6b&gt;] __lock_page_killable+0x7b/0x90<br>[  235.988268]  [&lt;c0169b70&gt;] ? wake_bit_function+0x0/0x50<br>[  235.988772]  [&lt;c01e862e&gt;] generic_file_aio_read+0x47e/0x730<br>
[  235.989258]  [&lt;c0228af4&gt;] do_sync_read+0xa4/0xe0<br>[  235.990241]  [&lt;c013b69b&gt;] ? get_parent_ip+0xb/0x40<br>[  235.990712]  [&lt;c0348136&gt;] ? apparmor_file_permission+0x16/0x20<br>[  235.991190]  [&lt;c031a6a4&gt;] ? security_file_permission+0x14/0x20<br>
[  235.991820]  [&lt;c0228b94&gt;] ? rw_verify_area+0x64/0xe0<br>[  235.992317]  [&lt;c059954d&gt;] ? mutex_unlock+0xd/0x10<br>[  235.992753]  [&lt;c022956f&gt;] vfs_read+0x9f/0x1a0<br>[  235.993232]  [&lt;c0253d00&gt;] ? block_llseek+0x0/0xf0<br>
[  235.995736]  [&lt;c0228a50&gt;] ? do_sync_read+0x0/0xe0<br>[  235.996276]  [&lt;c02296b2&gt;] sys_read+0x42/0x70<br>[  235.996863]  [&lt;c059b998&gt;] syscall_call+0x7/0xb<br>[  235.997324]  [&lt;c0590000&gt;] ? cpu_detect+0x6f/0xc3<br>
<br>