Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167420 - net-wireless/ipw3945 crashes on startup
Summary: net-wireless/ipw3945 crashes on startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Christian Heim (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ipw3945-tracker
  Show dependency tree
 
Reported: 2007-02-18 01:52 UTC by Nick Fankhauser
Modified: 2007-06-04 15:32 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel config for linux-2.6.19-gentoo-r5 (.config,39.33 KB, text/plain)
2007-02-18 01:53 UTC, Nick Fankhauser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Fankhauser 2007-02-18 01:52:24 UTC
When the ipw3945 regulatory daemon tries to start, it crashes like this:
thinkpad nyk # rmmod ipw3945 && modprobe ipw3945
 * Starting ipw3945d ...
ipw3945d - regulatory daemon
Copyright (C) 2005-2006 Intel Corporation. All rights reserved.
version: 1.7.22
Intel PRO/Wireless 3945ABG Network Connection found at:
 /sys/bus/pci/drivers/ipw3945/0000:03:00.0
Daemon launched as pid 10482.  Exiting.                                                                                [ !! ]
FATAL: Error running install command for ipw3945

It's the same error the first time the module is loaded.
When I activate debug output, I see this message from ipw3945 in dmesg, but nothing else suggesting an error:
ipw3945:
 is not in hex or decimal form.

Reproducible: Always

Steps to Reproduce:
1.Load ipw3545 module
2.Regulatory daemon tries to start and crashes 


Actual Results:  
No wireless network, nothing shows up in iwconfig

Expected Results:  
Provide a wireless network interface

thinkpad nyk # emerge --info
Portage 2.1.2-r9 (default-linux/x86/no-nptl, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r5 i686)
=================================================================
System uname: 2.6.19-gentoo-r5 i686 Genuine Intel(R) CPU           T2400  @ 1.83GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sat, 17 Feb 2007 00:30:01 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ http://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa apache2 apm arts asf avi berkdb bitmap-fonts bzip2 cli cracklib crypt cups dlloader dri eds emboss encode exif fam ffmpeg flac foomaticdb fortran gd gdbm gif glitz gnome gphoto2 gpm gstreamer gtk gtk2 hal hdaps i810 iconv imagemagick imap imlib intel isdnlog java jpeg libg++ libwww mad midi mikmod mmx modplug motif mozbranding mp3 mpeg musepack mysql ncurses nls nsplugin ogg opengl oss pam pcre pdf perl png posix postgres pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spl ssl svg tcpd tetex timidity truetype truetype-fonts type1-fonts unicode usb vim vorbis win32codecs wma wxwindows x86 xml xorg xv xvid zlib" ALSA_CARDS="snd-hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i810 vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


thinkpad nyk # dmesg | grep ipw     
ipw3945: Intel(R) PRO/Wireless 3945 Network Connection driver for Linux, 1.2.0dmpr
ipw3945: Copyright(c) 2003-2006 Intel Corporation
ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection
Comment 1 Nick Fankhauser 2007-02-18 01:53:21 UTC
Created attachment 110509 [details]
Kernel config for linux-2.6.19-gentoo-r5
Comment 2 Nick Fankhauser 2007-02-18 02:03:21 UTC
There's also maybe some more information here: http://forums.gentoo.org/viewtopic-p-3908257.html#3908257
Comment 3 Nick Fankhauser 2007-02-19 09:12:09 UTC
Very strange (but GOOD!), now it works when I start it by hand!

Like this, it does not start:
thinkpad nyk # rmmod ipw3945
thinkpad nyk # modprobe ipw3945
 * Starting ipw3945d ...
ipw3945d - regulatory daemon
Copyright (C) 2005-2006 Intel Corporation. All rights reserved.
version: 1.7.22
Intel PRO/Wireless 3945ABG Network Connection found at:
 /sys/bus/pci/drivers/ipw3945/0000:03:00.0
Daemon launched as pid 5366.  Exiting.                                    [ !! ]
FATAL: Error running install command for ipw3945


But like this it works:
thinkpad nyk # ipw3945d --pid-file=/var/run/ipw3945d/ipw3945d.pid
ipw3945d - regulatory daemon
Copyright (C) 2005-2006 Intel Corporation. All rights reserved.
version: 1.7.22
Intel PRO/Wireless 3945ABG Network Connection found at:
 /sys/bus/pci/drivers/ipw3945/0000:03:00.0
Daemon launched as pid 5408.  Exiting.

NO idea why it's like that. Maybe it didn't work at all before, because I ran depmod now, or is that done automatically by some gentoo instance?
And what can I do to make the daemon launched automatically by the module loaded by udev?
Comment 4 Jan Kundrát (RETIRED) gentoo-dev 2007-02-23 22:17:44 UTC
What versions of relevant packages do you use? Here's a list that works fine for me:

[ebuild   R   ] net-wireless/ipw3945d-1.7.22-r4  0 kB
[ebuild   R   ] net-wireless/ipw3945-1.2.0  USE="-debug" 0 kB
[ebuild   R   ] sys-fs/udev-104-r11  USE="(-selinux)" 0 kB
[ebuild   R   ] sys-apps/baselayout-1.12.9  USE="unicode -bootstrap -build -static" 0 kB

Please try upgrading to them and be sure to update your config files as well (the way the regulatory daemon operates has changed).
Comment 5 Nick Fankhauser 2007-02-24 04:03:43 UTC
(In reply to comment #4)

I am using exactly the same versions.
Comment 6 Jan Kundrát (RETIRED) gentoo-dev 2007-02-24 20:18:58 UTC
Er, I just noticed how you start it:

`rmmod ipw3945 && modprobe ipw3945`

This is broken. Don't ever mix rmmod/insmod with modprobe. If you `modprobe` a module, `modprobe -r` it for unload, if you `insmod` it, use `rmmod` for unload. Our modprobe configuration is set up in such a way that it starts the daemon automatically, so you shouldn't invoke it by hand. Your command attempted to launch yet another instance of the daemon which is a bad idea.

Also note that starting the module "by hand", without an init script, will break as our configuration runs it as a dedicated user.

Another problem is with hibernate-script which uses `rmmod` for module unloading. I should have reported it, mea culpa :(.

Please reopen if you have rebooted, tried to `modprobe -r ipw3045; sleep 5; modprobe ipw3945` at least five times and the regulatory daemon still doesn't work.
Comment 7 Nick Fankhauser 2007-02-25 00:54:46 UTC
(In reply to comment #6)
Thanks for explainging about modprobe -r and rmmod, I've been wondering about the difference before.
But I was using this combination just in a test.
Currently my system works like this: udev loads ipw3945, ipw3945 tried to start the daemon and fails. The init script for ipw3945d also fails in the same fashion.
But I when I start the daemon like this in /etc/conf.d/local.start:
PIDFILE=/var/run/ipw3945d/ipw3945d.pid
/sbin/ipw3945d --pid-file=$PIDFILE
then it works. I just wonder why it doesn't when using the init script. Maybe it's because it tries to run the daemon as non root user and fails on something, like permission of the lock file or so. But I don't get any error message, just the [!!] failure.
Comment 8 Jan Kundrát (RETIRED) gentoo-dev 2007-02-25 01:04:40 UTC
What does `/bin/ls -al /sbin/ipw3945d /var/run/ipw3945d /sys/bus/pci/drivers/ipw3945/00*/cmd` say?

You can also try adding "--log-file=/tmp/ipw3945d.log" to options in /etc/conf.d/ipw3945d, remove --quiet from there and attach that file. How does that config file look for you?
Comment 9 Nick Fankhauser 2007-02-25 01:47:17 UTC
(In reply to comment #8)
> What does `/bin/ls -al /sbin/ipw3945d /var/run/ipw3945d
> /sys/bus/pci/drivers/ipw3945/00*/cmd` say?

nyk@thinkpad ~ $ /bin/ls -al /sbin/ipw3945d /var/run/ipw3945d /sys/bus/pci/drivers/ipw3945/00*/cmd
-r-Sr-x--- 1 ipw3945d root 69176 Feb 18 13:14 /sbin/ipw3945d
-rw------- 1 ipw3945d root  4096 Feb 25 01:25 /sys/bus/pci/drivers/ipw3945/0000:03:00.0/cmd

/var/run/ipw3945d:
total 12
drwxr-xr-x  2 ipw3945d root 4096 Feb 25 01:25 .
drwxr-xr-x 12 root     root 4096 Feb 25 01:25 ..
-rw-------  1 ipw3945d root    4 Feb 25 01:25 ipw3945d.pid


> You can also try adding "--log-file=/tmp/ipw3945d.log" to options in
> /etc/conf.d/ipw3945d, remove --quiet from there and attach that file. How does
> that config file look for you?
It looks like this now:
ARGS="--timeout=-1 --log-file=/tmp/ipw3945d.log"

I tried to start the daemon then with /etc/init.d/ipw3945 start and it failed. The log file specified did not get created.
Comment 10 Nick Fankhauser 2007-02-25 01:49:55 UTC
I killed the ipw3945d and removed the pid file before trying to start with the init script.
Now the wireless is still working with no daemon running...
Comment 11 Doug Goldstein (RETIRED) gentoo-dev 2007-06-03 05:29:05 UTC
The init script to start ipw3945d was just flat out wrong. I just committed a fix I told to hlieberman who was working with a user that confirmed it worked.

Please re-open if re-emerging doesn't fix the issue.
Comment 12 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2007-06-03 05:31:28 UTC
I'd like to put it on the record that linux_stu helped out for an hour in debugging, doing whatever crazy ideas I thought and pastebinning countless things, even after he already had a fix in place. (running it by hand).
Comment 13 Nick Fankhauser 2007-06-04 15:32:50 UTC
(In reply to comment #11)
> The init script to start ipw3945d was just flat out wrong. I just committed a
> fix I told to hlieberman who was working with a user that confirmed it worked.
> 
> Please re-open if re-emerging doesn't fix the issue.
> 
Thanks a lot for fixing this!
So when should the updated ebuild be available? I just checked and it wasn't jet.