intel / edison-linux

Other
48 stars 48 forks source link

WPA supplicant service failed when trying to reconnect p2p connection. #21

Open sunxiaohuix opened 8 years ago

sunxiaohuix commented 8 years ago

Reproduce steps: archermind@archermind-Z97X-UD7-TH:~$ ssh root@192.168.2.15 Warning: Permanently added '192.168.2.15' (ECDSA) to the list of known hosts. root@edison:~# systemctl status wpa_supplicant 鈼?wpa_supplicant.service - WPA supplicant service Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; disabled) Active: inactive (dead) root@edison:~# systemctl start wpa_supplicant root@edison:~# systemctl status wpa_supplicant 鈼?wpa_supplicant.service - WPA supplicant service Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; disabled) Active: active (running) since Thu 2016-05-12 02:45:41 UTC; 1s ago Process: 305 ExecStartPost=/bin/systemctl start wpa_supplicant_p2p_event (code=exited, status=0/SUCCESS) Process: 302 ExecStartPost=/bin/systemctl start wpa_supplicant_wlan0_event (code=exited, status=0/SUCCESS) Main PID: 301 (wpa_supplicant) CGroup: /system.slice/wpa_supplicant.service 鈹斺攢301 /usr/sbin/wpa_supplicant -u -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211 -puse_p2p_group_interface... May 12 02:45:41 edison systemd[1]: Started WPA supplicant service. root@edison:~# wpa_cli -iwlan0 interface Available interfaces: p2p-dev-wlan0 wlan0 root@edison:~# wpa_cli -ip2p-dev-wlan0 p2p_set listen_channel 11 OK root@edison:~# wpa_cli -ip2p-dev-wlan0 set persistent_reconnect 1 OK root@edison:~# wpa_cli -ip2p-dev-wlan0 p2p_set go_apsd 0 OK root@edison:~# wpa_cli -ip2p-dev-wlan0 p2p_find OK root@edison:~# wpa_cli -ip2p-dev-wlan0 p2p_peers 0e:84:dc:be:cb:e0 7a:4b:87:a2:94:22 root@edison:~# wpa_cli -ip2p-dev-wlan0 p2p_connect 7a:4b:87:a2:94:22 94094152 persistent join OK root@edison:~# wpa_cli -iwlan0 interface Available interfaces: p2p-wlan0-0 p2p-dev-wlan0 wlan0

root@edison:~# wpa_cli status -ip2p-wlan0-0 bssid=7a:4b:87:a2:14:22 ssid=DIRECT-0xabc id=0 mode=station pairwise_cipher=NONE group_cipher=NONE key_mgmt=UNKNOWN wpa_state=ASSOCIATED p2p_device_address=7a:4b:87:9e:9f:96 address=7a:4b:87:9e:1f:96 root@edison:~# root@edison:~# wpa_cli -ip2p-dev-wlan0 p2p_group_remove p2p-wlan0-0 OK root@edison:~# wpa_cli -ip2p-dev-wlan0 p2p_connect 7a:4b:87:a2:94:22 94117226 persistent join OK root@edison:~# wpa_cli -iwlan0 interface Available interfaces: p2p-wlan0-1 p2p-dev-wlan0 wlan0 root@edison:~# wpa_cli status -ip2p-wlan0-1 wpa_state=SCANNING p2p_device_address=7a:4b:87:9e:9f:96 address=7a:4b:87:9e:1f:96 root@edison:~# wpa_cli -iwlan0 interface Failed to connect to non-global ctrl_ifname: wlan0 error: Connection refused root@edison:~# wpa_cli status -ip2p-wlan0-1 Failed to connect to non-global ctrl_ifname: p2p-wlan0-1 error: Connection refused root@edison:~# root@edison:~# systemctl status wpa_supplicant 鈼?wpa_supplicant.service - WPA supplicant service Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; disabled) Active: failed (Result: signal) since Thu 2016-05-12 02:48:21 UTC; 3min 33s ago Process: 374 ExecStopPost=/bin/systemctl stop wpa_supplicant_p2p_event (code=exited, status=0/SUCCESS) Process: 369 ExecStopPost=/bin/systemctl stop wpa_supplicant_wlan0_event (code=exited, status=0/SUCCESS) Process: 305 ExecStartPost=/bin/systemctl start wpa_supplicant_p2p_event (code=exited, status=0/SUCCESS) Process: 302 ExecStartPost=/bin/systemctl start wpa_supplicant_wlan0_event (code=exited, status=0/SUCCESS) Process: 301 ExecStart=/usr/sbin/wpa_supplicant -u -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211 -puse_p2p_group_interface=1p2p_device=1 -m/etc/wpa_supplicant/p2p_supplicant.conf -O /var/run/wpa_supplicant -e /etc/wpa_supplicant/entropy.bin (code=killed, signal=KILL) Main PID: 301 (code=killed, signal=KILL)

May 12 02:45:41 edison systemd[1]: Started WPA supplicant service. May 12 02:48:17 edison systemd[1]: wpa_supplicant.service: main process exited, code=killed, status=9/KILL May 12 02:48:21 edison systemd[1]: Unit wpa_supplicant.service entered failed state.

And dmesg log: [ 247.180584] dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79 [ 247.181581] dhd_wlfc_init(): wlfc_mode=0x0, ret=-23 [ 247.193454] Register interface [p2p-wlan0-1] MAC: 7a:4b:87:9e:1f:96 [ 247.193454] [ 247.195011] CFG80211-ERROR) wl_cfg80211_add_virtual_iface : virtual interface(p2p-wlan0-1) is created net attach done [ 247.195039] CFG80211-ERROR) dhd_cfg80211_set_p2p_info : Set : op_mode=0x0035 [ 247.291233] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.318376] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.400666] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.401943] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.402051] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.413353] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.433906] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.454578] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 8 [ 247.473793] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f5beb800 drv_status 0x0 e_type 69 e_states 0 [ 257.258616] CFG80211-ERROR) wl_scan_timeout : timer expired [ 257.258841] CFG80211-ERROR) wl_escan_handler : escan is not ready ndev f59ee800 drv_status 0x0 e_type 69 e_states 2 [ 257.277419] BUG: unable to handle kernel NULL pointer dereference at (null) [ 257.277521] IP: [] wl_cfg80211_connect+0x486/0x1bf0 [bcm4334x] [ 257.277671] pdpt = 00000000351f2001 pde = 0000000000000000 [ 257.277734] Oops: 0002 [#1] PREEMPT SMP [ 257.277789] Modules linked in: usb_f_acm u_serial usb_f_ecm g_multi usb_f_rndis usb_f_mass_storage u_ether libcomposite bcm_bt_lpm bcm4334x(O) [ 257.277961] CPU: 1 PID: 301 Comm: wpa_supplicant Tainted: G W O 3.19.5-yocto-standard+ #1 [ 257.278029] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48 [ 257.278096] task: f5bb2d10 ti: f5bda000 task.ti: f5bda000 [ 257.278146] EIP: 0060:[] EFLAGS: 00210246 CPU: 1 [ 257.278321] EAX: 00000000 EBX: 00000001 ECX: f5bdb9d0 EDX: 00000000 [ 257.278372] ESI: f5beb800 EDI: f5bdba50 EBP: f5bdba10 ESP: f5bdb974 [ 257.278423] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 257.278470] CR0: 8005003b CR2: 00000000 CR3: 35125000 CR4: 001007f0 [ 257.278518] Stack: [ 257.278542] 00000002 f5270444 00000043 00000001 00000000 c1d6d540 f5bdba1c c1320782 [ 257.278656] c1d6d540 00000001 00000141 c1d6cac0 f8db3e08 f5160420 f5bdba50 f5160664 [ 257.278767] 00000032 f5160420 f5160180 00000002 00000000 0000b9d4 00000000 00000002 [ 257.278878] Call Trace: [ 257.278930] [] ? alloc_pages_nodemask+0x122/0x890 [ 257.278995] [] ? preempt_count_sub+0xaf/0x110 [ 257.279053] [] ? mutex_lock_slowpath+0x208/0x3a0 [ 257.279112] [] ? mutex_lock_slowpath+0x208/0x3a0 [ 257.279170] [] ? might_sleep+0x3a/0xb0 [ 257.279294] [] ? wl_cfg80211_stop_ap+0x3c0/0x3c0 [bcm4334x] [ 257.279357] [] cfg80211_connect+0xc7/0x4b0 [ 257.279412] [] nl80211_connect+0x2eb/0x3c0 [ 257.279479] [] genl_rcv_msg+0x219/0x380 [ 257.279535] [] ? ctrl_dumpfamily+0xf0/0xf0 [ 257.279588] [] netlink_rcv_skb+0x8e/0xb0 [ 257.279639] [] genl_rcv+0x21/0x30 [ 257.279687] [] netlink_unicast+0x131/0x1b0 [ 257.279741] [] ? memcpy_fromiovec+0x47/0x80 [ 257.279796] [] netlink_sendmsg+0x240/0x3e0 [ 257.279855] [] do_sock_sendmsg+0xbd/0xe0 [ 257.279914] [] ? copy_msghdr_from_user+0x145/0x1d0 [ 257.279973] [] _sys_sendmsg+0x20f/0x250 [ 257.280027] [] ? ___sys_recvmsg+0xd4/0x140 [ 257.280081] [] ? sock_recvmsg_nosec+0xa0/0xa0 [ 257.280138] [] ? might_sleep+0x3a/0xb0 [ 257.280194] [] ? move_addr_to_user+0xa2/0xc0 [ 257.280250] [] ? SYSC_getsockname+0xb3/0xc0 [ 257.280303] [] ? preempt_count_sub+0xaf/0x110 [ 257.280356] [] ? get_parent_ip+0xb/0x40 [ 257.280408] [] ? fdget+0x12/0x20 [ 257.280457] [] ? sockfd_lookup_light+0x14/0x70 [ 257.280511] [] sys_sendmsg+0x38/0x70 [ 257.280565] [] SYSC_socketcall+0x816/0x9f0 [ 257.280621] [] ? slab_free+0x2cc/0x390 [ 257.280675] [] ? __local_bh_enable_ip+0x61/0xe0 [ 257.280730] [] ? preempt_count_sub+0xaf/0x110 [ 257.280784] [] ? preempt_count_sub+0xaf/0x110 [ 257.280839] [] ? kmem_cache_free+0x79/0x1b0 [ 257.280893] [] ? sock_destroy_inode+0x28/0x30 [ 257.280946] [] ? get_parent_ip+0xb/0x40 [ 257.280996] [] ? preempt_count_sub+0xaf/0x110 [ 257.281052] [] ? dentry_free+0x4c/0x90 [ 257.281104] [] ? dentry_free+0x4c/0x90 [ 257.281155] [] ? dentry_kill+0x10b/0x1b0 [ 257.281210] [] ? mntput_no_expire+0x25/0x120 [ 257.281264] [] ? mntput+0x20/0x40 [ 257.281312] [] ? fput+0x164/0x1e0 [ 257.281365] [] SyS_socketcall+0x13/0x20 [ 257.281415] [] syscall_call+0x7/0x7 [ 257.281469] [] ? ww_mutex_lock_interruptible_slowpath+0x640/0x700 [ 257.281523] Code: 04 24 89 f0 e8 ac 6a 01 00 85 c0 89 c7 0f 85 a2 0b 00 00 8b 45 a8 b9 02 00 00 00 89 f2 e8 f3 59 ff ff 8b 7d 9c 8d 4d c0 8b 57 2c <89> 10 a1 a0 6e db f8 89 f2 89 45 a8 e8 b9 12 01 00 85 c0 74 45 [ 257.282109] EIP: [] wl_cfg80211_connect+0x486/0x1bf0 [bcm4334x] SS:ESP 0068:f5bdb974 [ 257.282265] CR2: 0000000000000000 [ 257.670439] ---[ end trace 1be12dbab29b7072 ]--- [ 257.713436] wpa_supplicant (301) used greatest stack depth: 4208 bytes left

andy-shev commented 4 years ago

Can you reproduce this on latest (vanilla) kernel? You may try to use https://github.com/edison-fw/meta-intel-edison

Also it seems you opened quite a few questions here. Perhaps it would make sense to test all and close them here, and open ones that have been reproduced against new meta-intel-edison layer.

htot commented 4 years ago

Also, why are you calling supplicant directly? Is p2p not supported from connmanctl?