NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38502: ifconfig wi0 hangs



The following reply was made to PR kern/38502; it has been noted by GNATS.

From: Andrew Doran <ad%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/38502: ifconfig wi0 hangs
Date: Thu, 24 Apr 2008 23:46:32 +0100

 On Thu, Apr 24, 2008 at 10:35:02PM +0000, Martin Husemann wrote:
 > The following reply was made to PR kern/38502; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: Andrew Doran <ad%netbsd.org@localhost>
 > Cc: gnats-bugs%NetBSD.org@localhost
 > Subject: Re: kern/38502: ifconfig wi0 hangs
 > Date: Fri, 25 Apr 2008 00:33:02 +0200
 > 
 >  On Fri, Apr 25, 2008 at 12:12:02AM +0200, Martin Husemann wrote:
 >  >   tsleep(sc, 0, "nelldel", ticks);
 >  > 
 >  > with ticks==40 and never awakes.
 >  
 >  This happens the first time this function is called !cold - backtrace
 >  is:
 >  
 >  stp4020_delay(0xf0541ea0, 0xf019036c, 0xf0541ea0, 0xf0267400, 0x29, 
 > 0xf0267800) a
 >  t netbsd:pcmcia_socket_enable+0x20
 >  pcmcia_socket_enable(0xf0541c00, 0xf04df580, 0x7, 0xf0062770, 0xf0542000, 
 > 0xf053
 >  f8a8) at netbsd:pcmcia_function_enable+0x24                                 
 >    
 >  pcmcia_function_enable(0xf04df580, 0x7, 0xf0062770, 0xf0542000, 0x1, 
 > 0xf35e9260)
 >   at netbsd:wi_pcmcia_enable+0x38                                            
 >    
 >  wi_pcmcia_enable(0xf0542000, 0x700, 0x80000000, 0x0, 0x41400fe2, 
 > 0x41400fe2) at n
 >  etbsd:wi_init+0x40
 >  wi_init(0xf0542088, 0xf053f86c, 0xf052d078, 0xf01efe50, 0x675, 0x41400fe3) 
 > at ne
 >  tbsd:ether_ioctl+0x144                                                      
 >    
 >  ether_ioctl(0xf0542088, 0x8090690c, 0xf053f800, 0x8090690c, 0x41400fe4, 
 > 0x41400f
 >  e4) at netbsd:ieee80211_ioctl+0x1a34                                        
 >    
 >  ieee80211_ioctl(0xf05422a8, 0x8090690c, 0xf053f800, 0xf35e9260, 0xf0002000, 
 > 0xf0
 >  271878) at netbsd:wi_ioctl+0xb58                                            
 >    
 >  wi_ioctl(0xf0542088, 0x8090690c, 0xf053f800, 0xf0267400, 0x29, 0xf0267800) 
 > at ne
 >  tbsd:in_ifinit+0x13c                                                        
 >    
 >  in_ifinit(0xf0542088, 0xf053f800, 0xf3d4ee40, 0x0, 0x8040691a, 0xf053f8a8) 
 > at ne
 >  tbsd:in_control+0xc44                                                       
 >    
 >  in_control(0x0, 0x8040691a, 0xf3d4ee30, 0xf0542088, 0x1, 0xf35e9260) at 
 > netbsd:i
 >  fioctl+0x574                                                                
 >    
 >  ifioctl(0x2d, 0x8040691a, 0xf3d4ee30, 0xf35e9260, 0x0, 0x0) at 
 > netbsd:sys_ioctl+
 >  0x224                                                                       
 >    
 
 It's a deadlock.. The softclk thread does wakeups for tsleep. It's blocked
 waiting for softnet_lock (presumably running some kind of IP stack callout)
 and so can't proceeed to wake up the nell thread, which holds the lock and
 is sleeping. I guess that we need to drop softnet_lock at some point during
 in_control() processing but I don't know without looking at it in detail.
 I'll fix it tomorrow unless someone beats me to it.
 
 Thanks,
 Andrew
 


Home | Main Index | Thread Index | Old Index