Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193604 - app-cdr/cdrtools: cdrecord doesn't lock drive -> hald keeps polling
Summary: app-cdr/cdrtools: cdrecord doesn't lock drive -> hald keeps polling
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Optical Media project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-24 10:40 UTC by Sebastian
Modified: 2007-09-25 07:15 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 Sebastian 2007-09-24 10:40:03 UTC
I've already submitted a bug for cdrdao regarding the same issue. I wasn't sure wheter I should put them both into one report or not. Sorry if this bothers someone.

https://bugs.gentoo.org/show_bug.cgi?id=193603

While burning with cdrecord the HAL daemon keeps polling the drive (per default every 2 seconds) to check for media changes. HAL expects burning applications to lock the device using O_EXCL.

Example: Burning with growisofs or wodim:

ps -A f|grep hald
 3110 ?        Ss     0:00 /usr/sbin/hald --use-syslog --verbose=no
 3111 ?        S      0:00  \_ hald-runner
 3119 ?        S      0:00      \_ /usr/libexec/hald-addon-acpi
 3128 ?        D      0:00      \_ hald-addon-storage: no polling because /dev/hdc is locked via O_EXCL
 3130 ?        D      0:00      \_ hald-addon-storage: polling /dev/hdd (every 2 sec)
 3132 ?        S      0:00      \_ hald-addon-storage: polling /dev/sda (every 2 sec)
22801 pts/1    S+     0:00      \_ grep --colour=auto hald

With cdrecord:

ps -A f|grep hald
 3110 ?        Ss     0:00 /usr/sbin/hald --use-syslog --verbose=no
 3111 ?        S      0:00  \_ hald-runner
 3119 ?        S      0:00      \_ /usr/libexec/hald-addon-acpi
 3128 ?        S      0:00      \_ hald-addon-storage: polling /dev/hdc (every 2 sec)
 3130 ?        S      0:00      \_ hald-addon-storage: polling /dev/hdd (every 2 sec)
 3132 ?        S      0:00      \_ hald-addon-storage: polling /dev/sda (every 2 sec)
17528 pts/1    S+     0:00      \_ grep --colour=auto hald

Reproducible: Always

Steps to Reproduce:
1. Burn a cd with cdrecord
2. run ps -A f|grep hald
3.

Actual Results:  
HAL keeps polling drive

Expected Results:  
HAL stops polling because of O_EXCL

I'm using x86, but also tried cdrtools-2.01.01_alpha35. As frontend I use k3b in KDE.

emerge  --info
Portage 2.1.3.9 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.22.6 i686)
=================================================================
System uname: 2.6.22.6 i686 AMD Sempron(tm) 2400+
Timestamp of tree: Mon, 24 Sep 2007 06:50:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -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/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/home/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="buildpkg ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo ftp://pandemonium.tiscali.de/pub/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/home/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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.informatik.rwth-aachen.de/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amr aotuv arts audiofile bluetooth bzip2 cairo caps cddb cracklib css cups curl dbus djvu dri dts dv dvdr dvdread encode exif expat fax ffmpeg fftw flac fontconfig foomaticdb fpx gd gdbm gif glitz gmp gnutls gphoto2 graphviz gs gtk hal hdri iconv ieee1394 imagemagick imlib irmc jbig jpeg jpeg2k kde kdeenablefinal kipi lcms libsamplerate logitech-mouse logrotate lzo mad midi mikmod mjpeg mmap mmx mmxext mozilla mp3 mpeg musicbrainz ncurses nls nptl nptlonly nsplugin ogg openexr opengl pango pccts pcre perl png pop ppds python qt3 readline samba sasl scanner sdl slp smtp sndfile snmp sox spell sse ssl svg tetex threads tiff timidity tordns truetype unicode usb v4l v4l2 vcd vorbis wmf x264 x86 xcomposite xml xorg xpm xprint xv xvid yv12 zlib" ALSA_CARDS="ice1712" ALSA_PCM_PLUGINS="route adpcm alaw copy dshare dsnoop extplug file hooks ladspa lfloat linear meter mulaw multi null rate share shm" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-24 10:58:42 UTC
Ditto. Any reason why is this a Gentoo issue, and not an upstream one? Plus, can you reproduce it with app-cdr/cdrkit?
Comment 2 Sebastian 2007-09-24 11:10:19 UTC
Hello Jakub,

the Linux burning situation is slightly confusing to me - I'm not a developer if that matters - that's why I reported it to Gentoo (after all it is my distro of choice ;-)).

Wrt cdrkit - as you can see in #1 I tried wodim (it's the cdrecord of cdrkit) and it works just fine (it locks the drive away from HAL, same as growisofs).

Regards
Sebastian
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-09-25 06:30:58 UTC
(In reply to comment #2)
> Wrt cdrkit - as you can see in #1 I tried wodim (it's the cdrecord of cdrkit)
> and it works just fine (it locks the drive away from HAL, same as growisofs).

Well yeah, I was asking because I couldn't reproduce it with cdrkit either. Then apparently cdrtools does something wrong. I'd suggest that you stick with cdrkit and be done with it, because cdrtools upstream is uhm... well, you'll get a better idea when you read http://cdrecord.berlios.de/old/private/cdrecord.html, http://cdrecord.berlios.de/old/private/linux-dist.html and others.

Marking this bug UPSTREAM, you should contact the author about this if you want to get it fixed in cdrtools.
Comment 4 Sebastian 2007-09-25 07:15:43 UTC
Ok, thanks!

Regards
Sebastian