Re: kern/153594: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run

2011-01-04 Thread Eugene Grosbein
On 04.01.2011 15:39, Bernhard Schmidt wrote: >> Proper fine-grained locking was always good solution for race problem :-) >> How about using flock(2) in wpa_supplicant source code? > > I don't see any flock'able resource shared between instances, do you? Just use pidfile(3) :-)

Re: kern/153594: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run

2011-01-04 Thread Bernhard Schmidt
On Tuesday, January 04, 2011 10:09:15 Eugene Grosbein wrote: > On 04.01.2011 15:06, Bernhard Schmidt wrote: > >> Perhaps, wrapping wpa_supplicant invocation into "lockf -t0" would help > >> to eliminate race? > > > > Possibly, but I don't think this is the way to go. > > > > Currently wpa_supplic

Re: kern/153594: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run

2011-01-04 Thread Eugene Grosbein
On 04.01.2011 15:06, Bernhard Schmidt wrote: >> Perhaps, wrapping wpa_supplicant invocation into "lockf -t0" would help >> to eliminate race? > > Possibly, but I don't think this is the way to go. > > Currently wpa_supplicant has this code: > /* > * Mark the interface as down to

Re: kern/153594: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run

2011-01-04 Thread Bernhard Schmidt
On Tuesday, January 04, 2011 09:08:24 Eugene Grosbein wrote: > > There is race in devd and our rc-subsystem if wpa_supplicant is involved > > effectivly resulting in starting wpa_supplicant twice. Both instances try > > to take over the wlan device which results in what you are seeing. > > I have n

Re: kern/153594: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run

2011-01-03 Thread bschmidt
Synopsis: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run State-Changed-From-To: open->suspended State-Changed-By: bschmidt State-Changed-When: Mon Jan 3 19:59:38 UTC 2011 State-Changed-Why: This is known issue. There is race in devd and our rc-subsystem if wpa_supplicant i

Re: kern/153594: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run

2011-01-03 Thread linimon
Old Synopsis: iwn: Network keeps disconnecting when /etc/rc.d/netif restart is run New Synopsis: [iwn] Network keeps disconnecting when /etc/rc.d/netif restart is run Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Mon Jan 3 19:10: