Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]wpa_supplicant crashed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
EugeneTheJeep
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2017
Posts: 101

PostPosted: Sat Jun 03, 2017 12:55 pm    Post subject: [solved]wpa_supplicant crashed Reply with quote

Hi,

My wpa_supplicant daemon appears to be crashing. It doesn't affect my network connection at all, but it's annoying and I'm concerned it might be a security issue.

Here is my rc-status, /etc/wpa_supplicant/wpa_supplicant.conf, and /etc/conf.d/wpa_supplicant
Code:

$ sudo rc-status
Password:
Runlevel: default
 sysklogd                                                                  [  started  ]
 cronie                                                                    [  started  ]
 wpa_supplicant                                                            [  crashed  ]
 net.wlan0                                                                 [  started  ]
 cupsd                                                                     [  started  ]
 netmount                                                                  [  started  ]
 local                                                                     [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 dbus                                                                      [  started  ]
 modules-load                                                              [  started  ]
Dynamic Runlevel: manual


Code:

cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
        ssid="xxxxxxxxxxxxxx"
        scan_ssid=1
        bssid=XX:XX:XX:XX:XX:XX
        psk="xxxxxxxx"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
        priority=5
}


Code:

# conf.d file for wpa_supplicant
#
# Please check man 8 wpa_supplicant for more information about the options
# wpa_supplicant accepts.
#
wpa_supplicant_args="-B -M -c/etc/wpa_supplicant/wpa_supplicant.conf"


Just wondering if anyone knew why it might be crashing and if there is a fix for it. Thanks


Last edited by EugeneTheJeep on Sat Jun 03, 2017 4:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 734
Location: Glasgow, UK

PostPosted: Sat Jun 03, 2017 2:36 pm    Post subject: Reply with quote

[EDIT2] Nevermind, I got ahead of myself. See posts below.

Well, your config looks okay, a bit overspecified perhaps, but nothing incorrect about it.

I suggest you try running it in the foreground and see what happens, it may give you an enlightening error message when it quits.

[EDIT] - of course you can also use logging. try adding "-dd -f /var/log/wpa_supplicant.log" to wpa_supplicant_args in /etc/conf.d/wpa_supplicant and see if there is any enlightening information given

Beyond that, you are looking at needing to build with debug symbols and attach gdb to see what is going on.

-Telemin-
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post


Last edited by Telemin on Sat Jun 03, 2017 2:46 pm; edited 2 times in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6971
Location: Saint Amant, Acadiana

PostPosted: Sat Jun 03, 2017 2:40 pm    Post subject: Reply with quote

Why is it configured to run by itself? Normally the wpa_supplicant is started by some network management application.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 734
Location: Glasgow, UK

PostPosted: Sat Jun 03, 2017 2:44 pm    Post subject: Reply with quote

Jaglover wrote:
Why is it configured to run by itself? Normally the wpa_supplicant is started by some network management application.


Right, that would be it. Two instances are trying to start. First the /etc/init.d/net.wlan0 script starts an instance, and then the instance from the /etc/init.d/wpa_supplicant, but that can't bind to the interface because there is already an instance bound so it quits with an error.

Just rc-update del wpa_supplicant :)

FYI You can either use the net.* scripts to configure your networks, or start wpa_supplicant and dhcpcd manually. If you try to do both like this they conflict.

-Telemin-
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post
Back to top
View user's profile Send private message
EugeneTheJeep
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2017
Posts: 101

PostPosted: Sat Jun 03, 2017 3:06 pm    Post subject: Reply with quote

Telemin,

Thanks, it worked. I guess this means I can delete wpa_supplicant from /etc/init.d? Or is that needed by net.wlan0?
Back to top
View user's profile Send private message
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 734
Location: Glasgow, UK

PostPosted: Sat Jun 03, 2017 4:00 pm    Post subject: Reply with quote

You don't ever need to delete things from /etc/init.d, that is just where the init scripts get installed to when you emerge a package. The actual place that openrc finds the information on what to run at boot is the /etc/runlevels directory. If you look in there you will see symlinks corresponding to all the services you have enabled. rc-update is just a little helper script that manages these symlinks for you, now you have removed the wpa_supplicant service from the default runlevel everything is as it should be. If you did delete the init script portage would just put it back the next time wpa-supplicant is emerged anyhow.

-Telemin-
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post
Back to top
View user's profile Send private message
EugeneTheJeep
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2017
Posts: 101

PostPosted: Sat Jun 03, 2017 4:24 pm    Post subject: Reply with quote

Got it. Thanks. Marking solved.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Sat Jun 03, 2017 7:57 pm    Post subject: Reply with quote

Jaglover wrote:
Why is it configured to run by itself? Normally the wpa_supplicant is started by some network management application.


That's not a blanket rule though.
By allowing wpa_supplicant to manage things itself (which later versions can do via the match interface directive) then the network management application doesn't need to know how the physical link should be brought up

This in turn allows the possibility of swapping wpa_supplicant out with another variant as one would with an address auto-configuration client such as dhcpcd.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
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
Page 1 of 1

 
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