Run0 device hangs/reboots pfsense box when active



  • Crash report attached
    errorlog.txt



  • Uprade to

    2.1-RC1  (amd64)
    built on Mon Aug 12 16:27:08 EDT 2013

    FreeBSD 8.3-RELEASE-p9

    gave me nothing, unfortunately.



  • Is the wireless mode of the run0 device Access Point or Infrastructure? If I recall correctly, Infrastructure mode is broken in the FreeBSD 8.x (x =1 or 3, probably others as well) driver for run devices.



  • The mode is AP, unchecked Allow intra-BSS communication, trying one more time.



  • I'm running a pfSense 2.1 snapshot build. My Tenda W311U is controlled by the run driver and works fine. I have Allow intra-BSS communication checked. My device is reported in the startup output as follows:

    $: dmesg | grep run
    run0: <1.0> on usbus3
    run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address c8:3a:35:c4:ee:f3
    run0: firmware RT2870 loaded
    $ usbconfig dump_device_desc
    . . .
    ugen3.2: <802.11 n WLAN Ralink> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

    bLength = 0x0012
      bDescriptorType = 0x0001
      bcdUSB = 0x0200
      bDeviceClass = 0x0000
      bDeviceSubClass = 0x0000
      bDeviceProtocol = 0x0000
      bMaxPacketSize0 = 0x0040
      idVendor = 0x148f
      idProduct = 0x3070
      bcdDevice = 0x0101
      iManufacturer = 0x0001  <ralink>iProduct = 0x0002  <802.11 n WLAN>
      iSerialNumber = 0x0003  <1.0>
      bNumConfigurations = 0x0001

    $</ralink>

    What is reported on your system?

    When does the crash occur? (Perhaps when you enable the interface through the GUI?)

    Is the dongle attached at system startup?

    What is the make and model of your dongle?



  • Well, it is KASENS 660000N

    $ dmesg | grep run
    run0: <1.0> on usbus2
    run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address 48:02:2a:4c:43:8a
    run0: firmware RT2870 loaded
    run0_wlan0: promiscuous mode enabled

    $ usbconfig dump_device_desc
    ugen2.2: <802.11 n WLAN Ralink> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

    bLength = 0x0012
     bDescriptorType = 0x0001
     bcdUSB = 0x0200
     bDeviceClass = 0x0000
     bDeviceSubClass = 0x0000
     bDeviceProtocol = 0x0000
     bMaxPacketSize0 = 0x0040
     idVendor = 0x148f
     idProduct = 0x3070
     bcdDevice = 0x0101
     iManufacturer = 0x0001   <ralink>iProduct = 0x0002  <802.11 n WLAN>
     iSerialNumber = 0x0003  <1.0>
     bNumConfigurations = 0x0001

    No, it crashes while in use (obtaining the data thru wlan interface)
    Yes, it is attached at startup, loader.conf.local corrected.

    /boot/loader.conf.local
    runfw_load="YES"

    It crashes/hangs @ random times, but it is always connected with WiFi activity.
    4+ days of cable uploading/downloading gave me absolutely no connection problems (i.e. the pfsense box works correctly by itself)</ralink>



  • The details you provided look jus like the details of my device but I wonder why @DiskWizard:

    run0_wlan0: promiscuous mode enabled

    Is it a bridge member?



  • Yes, I did the WiFi install by some guide in my native language, it is a bridge member.



  • @DiskWizard:

    Yes, I did the WiFi install by some guide in my native language, it is a bridge member.

    Can you try configuring the Wifi device to be a "standalone" interface, not a bridge member and running it that way for a few days to see if that makes a difference?



  • I will try it 4 sure, can you be so kind please and point me for instructions of the working configuration? If I could find it on my own, there won't be any problems likely.



  • @DiskWizard:

    I will try it 4 sure, can you be so kind please and point me for instructions of the working configuration?

    You will need to allocate a distinct IP subnet for the WiFi interface and WiFi clients, remove the WiFi interface from the bridge, assign an address in that subnet to the WiFi interface, (possibly) enable DHCP server on the WiFi interface and configure DHCP server for that interface, add suitable firewall rules on the WiFi interface. Once that is done it would probably be a good idea to reboot to clear out any memory of your old configuration.

    Ask if you need help with any of those steps.



  • Thank you wallabybob for supplying me the directions to solve my problem. The first thing I have done was to reset  my current interfaces configuration using Shell console. I know, now it is the time to assign the WiFi interface as OPTx, but what are the next steps. I usually have no need to ask a pity to myself, but since I am MS sick I do so.
    Thank you wallabybob anyway.



  • @DiskWizard:

    I know, now it is the time to assign the WiFi interface as OPTx, but what are the next steps.

    Pretty much what I described in my previous reply but you don't need to remove the OPTx interface from the bridge.



  • @wallabybob:

    Is the wireless mode of the run0 device Access Point or Infrastructure? If I recall correctly, Infrastructure mode is broken in the FreeBSD 8.x (x =1 or 3, probably others as well) driver for run devices.

    Hi all, I'm new here! Got the same problem with run0.

    My device is a Linksys WUSB100:

    run0: <cisco-linksys 0="" 2="" llc="" linksys="" wusb100="" rangeplus="" wireless="" usb="" adapter,="" class="" 0,="" rev="" 2.00="" 1.01,="" addr="">on usbus3
    run0: MAC/BBP RT2860 (rev 0x0102), RF RT2720 (MIMO 1T2R), address 00:1e:e5:df:5e:84
    run0: firmware RT2870 loaded</cisco-linksys> 
    

    As you say, there is a bug in the Ralink driver in FreeBSD 8.x that has been patched in further versions. More info here and here. So I don't think that removing the interface from the bridge would make sense.

    There are some updated versions of this driver, where new devices has been added, but the bug seems not to have been fixed.

    I'm currently trying to get a build environment where I can mix up the (latest?) version of if_run.c with the patched one. Just following these instructions and stealing some sleep time  ;D. Since  there is not too much documentation, I have decided to join the forum and will try to get success with your help.

    Thank you all



  • @selui:

    There are some updated versions of this driver, where new devices has been added, but the bug seems not to have been fixed.

    Where are the updated versions that don't have the bug fixed?



  • @wallabybob:

    @selui:

    There are some updated versions of this driver, where new devices has been added, but the bug seems not to have been fixed.

    Where are the updated versions that don't have the bug fixed?

    Here is the latest one for 8.3 dated on 03-2012.

    The bug "page fault caused by referring freed node" detected on 2011 seems not to be fixed in that version. Look at run_drain_fifo starting at line 2226 and compare with the same function on this version at line 2242.

    Please, let me know if I'm going wrong…

    Thanks!



  • Ah, exactly as I thought - it is not a configuration problem, but the driver related.



  • I hope I got it!

    [2.1-RC1][root@pfsense.ibernetica.com]/root(3): uname -a
    FreeBSD pfsense.ibernetica.com 8.3-RELEASE-p10 FreeBSD 8.3-RELEASE-p10 #1: Thu Sep  5 14:04:16 CEST 2013     root@freebsd.ibernetica.com:/usr/obj.pfSense/usr/pfSensesrc/src/sys/pfSense_SMP.8  amd64
    [[/code]
    
    I've just patched the driver, built and installed my fixed kernel. Now testing...  ;D
    


  • Whoa man, you almost make my day  ;D



  • Since it is the driver from Akinori Furukoshi it should be configured in different way thru wlan0 device. Gonna make some digging in that way.



  • I had nothing but problems when I used a Ralink usb adapter. My Alix box would constantly reboot randomly. Once I removed it and used an external AP everything went back to normal.



  • Well, I understand you, but the question is - should we continue to try the driver or abandon it as non-useable ? I think I'll contact the author for some clarification.
    Thank you for your answer.



  • @DiskWizard:

    Well, I understand you, but the question is - should we continue to try the driver or abandon it as non-useable ? I think I'll contact the author for some clarification.
    Thank you for your answer.

    Sorry, my comment came out the wrong way, but reading this thread reminded me all the frustration that thing caused me ;) . If the problem is in fact a buggy driver, it would be great if it could be fixed and eventually included in 2.1. The Ralink USB adapters are a very cheap and easy way to add wifi to Alix and similar hardware.


  • Banned

    @MaxPF:

    The Ralink USB adapters are a very cheap and easy way to add wifi to Alix and similar hardware.

    No offense, but adding something like this to your Alix is about zillion times better than using some Ralink USB junk.



  • @doktornotor:

    @MaxPF:

    The Ralink USB adapters are a very cheap and easy way to add wifi to Alix and similar hardware.

    No offense, but adding something like this to your Alix is about zillion times better than using some Ralink USB junk.

    +1 - I have a couple of Alix in remote places with an Atheros WiFi card inside. The card is a bit more expensive than a separate WiFi box, but it saves power for a separate box… Can be simpler for remote/small office installs.



  • Oh, yeah ! Finally !!!
    The reply from the author of the driver

    Hello,

    This bug was fixed about a couple of years ago.
    http://www.freebsd.org/cgi/query-pr.cgi?pr=153938&cat=

    But, it did not backported to FreeBSD 8.* If pfsense does not use
    freebsd 9.0 or newer release, the patch need to be applied manually to
    pfsense's src tree.

    AK



  • P.S. Maybe someone will open a ticket for the issue ?



  • You can open a ticket yourself on RedMine. However, if it is already fixed in FreeBSD 9 and later, then it will just fix itself for pfSense 2.2 on FreeBSD 10.


Log in to reply