Bug 149162 - [ural] ASUS WL-167g doesn't work in 8.1 (continue of 149058)
Summary: [ural] ASUS WL-167g doesn't work in 8.1 (continue of 149058)
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 8.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-31 20:40 UTC by Alexey A Bukreev
Modified: 2019-02-01 10:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey A Bukreev 2010-07-31 20:40:02 UTC
Hello, this a continue of PR 149058.

I deleted all string about wlan & ural from /etc/rc.conf
System boots successfully.
I input in console "ifconfig wlan0 create wlandev ural0"
And ifconfig hangs.
Ctrl+C doesn't work in console with ifconfig — "^C" displays but nothing happens.

How-To-Repeat: 1. Install FreeBSD 8.1
2. Attach ASUS WL-167g to USB-port.
3. Type "ifconfig wlan0 create wlandev ural0"
Comment 1 Hans Petter Selasky 2010-07-31 20:43:18 UTC
Can you compile the kernel with "options USB_DEBUG". Then set the following 
debug variable:

sysctl hw.usb.ural.debug=15

What is printed in dmesg, when you try to activate the wlan0?

--HPS
Comment 2 Alexey A Bukreev 2010-08-01 22:42:49 UTC
I compiled kernel with "options USB_DEBUG", set hw.usb.ural.debug to 15, 
inputed into console "ifconfig wlan0 create wlandev ural0".

There are no messages in dmesg or 1st console. dmesg ends with string 
"rl0: link state changed to UP"

In "top" process ifconfig uses 100% of CPU core. If you wish I can send 
you the photo of "top".

After 10 minutes there several messages displays on dmesg:

    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    1506 usec to 1483 usec for pid 1358 (csh)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    414 usec to 344 usec for pid 1317 (inetd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    734 usec to 610 usec for pid 1277 (sendmail)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    544 usec to 452 usec for pid 1277 (sendmail)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    537 usec to 446 usec for pid 1273 (sendmail)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    687 usec to 570 usec for pid 1257 (sshd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    4830 usec to 4629 usec for pid 966 (syslogd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    304 usec to 253 usec for pid 811 (devd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    7516 usec to 6244 usec for pid 811 (devd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    18540 usec to 17888 usec for pid 4 (g_down)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    949398 usec to 793650 usec for pid 1 (init)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    5350 usec to 4664 usec for pid 0 (kernel)


On 7.3-STABLE on the same computer I have the same messages, but all 
works normally:

    calcru: runtime went backwards from 193 usec to 160 usec for pid 128
    (adjkerntz)
    calcru: runtime went backwards from 24328 usec to 20212 usec for pid
    30 (usbtask-dr)
    calcru: runtime went backwards from 633 usec to 560 usec for pid 24
    (swi6: task queue)
    calcru: runtime went backwards from 5000 usec to 4622 usec for pid 0
    (swapper)



-- 
? ?????????,
??????? ???????
+7(926) 249-90-25
http://lepisgame.net.ru
Comment 3 Alexey A Bukreev 2010-08-01 22:43:01 UTC
I compiled kernel with "options USB_DEBUG", set hw.usb.ural.debug to 15, 
inputed into console "ifconfig wlan0 create wlandev ural0".

There are no messages in dmesg or 1st console. dmesg ends with string 
"rl0: link state changed to UP"

In "top" process ifconfig uses 100% of CPU core. If you wish I can send 
you the photo of "top".

After 10 minutes there several messages displays on dmesg:

    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    1506 usec to 1483 usec for pid 1358 (csh)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    414 usec to 344 usec for pid 1317 (inetd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    734 usec to 610 usec for pid 1277 (sendmail)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    544 usec to 452 usec for pid 1277 (sendmail)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    537 usec to 446 usec for pid 1273 (sendmail)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    687 usec to 570 usec for pid 1257 (sshd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    4830 usec to 4629 usec for pid 966 (syslogd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    304 usec to 253 usec for pid 811 (devd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    7516 usec to 6244 usec for pid 811 (devd)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    18540 usec to 17888 usec for pid 4 (g_down)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    949398 usec to 793650 usec for pid 1 (init)
    Aug  2 01:25:46 lepis kernel: calcru: runtime went backwards from
    5350 usec to 4664 usec for pid 0 (kernel)


On 7.3-STABLE on the same computer I have the same messages, but all 
works normally:

    calcru: runtime went backwards from 193 usec to 160 usec for pid 128
    (adjkerntz)
    calcru: runtime went backwards from 24328 usec to 20212 usec for pid
    30 (usbtask-dr)
    calcru: runtime went backwards from 633 usec to 560 usec for pid 24
    (swi6: task queue)
    calcru: runtime went backwards from 5000 usec to 4622 usec for pid 0
    (swapper)



-- 
? ?????????,
??????? ???????
+7(926) 249-90-25
http://lepisgame.net.ru
Comment 4 Hans Petter Selasky 2010-08-02 07:49:46 UTC
Hi,

Try to enter the debugger from the console by pressing CTRL+ALT+ESC. Use bt to 
get the backtrace. Then backtrace the ifconfig process. Figure out where it 
gets stuck.

Did you run:

sysctl hw.usb.ural.debug=15

--HPS
Comment 5 Alexey A Bukreev 2010-08-02 17:24:17 UTC
I input in console "ifconfig wlan0 create wlandev ural0". After I press 
ALT+CTRL+ESC - nothing happens.
I reboot PC and input "gdb ifconfig wlan0 create wlandev ural0" - result 
you can see here: http://lepis.org.ru/~lepis/freebsd/IMG_0072.JPG

I think I did it wrong :) I'm dummy.


But I saw one strange thing.
In one of tries I started ifconfig command and rebooted PC after 3-5 
minutes. In first console I saw next messages after "Uptime":

    Uptime: 3m21s
    ugen0.2: <ASUS> at usbus0
    ural1: ......
    ural1: ......

You can see photo of these messages: 
http://lepis.org.ru/~lepis/freebsd/IMG_0068.JPG

And reboot stopped. Reboot continued only when I pressed ALT+CTRL+DEL.
I think that it's a bug in ifconfig with duplicating devices.

Sorry my bad English.

-- 
? ?????????,
??????? ???????
+7(926) 249-90-25
http://lepisgame.net.ru
Comment 6 Hans Petter Selasky 2010-08-02 17:39:30 UTC
1) gdb

2) type: file ifconfig

3) type: run wlan0 create wlandev ural0

--HPS
Comment 7 Alexey A Bukreev 2010-08-03 16:46:21 UTC
gdb says "no debugging symbols found"

[lepis@lepis ~]$ cat /usr/src/sys/i386/conf/lepis | grep DEBUG
makeoptions DEBUG=-g #...
options USB_DEBUG
options IEEE80211_DEBUG #....
options USB_DEBUG #....

-- 
С Ñважением,
ÐÑкÑеев ÐлекÑей
+7(926) 249-90-25
http://lepisgame.net.ru
Comment 8 Hans Petter Selasky 2010-08-03 16:50:45 UTC
Hi,

Actually, my intention was to get you into the kernel debugger and not the 
userland debugger. Maybe you have some missing keywords in your kernel config. 
Try google. When setup correctly, CTRL+ALT+ESC should get you into the kernel 
debugger. That means you should exit X11 before typing this sequence. When in 
the kernel debugger, try to dump all threads. Look for function names that 
contain the word "ural". Write down brief stack backtrace.

--HPS
Comment 9 Alexey A Bukreev 2010-08-05 21:50:04 UTC
Hello.

I found very strange behavior. Ñot for nothing that I work for a tester :)

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-online-ddb.html
- Here I found how to use kernel debugger (Ctrl+Alt+Esc).

I added to my config-file next strings:
options         KDB
options         DDB
options         KDB_UNATTENDED
options         BREAK_TO_DEBUGGER
I did the rebuild of kernel, installed it, rebooted the PC.

After reboot I typed into console "ifconfig wlan0 create wlandev ural0"
and ifconfig didn't hangs. Device wlan0 was successfully created.

I commented this 4 strings --> ifconfig hangs, wlan0 wasn't created.

It's very strange :)

Now I'll rebuild kernel with this parameters, read "man ifconfig" and try
to make workable wireless lan. I shall write you results. Thanks.

Best regards,
Bukreev Alexey
Comment 10 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:50 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 11 Andriy Voskoboinyk freebsd_committer 2019-02-01 10:19:23 UTC
Is it still an issue on 11-RELEASE / 12-RELEASE / 13-CURRENT?