Bug 857597 - cdio_eject_media and cdio_eject_media_drive broken in libcdio 0.83-5.fc17
Summary: cdio_eject_media and cdio_eject_media_drive broken in libcdio 0.83-5.fc17
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libcdio
Version: 17
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Adrian Reber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-15 04:00 UTC by David Stockwell
Modified: 2013-01-25 13:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-25 13:29:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Stockwell 2012-09-15 04:00:24 UTC
Description of problem:
On two different machines (i586 and x64, both Fed17), two different cd drives eject media rarely works.

When executing eject media (either call), following is displayed to console:

++ WARN: Problems resolving device rootfs: No such file or directory

++ WARN: Problems resolving device proc: No such file or directory

++ WARN: Problems resolving device sysfs: No such file or directory

++ WARN: Problems resolving device devtmpfs: No such file or directory

++ WARN: Problems resolving device devpts: No such file or directory

++ WARN: Problems resolving device tmpfs: No such file or directory

++ WARN: Problems resolving device tmpfs: No such file or directory

++ WARN: Problems resolving device securityfs: No such file or directory

++ WARN: Problems resolving device selinuxfs: No such file or directory

++ WARN: Problems resolving device tmpfs: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device cgroup: No such file or directory

++ WARN: Problems resolving device systemd-1: No such file or directory

++ WARN: Problems resolving device mqueue: No such file or directory

++ WARN: Problems resolving device hugetlbfs: No such file or directory

++ WARN: Problems resolving device tmpfs: No such file or directory

++ WARN: Problems resolving device debugfs: No such file or directory

++ WARN: Problems resolving device configfs: No such file or directory

++ WARN: Problems resolving device sunrpc: No such file or directory

++ WARN: Problems resolving device sunrpc: No such file or directory

++ WARN: Problems resolving device fusectl: No such file or directory

++ WARN: Problems resolving device gvfs-fuse-daemon: No such file or directory

Running Fed17 with KDE environment.  Program running with gdb under Anjuta IDE.

Same warnings when running in runlevel 3 in console.

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


How reproducible:
	CdIo_t * pCdio=NULL;

	if (!cdio_init()) {
		return EXIT_FAILURE;
	}

	pCdio = cdio_open_cd(NULL);
	if (pCdio==NULL) {
		return EXIT_FAILURE;
	}

	if (cdio_get_media_changed(pCdio)) {
		driver_return_code_t ret = cdio_eject_media(&pCdio);
/* fails with DRIVER_IO_ERROR */
	}


Steps to Reproduce:
1.
2.
3.
  
Actual results:
IO error, CD does not eject.

Expected results:
no error, CD ejects.

Additional info:

Comment 1 David Stockwell 2012-09-15 21:12:01 UTC
Tried again after rebuilding libcdio from source with same results (Driver I/O Error), with the same ++ WARN messages.

Also tried in GNOME (painful) with same errors and same messages.

Then tried in Runlevel 1:Using cdio-eject (in the package) ejected every time without problem, but WITH the ++ WARN messages still displayed.

Suspect the basic problem is with whatever service/daemon monitors the CD drive for media, keeping control of the drive and preventing eject.  My app can still access the drive to do what it needs to, except trigger the eject.

However, the ++ WARN messages still need to be addressed (udev?).

Comment 2 Adrian Reber 2012-09-16 08:08:20 UTC
Thanks for the report. You are right concerning ejecting. I have seen many applications fail to eject CDs just like you described it. Something prevents ejecting CDs.

Concerning the "++ WARN" messages... I will have a look getting it resolved.

Comment 3 David Stockwell 2012-09-19 00:20:59 UTC
Thanks Adrian.

FWIW, the problem may be with udisks owning the CD drive preventing the eject.

My current eject process attempts the cdio_eject_media_drive, and if/when it fails, sends a "udisk --eject <drive>" message (via fork/execv).  Sort of a nasty hack, but works every time.

Comment 4 Adrian Reber 2013-01-25 13:29:53 UTC
The warning messages should be gone. At least with 0.90 which is in the development branch. Closing this bugreport as fixed in RAWHIDE.

The eject problem is not fixed and probably not fixable in libcdio (unless using your hack).


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