Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 254502

Summary: net-wireless/bluez-utils-2.25-r1: udev event handler delays system boot
Product: Gentoo Linux Reporter: Ambroz Bizjak <ambrop7>
Component: [OLD] UnspecifiedAssignee: Petteri Räty (RETIRED) <betelgeuse>
Status: RESOLVED FIXED    
Severity: normal CC: crusaderky, john_r_graham, mobile+disabled, musv, pacho, pda
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 230591    
Bug Blocks:    

Description Ambroz Bizjak 2009-01-11 00:12:47 UTC
My laptop has an integrated bluetooth device which is recognized by the kernel early (since kernel 2.6.28, didn't work before). This is causing the udev event handler to run the script /lib/udev/bluetooth.sh (part of net-wireless/bluez-utils) early in boot. This script then attempts to start the bluetooth service (/etc/init.d/bluetooth), which halts, probably because it shouldn't be executed that early. This delays the whole boot by 60 seconds:

* Waiting for uevents to be processed...
devadm settle timeout of 60 seconds reached, the event queue contains:
  '/sys/devices/pci0000:00/0000:00:1d.1/usb6/6-2/6-2:1.0/bluetooth/hci0'

The bluetooth script shouldn't be naively starting the bluetooth service, as bluetooth events can happen that early. Instead it should somehow schedule the service for starting later.

Reproducible: Always

Steps to Reproduce:
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2009-01-13 20:25:36 UTC
you are missing emerge --info. If your baselayout/openrc is new enough it should just schedule it for start later.
Comment 2 Ambroz Bizjak 2009-01-16 20:11:30 UTC
emerge --info:

Portage 2.2_rc21 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.6.1-r0, 2.6.28-gentoo i686)                                                                                  
=================================================================                         
System uname: Linux-2.6.28-gentoo-i686-Intel-R-_Core-TM-2_Duo_CPU_T7250_@_2.00GHz-with-glibc2.0                                                                                     
Timestamp of tree: Wed, 14 Jan 2009 01:45:02 +0000                                        
distcc 3.0 i686-pc-linux-gnu [disabled]                                                   
app-shells/bash:     3.2_p39                                                              
dev-java/java-config: 1.3.7-r1, 2.1.6-r1                                                  
dev-lang/python:     2.5.2-r7                                                             
dev-util/cmake:      2.6.2-r1                                                             
sys-apps/baselayout: 2.0.0                                                                
sys-apps/openrc:     0.4.1-r1                                                             
sys-apps/sandbox:    1.2.18.1-r2                                                          
sys-devel/autoconf:  2.13, 2.63                                                           
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                            
sys-devel/binutils:  2.18-r3                                                              
sys-devel/gcc-config: 1.4.0-r4                                                            
sys-devel/libtool:   1.5.26                                                               
virtual/os-headers:  2.6.27-r2                                                            
ACCEPT_KEYWORDS="x86"                                                                     
CBUILD="i686-pc-linux-gnu"                                                                
CFLAGS="-O2 -march=nocona -pipe"                                                          
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/config"                                                                            
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"                                                                                      
CXXFLAGS="-O2 -march=nocona -pipe"                                                        
DISTDIR="/usr/portage/distfiles"                                                          
FEATURES="ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                 
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"                                                                               
LC_ALL="en_US.UTF-8"                                                                      
LDFLAGS="-Wl,-O1"                                                                         
LINGUAS="en"                                                                              
MAKEOPTS="-j3"                                                                            
PKGDIR="/usr/portage/packages"                                                            
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                                                
PORTAGE_TMPDIR="/var/tmp"                                                                 
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/ambro /usr/portage/local/layman/nouveau"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amr amrnb amrwb asf berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt css cups dbus dri dvb dvd dvdr dvdread emboss encode evo fam ffmpeg firefox fortran gdbm geoip gif gpm gtk hal iconv ipv6 irda isdnlog jack joystick jpeg kde laptop ldap libnotify live lm_sensors mad matroska midi mikmod mmx mmxext mp3 mpeg mudflap ncurses networkmanager nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcre pdf pmu png ppds pppd python qt3 qt3support qt4 quicktime rdesktop readline reflection samba scanner sdl session snmp spell spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd theora tiff truetype unicode usb v4l v4l2 vcd visualization vorbis win32codecs x264 x86 xcomposite xine xml xorg xscreensaver xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"LINGUAS="en" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Sven Müller 2009-01-25 17:01:14 UTC
Same here, but in my case it's a pci wlan card. 

It occured after a complete new ~amd64 install. 
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2009-02-22 21:26:37 UTC
I would guess this is fixed in in 3* that is supposed to go stable soon
Comment 5 crusaderky 2009-02-23 14:50:13 UTC
Confirmed here on amd64.

udev-124-r1
bluez-utils-2.25-r1
bluez-libs-2.25-r1
   WORKS

udev-133
bluez-utils-2.25-r1
bluez-libs-2.25-r1
   TIMEOUTS

udev-135-r4
bluez-utils-2.25-r1
bluez-libs-2.25-r1
   TIMEOUTS

udev-133
bluez-utils-3.36
bluez-libs-3.36
   WORKS

<bluez-utils-3* and <bluez-libs-3* really should require <udev-133 (or maybe <udev-130?)


# emerge --info
Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7300_@_2.00GHz-with-glibc2.2.5
Timestamp of tree: Mon, 23 Feb 2009 01:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.8
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="it_IT.UTF8"
LC_ALL="it_IT.UTF8"
LDFLAGS="-Wl,-O1"
LINGUAS="it"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cddb cdparanoia cdr cjk cli cracklib crypt cups curl dbus dga dri dts dv dvb dvd dvdr dvdread eds emboss encode esd evo exif fam ffmpeg firefox flac fontconfig fortran ftp gdbm gif gimp gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kerberos ldap libnotify lzo mad midi mikmod mmx mp3 mpeg mtp mudflap multilib musepack mysql ncurses nls nptl nptlonly ogg openal opengl openmp pam pcre pdf perl php png ppds pppd python qt3support quicktime raw readline reflection samba sdl session smp speex spell spl sqlite sse sse2 ssl ssse3 startup-notification svg sysfs tcl tcpd threads tiff tk truetype unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 6 Sven Müller 2009-02-25 20:23:22 UTC
For my case I found the solution. Make sure udev is runlevel sysinit and not in boot or default. 
Comment 7 Pacho Ramos gentoo-dev 2009-09-09 17:38:13 UTC
bluez-utils-3* went to stable some time ago, Can this be closed then?
Comment 8 Pacho Ramos gentoo-dev 2010-02-01 20:54:44 UTC
Fixed in current stable (bluez-2 should be dropped soon also :-/ )