Bug 256494 - KERNEL PANIC - WiFi - after hot spot is down FreeBSD restarts
Summary: KERNEL PANIC - WiFi - after hot spot is down FreeBSD restarts
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords: panic
Depends on:
Blocks:
 
Reported: 2021-06-09 06:41 UTC by vermaden
Modified: 2021-06-12 11:53 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vermaden 2021-06-09 06:41:38 UTC
Hi.

My /etc/rc.conf settings related to network.

    hostname=w520.local
    background_dhclient=YES
    extra_netfs_types=NFS
    defaultroute_delay=3
    defaultroute_carrier_delay=3
    harvest_mask=351

I start my network connections manually with script so that is why no network settings in /etc/rc.conf file.

My /etc/wpa_supplicant.conf WiFi network.

    eapol_version=2
    ap_scan=1
    fast_reauth=1

    network={
      ssid="vermore5"
      psk="password"
      priority=6
    }

My hardware is ThinkPad W520 from 2011 with Intel 6300 WiFi:

    # pciconf -lv
    (...)
    iwn0@pci0:3:0:0:        class=0x028000 rev=0x3e hdr=0x00 vendor=0x8086 device=0x4238 subvendor=0x8086 subdevice=0x1111
        vendor     = 'Intel Corporation'
        device     = 'Centrino Ultimate-N 6300'
        class      = network



Steps to reproduce:

1. Connect to your hot spot WiFi:
    # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -s -B
    # dhclient wlan0

2. You have Internet connection as usual - everything works.

3. Power off the hot spot WiFi (so it will not be accessible)

4. FreeBSD panics and reboots.



Hope that helps.

Regards.
Comment 1 vermaden 2021-06-09 07:58:47 UTC
I forgot to add that I also check every minute if I have Internet connection and if not I try to reconnect in a crontab(5) job.



% crontab -l | grep -C 1 WIFI
-------------------------------------------------------------------------------

# WIFI RESTART
  *     *     * * * ~/scripts/network-ping.sh 1> /dev/null 2> /dev/null
-------------------------------------------------------------------------------



# cat ~/scripts/network-ping.sh
-------------------------------------------------------------------------------% #! /bin/sh

# WAIT 5 SECONDS WITH -t OPTION
if ! ping -c 1 -s 0 -t 5 -q 1.1.1.1 1> /dev/null 2> /dev/null
then
  ~/scripts/network.sh wlan start vermore
else
  exit 0
fi

~/scripts/network-ping.sh
-------------------------------------------------------------------------------



The *network.sh* is quite longer and its available here:
https://github.com/vermaden/network



I am not sure that this changes anything but wanted to be specific.



Regards.
Comment 2 Graham Perrin 2021-06-12 00:42:35 UTC
Interesting. Is it possible to share relevant information from a /var/crash/core.txt.* record of a panic?
Comment 3 vermaden 2021-06-12 08:39:29 UTC
(In reply to Graham Perrin from comment #2)

These are the only things I have there:

# find /var/crash 
/var/crash
/var/crash/minfree

# cat /var/crash/minfree
2048
Comment 4 Graham Perrin 2021-06-12 11:53:27 UTC
Relevant lines from my /etc/rc.conf are: 


# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
# dumpdev="AUTO"
dumpdev="/dev/ada0p3"
dumpdir="/var/crash"
savecore_enable="YES"


– yours should differ slightly. 

----

It's normal to have AUTO for dumpdev. 

Mine is /dev/ada0p3 in the context of GELI-encrypted swap, 

root@mowa219-gjp4-8570p:~ # lsblk ada0
DEVICE         MAJ:MIN SIZE TYPE                              LABEL MOUNT
ada0             0:130 466G GPT                                   - -
  ada0p1         0:132 200M efi                        gpt/efiboot0 -
  ada0p2         0:134 512K freebsd-boot               gpt/gptboot0 -
  <FREE>         -:-   492K -                                     - -
  ada0p3         0:136  16G freebsd-swap                  gpt/swap0 SWAP
  ada0p3.eli     2:71   16G freebsd-swap                          - SWAP
  ada0p4         0:138 450G freebsd-zfs                    gpt/zfs0 <ZFS>
  ada0p4.eli     0:149 450G zfs                                   - -
  <FREE>         -:-   4.0K -                                     - -
root@mowa219-gjp4-8570p:~ # 

----

If you have not already done so: please install devel/gdb (for core.txt.* files to include debug information). 

If you perform an installation: after completion, wait at least sixty seconds before reproducing the kernel panic.