Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140067 - ipw3945 daemon is braindead
Summary: ipw3945 daemon is braindead
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Christian Heim (RETIRED)
URL: http://bughost.org/bugzilla/show_bug....
Whiteboard: watch-ipw-bugzilla
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-11 20:04 UTC by SpanKY
Modified: 2006-08-20 14:26 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2006-07-11 20:04:04 UTC
if you reboot the machine, often times the ipw3945 daemon leaves behind its pid in /var/run/ ... then when you try to load the module next time at boot, it'll fail to load properly because the stupid daemon merely checks the existence of the pid file and if it is left laying around, it'll abort loading -> no working wifi

$ qlist -I -v ipw
net-wireless/ipw3945-1.0.5
net-wireless/ipw3945-ucode-1.13
net-wireless/ipw3945d-1.7.18


Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17.4 i686)
=================================================================
System uname: 2.6.17.4 i686 Genuine Intel(R) CPU           T2300  @ 1.66GHz
Gentoo Base System version 1.6.15
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1, 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -Wimplicit-function-declaration"
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 /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,-z,relro"
MAKEOPTS="-j6"
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://gentoo/gentoo-portage"
USE="x86 X a52 aac aalib acl alsa apache2 apm arts asf audiofile avi berkdb bitmap-fonts bzip2 cairo cdparanoia cdr cli crypt css cups curl cvs directfb dlloader doc dri dts dv dvb dvd dvdr eds emboss encode exif fbcon ffmpeg flac fontconfig foomaticdb fortran fpx gcj gd gdbm gif glitz glut gmp gphoto2 gpm gs gstreamer gtk gtk2 idea ieee1394 imagemagick imlib ipv6 isdnlog javascript jbig joystick jpeg jpeg2k kde lcms libcaca libg++ libwww lzo mad mikmod ming mjpeg mmx mmxext mng modplug motif mp3 mp4 mpeg multislot mysql ncurses nls nptl nsplugin nvidia ogg openal openexr opengl pcre pdf pdflib perl php png pppd python qt qt3 qt4 quicktime readline real reflection samba sdl session skey slp sndfile snmp speex spell spl sse sse2 ssl subversion svg sysfs tcltk tcpd tga theora tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd vdr vidix vorbis wifi win32codecs wma wmf x264 xanim xcomposite xfs xine xinerama xinetd xml xmms xorg xpm xprint xrandr xscreensaver xv xvid xvmc zip zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_nvidia video_cards_nv video_cards_vga video_cards_sisusb"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Christian Heim (RETIRED) gentoo-dev 2006-07-13 12:19:22 UTC
vapier, could you please verify if the new version (1.7.22) is also having this issue ?! kthnx.
Comment 2 SpanKY gentoo-dev 2006-07-19 11:28:52 UTC
sorry, but that version is braindead as well

root@vapier-m 0 ~ # qlist -I -v ipw3945d
net-wireless/ipw3945d-1.7.22
root@vapier-m 0 ~ # rm -f /var/run/ipw3945d.pid
root@vapier-m 0 ~ # modprobe ipw3945
root@vapier-m 0 ~ # killall ipw3945d
root@vapier-m 0 ~ # rmmod ipw3945
root@vapier-m 0 ~ # modprobe ipw3945
2006-07-19 14:28:21: ERROR: ipw3945d already running.  If ipw3945d is not running then you
need to remove '/var/run/ipw3945d.pid' and try again.
FATAL: Error running install command for ipw3945
Comment 3 Andrew D. Keyser (aka Legoguy) 2006-07-22 19:40:10 UTC
try
modprobe -r ipw3945
instead of rmmod... reason being rmmod doesn't use modprobe.conf / modprobe.d (and therefore doesn't pay attention to the "remove [...]" line) and so it never kills the previous daemon... I believe the ipw3945 manual says something about this...
Comment 4 SpanKY gentoo-dev 2006-07-30 12:57:05 UTC
my example was just a way to reproduce the bug, there are many other valid ways to get to that state

for example, to simulate a hard lockup, try:
rm -f /var/run/ipw3945d.pid
modprobe ipw3945
reboot -nf
Comment 5 srrijkers 2006-08-02 13:31:46 UTC
The problem here, I think, is that ipw3945d gets started (or is supposed to get started at least, see the other bugs concerning this :)) when the module is loaded. Because of this, it gets loaded before /var/run is cleaned at boot.
Considering the fact that ipw3945d never gets formally stopped at shutdown (this only happens if the module is unloaded), it will leave behind its pid, which won't be removed in time for it to start again.
Comment 6 Ryan Neufeld 2006-08-13 18:38:47 UTC
https://forums.gentoo.org/viewtopic-p-3351901.html#3351901

A somewhat useful solution
Comment 7 SpanKY gentoo-dev 2006-08-19 07:59:50 UTC
no, that is merely a workaround

the real fix is to make the daemon itself not suck
Comment 8 Christian Heim (RETIRED) gentoo-dev 2006-08-19 15:17:33 UTC
OK, I just reported it UPSTREAM. See http://bughost.org/bugzilla/show_bug.cgi?id=1119