Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wpa_supplicant closing fine but leaving file behind?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ipreiml
n00b
n00b


Joined: 06 Jun 2007
Posts: 2

PostPosted: Mon Sep 17, 2007 9:08 am    Post subject: Reply with quote

Hi there, I had the same problem and re-adding xdm with rc-update didn't help :(. Anyway, I solved the problem by altering the following lines in /lib/rcscripts/net/wpa_supplicant.sh from:
Code:

       # If wpa_supplicant exits uncleanly, we need to remove the stale dir
        [[ -S "/var/run/wpa_supplicant/${iface}" ]] \
                && rm -rf "/var/run/wpa_supplicant/${iface}"

to:
Code:

        # If wpa_supplicant exits uncleanly, we need to remove the stale dir
        [[ -S "/var/run/wpa_supplicant/${iface}" ]] \
                && rm -rf "/var/run/wpa_supplicant"

My guess is that the startup scripts check whether the directory "/var/run/wpa_supplicant" exists or not. They doesn't check whether the directory is empty or not, so it is not sufficient to only remove the ${iface} file. I haven't checked the code yet, but it seems to work for me.
Back to top
View user's profile Send private message
kds66
Apprentice
Apprentice


Joined: 17 Oct 2006
Posts: 166
Location: Manaus, Brazil

PostPosted: Fri Nov 23, 2007 2:35 pm    Post subject: Same thing here Reply with quote

Same issue here, even after making the change. It happens in about 10-15% of the reboots.
Back to top
View user's profile Send private message
kds66
Apprentice
Apprentice


Joined: 17 Oct 2006
Posts: 166
Location: Manaus, Brazil

PostPosted: Fri Nov 23, 2007 2:38 pm    Post subject: Reply with quote

Hmm, I wonder how effective the above workaround would be at boot time, considering that /var/run is cleared during the boot sequence.

Anyway, I just found the following, possibly related line in dmesg output:

ndiswrapper (iw_set_freq:334): setting configuration failed (00010003)

Still does not help me but perhaps somebody has an idea?
Back to top
View user's profile Send private message
lost-distance
n00b
n00b


Joined: 10 Apr 2003
Posts: 73

PostPosted: Sun Nov 09, 2008 4:32 pm    Post subject: Reply with quote

I too have been seeing the "wpa_ctrl_open: Address already in use" bug recently, and believe I have identified the problem.

Temporary socket files named /tmp/wpa_ctrl_pid-counter are being left behind when the system shuts down abnormally. After the next boot a new wpa_supplicant process (or actually wpa_cli process) with the same process-id will try to create the same file and fail for some reason. That is why the bug is intermittent - it depends on the process-id. Such a failure to handle an existing file is clearly an application bug.

A simple workaround is to enable WIPE_TMP in the /etc/conf.d/bootmisc configuration file:

Code:
WIPE_TMP="yes"

Alternatively, if wiping /tmp is too drastic, just append /tmp/wpa_ctrl_* to the list of files deleted by the /etc/init.d/bootmisc startup script:

Code:
rm -f /tmp/.X*-lock /tmp/esrv* /tmp/kio* /tmp/jpsock.* /tmp/.fam* /tmp/iceauth.* /tmp/xauth.* /tmp/wpa_ctrl_*

These have worked for me so far.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum