Bug 187275 - unable to O_EXCL /dev/hda
Summary: unable to O_EXCL /dev/hda
Alias: None
Product: Fedora
Classification: Fedora
Component: k3b
Version: 5
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2006-03-29 18:27 UTC by Andy Burns
Modified: 2008-05-06 15:42 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2008-05-06 15:42:01 UTC

Attachments (Terms of Use)

Description Andy Burns 2006-03-29 18:27:17 UTC
Description of problem:
When starting to write a Data DVD project I get the message
:-( unable to O_EXCL /dev/hda: someone was in time to remount?

Version-Release number of selected component (if applicable):

K3b Version: 0.12.14
KDE Version: 3.5.1-2.3 Red Hat
QT Version:  3.3.5
Kernel:      2.6.16-1.2069_FC5
growisofs: 6.1
mkisofs: 2.1.1a03

How reproducible:

Steps to Reproduce:
1. create new data dvd project
2. add files
3. burn
Additional info:
The drive reads the blank media (is is seen as blank by nautilus and k3b)

TSSTcorp CD/DVDW TS-H552B TS11 (/dev/hda, ) at  [CD-R; CD-RW; CD-ROM; DVD-ROM;
Restricted Overwrite; DVD-RW Sequential; DVD+RW; DVD+R; DVD+R Double Layer;
RAW/R96R; Restricted Overwrite]

Comment 1 Andy Burns 2006-03-29 18:30:12 UTC
I thought I'd better try this as root to eliminate permission problems, when I
do that I get a different error

":-( unable to anonymously mmap 33554432: Resource temporarily unavailable"

Comment 2 Andy Burns 2006-03-29 18:43:08 UTC
By changing the k3b "manual buffer writing size" to 16MB I was able to proceed
Strange that I couldn't map 32MB though, the machine showed only 221MB/1G
physical and 0M/2G swap used.

Unfortunately I still couldn't write a disk, but I believe this might be a
hardware problem with my drive as it made lots of "graunchy" noises before the
error occured.

INFO: UTF-8 character encoding detected by locale settings.
 Assuming UTF-8 encoded filenames on source filesystem,
 use -input-charset to override.
  0.02% done, estimate finish Wed Mar 29 19:42:54 2006
  0.03% done, estimate finish Wed Mar 29 19:42:54 2006
  0.05% done, estimate finish Wed Mar 29 19:42:54 2006
  0.06% done, estimate finish Wed Mar 29 19:42:54 2006
  0.08% done, estimate finish Wed Mar 29 19:42:54 2006
  0.10% done, estimate finish Wed Mar 29 19:42:54 2006
  0.11% done, estimate finish Wed Mar 29 19:42:54 2006
  0.13% done, estimate finish Wed Mar 29 19:42:54 2006
  0.14% done, estimate finish Wed Mar 29 19:42:54 2006
  0.16% done, estimate finish Wed Mar 29 19:42:54 2006
  0.18% done, estimate finish Wed Mar 29 19:42:54 2006
  0.19% done, estimate finish Wed Mar 29 19:42:54 2006
  0.21% done, estimate finish Wed Mar 29 19:42:54 2006
  0.22% done, estimate finish Wed Mar 29 19:42:54 2006
  0.24% done, estimate finish Wed Mar 29 19:42:54 2006
  0.26% done, estimate finish Wed Mar 29 19:42:54 2006
:-? Failed to change write speed: 2770->3324
/dev/hda: "Current Write Speed" is 2.5x1385KBps.
:-( unable to WRITE@LBA=0h: Input/output error
:-( write failed: Input/output error

Comment 3 Harald Hoyer 2006-03-31 12:40:48 UTC

IMPORTANT NOTE for 6.0 users! Newer Linux kernels have ridiculously low default
memorylocked resource limit, which prevents privileged users from starting
growisofs 6.0 with "unable to anonymously mmap 33554432: Resource temporarily
unavailable" error message. Next version will naturally have workaround coded
in, but meanwhile you have to issue following command at command prompt prior
starting growisofs:

    * if you run C-like shell, issue 'limit memorylocked unlimited';
    * if you run Bourne-like shell, issue 'ulimit -l unlimited'; 

Comment 4 E Mair 2006-04-05 14:32:43 UTC
"ulimit -l unlimited" doesn't help. I still get the "unable to O_EXCL /dev/hdc"
error message when I try to burn as a regular user.

kernel 2.6.16-1.2080_FC5smp

Comment 5 Harald Hoyer 2006-04-05 15:57:13 UTC
are you sure? did you start k3b from the shell where you did ulimit?
the "unable to O_EXCL /dev/hdc" problem is another thing... maybe the disk is
mounted, maybe an open nautilus window...

Comment 6 E Mair 2006-04-06 09:56:13 UTC

In gnome-terminal, I had to su to root in order to run ulimit, then ctrl-d to
return to my normal user and run k3b from there. Burning as root has always
worked, so I wouldn't know if anything had changed after running ulimit if I
also ran k3b as root.

The disc (it's empty DVD+R media) is not mounted as far as I can see:

$ mount -l
/dev/sda2 on / type ext3 (rw) [/]
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw) [/boot1]
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /mnt/win type vfat (rw,nosuid,nodev,uid=500,gid=500)
/dev/hdb1 on /mnt/extra type ext3 (rw,noexec,nosuid,nodev)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
automount(pid2700) on /net type autofs (rw,fd=4,pgrp=2700,minproto=2,maxproto=4)

Other than showing the "blank DVD+R disc" icon on the desktop, Nautilus doesn't
seem to be involved.

Comment 7 Harald Hoyer 2006-04-06 10:13:17 UTC
ulimit -l as root and then logout does not work :) This is per shell session only :)

Comment 8 Harald Hoyer 2006-04-06 10:17:12 UTC
best to configure /etc/security/limits.conf

Comment 9 Harald Hoyer 2006-04-06 10:18:29 UTC
s.th. like:
*               hard    memlock         unlimited
*               soft    memlock         32

Comment 10 E Mair 2006-04-06 11:36:32 UTC
I edited limits.conf as you suggested (if nothing else, I learned something new
from this ordeal :)), checked that none of the "Mount removable media ..." or
"Autoplay ..." items in gnome-media-properties were ticked and rebooted just in
case, and then I was able to run "ulimit -l unlimited" as a regular user.
I verified that "ulimit -l" reported back "unlimited", and then ran k3b from the
same shell.
But I still get "unable to O_EXCL /dev/hdc".

Comment 11 Andy Burns 2006-04-06 12:49:15 UTC
(In reply to comment #10)

> But I still get "unable to O_EXCL /dev/hdc".

Just to confirm when I originally opened this bug I got the O_EXCL error when as
a non-root user, I didn't get the error as root.

Comment 12 Harald Hoyer 2006-04-06 13:57:48 UTC
Do you own /dev/hdc ??

Comment 13 E Mair 2006-04-06 14:34:49 UTC
$ ls -l /dev/hd*
brw-r----- 1 root    disk  3,  0  6 apr 15.53 /dev/hda
brw-r----- 1 root    disk  3,  1  6 apr 15.53 /dev/hda1
brw-r----- 1 root    disk  3, 64  6 apr 15.53 /dev/hdb
brw-r----- 1 root    disk  3, 65  6 apr 13.53 /dev/hdb1
brw------- 1 <myusername> disk 22,  0  6 apr 13.53 /dev/hdc

BTW, I tried to use Andy's solution and set "manual buffer writing size" in k3b
to 32 MB, but that didn't help. Same error.

Comment 15 E Mair 2006-04-19 17:39:48 UTC

Now I can burn as a regular user, but only if I run k3b from a shell where I've
issued "ulimit -l unlimited".

If I run k3b from the GNOME menu, I no longer get "unable to O_EXCL". I get this
:-( unable to anonymously mmap 33554432: Resource temporarily unavailable

Comment 16 Moritz Barsnick 2006-10-09 11:09:02 UTC
I haven't encountered problems with 6.1-2 and ulimit -l == 32.

The page quoted in comment #3 does say:
"Next version will naturally have workaround coded
in..." but all I see in the Changelog (for 6.1 or 7.2) is:

- Linux: default rlimit for locked pages is way too small [note
  that in order to allocate ring buffer larger than default 32MB
  through command line option, you have to increase memorylocked
  limit accordingly prior application start];

which sounds more like a note than a fix or workaround. Perhaps Andy Polyakov 
should comment from upstream.

Comment 17 petrosyan 2008-03-11 16:43:29 UTC
Fedora Core 5 is no longer maintained. Is this bug still present in Fedora 7 or
Fedora 8?

Comment 18 Bug Zapper 2008-04-04 02:21:30 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 19 Bug Zapper 2008-05-06 15:41:59 UTC
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.