Bug 857597 - cdio_eject_media and cdio_eject_media_drive broken in libcdio 0.83-5.fc17
cdio_eject_media and cdio_eject_media_drive broken in libcdio 0.83-5.fc17
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: libcdio (Show other bugs)
17
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Adrian Reber
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-15 00:00 EDT by David Stockwell
Modified: 2013-01-25 08:29 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-25 08:29:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Stockwell 2012-09-15 00:00:24 EDT
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 17:12:01 EDT
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 04:08:20 EDT
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-18 20:20:59 EDT
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 08:29:53 EST
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.