Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 06-10-2008, 05:04 AM   #1
LQ Newbie
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
Synchronization problem - how could i interpret the stack backtrace?

Hi everybody,

I've written a module for filtering TCP and UDP packets, called ipdriver, and i have a problem regarding synchronization. While inserting, using and removing the module it works fine, i get no deadlock, but the following message is displayed :

inconsistent {softirq-on-W} -> {in-softirq-W} usage.
swapper/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
(old_style_rw_init#2){-+--}, at: [<c8840039>] fin_timeout_handler+0x19/0x50 [ipdriver]
{softirq-on-W} state was registered at:
[<c0137bec>] __lock_acquire+0x69c/0x1080
[<c0138642>] lock_acquire+0x72/0xa0
[<c032aa66>] _write_lock+0x36/0x50
[<c8840654>] nf_outhook_fn+0xc4/0x310 [ipdriver]
[<c02da665>] nf_iterate+0x65/0x90
[<c02da70e>] nf_hook_slow+0x7e/0x120
[<c02e551e>] ip_queue_xmit+0x29e/0x3d0
[<c02f550c>] tcp_transmit_skb+0x3bc/0x750
[<c02f813a>] tcp_connect+0x2aa/0x330
[<c02fb3e0>] tcp_v4_connect+0x370/0x6d0
[<c0308b1f>] inet_stream_connect+0x1df/0x270
[<c02ba87d>] sys_connect+0x5d/0x90
[<c02bbfd4>] sys_socketcall+0x94/0x260
[<c0102c82>] sysenter_past_esp+0x6b/0xc1
[<ffffffff>] 0xffffffff
irq event stamp: 892387
hardirqs last enabled at (892386): [<c032b0e2>] _spin_unlock_irq+0x22/0x60
hardirqs last disabled at (892387): [<c032ad99>] _write_lock_irqsave+0x29/0x70
softirqs last enabled at (892372): [<c011c0e1>] __do_softirq+0xb1/0xd0
softirqs last disabled at (892383): [<c0104cdf>] do_softirq+0xaf/0x110

other info that might help us debug this:
no locks held by swapper/0.

stack backtrace:
Pid: 0, comm: swapper Not tainted #14
[<c0103d3a>] show_trace_log_lvl+0x1a/0x30
[<c01046e2>] show_trace+0x12/0x20
[<c0104a4c>] dump_stack+0x6c/0x80
[<c0135e63>] print_usage_bug+0x153/0x160
[<c0136c39>] mark_lock+0x449/0x620
[<c0137b94>] __lock_acquire+0x644/0x1080
[<c0138642>] lock_acquire+0x72/0xa0
[<c032adc6>] _write_lock_irqsave+0x56/0x70
[<c8840039>] fin_timeout_handler+0x19/0x50 [ipdriver]
[<c011f8d9>] run_timer_softirq+0x119/0x180
[<c011c092>] __do_softirq+0x62/0xd0
[<c0104cdf>] do_softirq+0xaf/0x110

How could i interpret it?

Thank you in advance
Old 06-17-2008, 04:29 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,545

Rep: Reputation: 160Reputation: 160
You probably don't unlock something related to softirq. Reviewing the code will be probably the best method to use. Simply re-read the code and make sure you always unlock when you lock.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
stack backtrace with pthreads virtualCoder Programming 2 10-06-2007 05:42 AM
Getting stack backtrace for all instantiated threads bcreane Programming 2 05-02-2006 10:58 AM
Backtrace / stack dump for all Linux platforms GreyBeard Programming 7 07-21-2005 12:04 PM
How to interpret backtrace (gdb) jnusa Programming 1 12-06-2004 09:16 AM
How To interpret kernel stack trace kklier Linux - Enterprise 6 08-22-2004 09:24 AM

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration