Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488264 - sys-apps/util-linux-2.22.2 - Eject command fails
Summary: sys-apps/util-linux-2.22.2 - Eject command fails
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-16 17:21 UTC by Bruce Hill
Modified: 2015-05-05 00:05 UTC (History)
0 users

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 Bruce Hill 2013-10-16 17:21:31 UTC
workstation ~ # eject
workstation ~ # eject -v /dev/sr0
eject: device name is `/dev/sr0'
eject: /dev/sr0: not mounted
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: is removable device
eject: /dev/sr0: trying to eject using CD-ROM eject command
eject: CD-ROM eject command failed
eject: /dev/sr0: trying to eject using SCSI commands
eject: SCSI eject succeeded
workstation ~ # eject -Fv /dev/sr0
eject: device name is `/dev/sr0'
eject: /dev/sr0: not mounted
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: trying to eject using CD-ROM eject command
eject: CD-ROM eject command failed
eject: /dev/sr0: trying to eject using SCSI commands
eject: SCSI eject succeeded
workstation ~ # eject -T /dev/sr0
eject: CD-ROM eject command failed: Input/output error
workstation ~ # eject -t /dev/sr0
workstation ~ # eject -tv /dev/sr0
eject: device name is `/dev/sr0'
eject: /dev/sr0: not mounted
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: is removable device
eject: /dev/sr0: closing tray
workstation ~ # logout
mingdao@workstation ~ $ eject
mingdao@workstation ~ $ eject -v /dev/sr0
eject: device name is `/dev/sr0'
eject: /dev/sr0: not mounted
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: is removable device
eject: /dev/sr0: trying to eject using CD-ROM eject command
eject: CD-ROM eject command failed
eject: /dev/sr0: trying to eject using SCSI commands
eject: SCSI eject succeeded
mingdao@workstation ~ $ eject -Fv /dev/sr0
eject: device name is `/dev/sr0'
eject: /dev/sr0: not mounted
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: trying to eject using CD-ROM eject command
eject: CD-ROM eject command failed
eject: /dev/sr0: trying to eject using SCSI commands
eject: SCSI eject succeeded
mingdao@workstation ~ $ eject -T /dev/sr0
eject: CD-ROM eject command failed: Input/output error
mingdao@workstation ~ $ eject -t /dev/sr0
mingdao@workstation ~ $



The eject command does not open the tray.

Never had this problem with sys-block/eject but now since sys-apps/util-linux replaced it, there have been problems. Never made a bug report until now.
Comment 1 Bruce Hill 2013-10-16 17:30:45 UTC
After opening the tray manually by pressing the button, it now works.

mingdao@workstation ~ $ eject -v /dev/sr0
eject: device name is `/dev/sr0'
eject: /dev/sr0: not mounted
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: is removable device
eject: /dev/sr0: trying to eject using CD-ROM eject command
eject: CD-ROM eject command succeeded

But why not before? How to debug? There is nothing in dmesg or /var/log/messages at all.
Comment 2 Tony Vroon (RETIRED) gentoo-dev 2013-10-30 09:51:47 UTC
There will never be kernel logs for this I'm afraid. It's simply sending a set of commands and it is up to the drive to respond.

What is possible is that separate eject sent the commands in a different order, or that it defaulted to a different style of command that the drive "liked better".

In order to know what is going on, it would help to compare the output of "eject -v" on the old, separate eject and the util-linux eject. Do you have that data please?
Comment 3 Bruce Hill 2013-10-30 13:14:25 UTC
How to get sys-block/eject now?

workstation ~ # emerge -ajv sys-block/eject

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-block/eject-2.1.5-r2  USE="nls" 0 kB
[blocks B      ] sys-block/eject ("sys-block/eject" is blocking sys-apps/util-linux-2.22.2)

Total: 1 package (1 new), Size of downloads: 0 kB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (sys-block/eject-2.1.5-r2::gentoo, ebuild scheduled for merge) pulled in by
    sys-block/eject

  (sys-apps/util-linux-2.22.2::gentoo, installed) pulled in by
    >=sys-apps/util-linux-2.16 required by (sys-fs/e2fsprogs-1.42.7::gentoo, installed)
    sys-apps/util-linux required by (app-i18n/pyzy-0.1.0::gentoo, installed)
    >=sys-apps/util-linux-2.16.0 required by (app-emulation/qemu-9999::gentoo, installed)
    >=sys-apps/util-linux-2.20.1-r2 required by (sys-fs/udisks-2.1.0::gentoo, installed)
    >=sys-apps/util-linux-2.20 required by (sys-fs/udev-204::gentoo, installed)
    >=sys-apps/util-linux-2.16 required by (sys-fs/lvm2-2.02.97-r1::gentoo, installed)
    sys-apps/util-linux required by (sys-apps/gptfdisk-0.8.6::gentoo, installed)
    >=sys-apps/util-linux-2.16 required by (x11-libs/libSM-1.2.2::gentoo, installed)
    >=sys-apps/util-linux-2.19 required by (dev-libs/rasqal-0.9.29::gentoo, installed)
    >=sys-apps/util-linux-2.22 required by (virtual/eject-0::gentoo, installed)
    sys-apps/util-linux required by @system
    >=sys-apps/util-linux-2.17.2 required by (sys-fs/xfsprogs-3.1.10::gentoo, installed)
    >=sys-apps/util-linux-2.16 required by (dev-libs/apr-1.4.8-r1::gentoo, installed)
    >=sys-apps/util-linux-2.16 required by (sys-fs/mdadm-3.2.6-r1::gentoo, installed)


For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked


!!! The following installed packages are masked:
- net-analyzer/mtr-0.82::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

workstation ~ #


I don't know if I have any logs that old. Also, I don't understand ("sys-block/eject" is blocking sys-apps/util-linux-2.22.2) ... seems the other way around.
Comment 4 SpanKY gentoo-dev 2013-11-29 14:08:41 UTC
(In reply to Bruce Hill from comment #3)

you don't.  the sys-block/eject package is integrated into util-linux now.

to debug, you could try running it through strace and see what commands it is sending to the device.
Comment 5 Bruce Hill 2013-12-06 21:22:31 UTC
(In reply to SpanKY from comment #4)
> (In reply to Bruce Hill from comment #3)
> 
> you don't.  the sys-block/eject package is integrated into util-linux now.
> 
> to debug, you could try running it through strace and see what commands it
> is sending to the device.

Pardon me for not even reading this output. Emergency came up here and here's the output anyway:

workstation ~ # strace eject -v /dev/sr0
execve("/usr/bin/eject", ["eject", "-v", "/dev/sr0"], [/* 38 vars */]) = 0
brk(0)                                  = 0x849000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edba3000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=144985, ...}) = 0
mmap(NULL, 144985, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f75edb7f000
close(3)                                = 0
open("/lib64/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\250\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=234440, ...}) = 0
mmap(NULL, 2333840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f75ed749000
mprotect(0x7f75ed780000, 2097152, PROT_NONE) = 0
mmap(0x7f75ed980000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x37000) = 0x7f75ed980000
mmap(0x7f75ed982000, 3216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f75ed982000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0K\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1736952, ...}) = 0
mmap(NULL, 3849376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f75ed39d000
mprotect(0x7f75ed53f000, 2097152, PROT_NONE) = 0
mmap(0x7f75ed73f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a2000) = 0x7f75ed73f000
mmap(0x7f75ed745000, 15520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f75ed745000
close(3)                                = 0
open("/lib64/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\207\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=213576, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edb7e000
mmap(NULL, 2313016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f75ed168000
mprotect(0x7f75ed198000, 2097152, PROT_NONE) = 0
mmap(0x7f75ed398000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x30000) = 0x7f75ed398000
mmap(0x7f75ed39c000, 2872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f75ed39c000
close(3)                                = 0
open("/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\26\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18728, ...}) = 0
mmap(NULL, 2113904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f75ecf63000
mprotect(0x7f75ecf67000, 2093056, PROT_NONE) = 0
mmap(0x7f75ed166000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f75ed166000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edb7d000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edb7b000
arch_prctl(ARCH_SET_FS, 0x7f75edb7b780) = 0
mprotect(0x7f75ed73f000, 16384, PROT_READ) = 0
mprotect(0x7f75ed166000, 4096, PROT_READ) = 0
mprotect(0x7f75ed398000, 12288, PROT_READ) = 0
mprotect(0x7f75ed980000, 4096, PROT_READ) = 0
mprotect(0x608000, 4096, PROT_READ)     = 0
mprotect(0x7f75edba4000, 4096, PROT_READ) = 0
munmap(0x7f75edb7f000, 144985)          = 0
brk(0)                                  = 0x849000
brk(0x86a000)                           = 0x86a000
open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1607632, ...}) = 0
mmap(NULL, 1607632, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f75ed9f2000
close(3)                                = 0
access("/dev/sr0", F_OK)                = 0
readlink("/dev", 0x7fffe4da4410, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev/sr0", 0x7fffe4da4410, 4096) = -1 EINVAL (Invalid argument)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
fstat(3, {st_mode=S_IFREG|0644, st_size=2502, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edba2000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2502
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f75edba2000, 4096)            = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 6), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edba2000
write(1, "eject: device name is `/dev/sr0'"..., 33eject: device name is `/dev/sr0'
) = 33
getuid()                                = 0
geteuid()                               = 0
getgid()                                = 0
getegid()                               = 0
prctl(PR_GET_DUMPABLE)                  = 1
lstat("/etc/mtab", {st_mode=S_IFREG|0644, st_size=905, ...}) = 0
open("/etc/mtab", O_RDONLY)             = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=905, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edba1000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 4096) = 905
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f75edba1000, 4096)            = 0
readlink("/dev", 0x7fffe4da4350, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev/sr0", 0x7fffe4da4350, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0x7fffe4da4350, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev/md1", 0x7fffe4da4350, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0x7fffe4da4350, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev/sda1", 0x7fffe4da4350, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0x7fffe4da4350, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev/root", "md0", 4096)      = 3
readlink("/dev/md0", 0x7fffe4da4350, 4096) = -1 EINVAL (Invalid argument)
readlink("/proc", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/proc/sys", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/proc/sys/fs", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/proc/sys/fs/binfmt_misc", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/var", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/var/tmp", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/var/tmp/portage", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/home", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/boot", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/sys/fs", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys/fs/fuse", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys/fs/fuse/connections", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/sys/kernel", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys/kernel/config", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/sys/kernel", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys/kernel/debug", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/sys", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev/shm", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev/pts", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/run", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
readlink("/proc", 0x7fffe4da43a0, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0x7fffe4da43a0, 4096)  = -1 EINVAL (Invalid argument)
write(1, "eject: /dev/sr0: not mounted\n", 29eject: /dev/sr0: not mounted
) = 29
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/sys/dev/block/11:0", O_RDONLY)   = 3
newfstatat(3, "partition", 0x7fffe4da53b0, 0) = -1 ENOENT (No such file or directory)
openat(3, "dm/uuid", O_RDONLY)          = -1 ENOENT (No such file or directory)
readlink("/sys/dev/block/11:0", "../../devices/pci0000:00/0000:00"..., 127) = 78
close(3)                                = 0
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
write(1, "eject: /dev/sr0: is whole-disk d"..., 38eject: /dev/sr0: is whole-disk device
) = 38
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/sys/dev/block/11:0", O_RDONLY)   = 3
openat(3, "removable", O_RDONLY)        = 4
fcntl(4, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f75edba1000
lseek(4, 0, SEEK_CUR)                   = 0
read(4, "1\n", 4096)                    = 2
close(4)                                = 0
munmap(0x7f75edba1000, 4096)            = 0
write(1, "eject: /dev/sr0: is removable de"..., 37eject: /dev/sr0: is removable device
) = 37
close(3)                                = 0
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/sys/dev/block/11:0", O_RDONLY)   = 3
dup(3)                                  = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl(4, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
lseek(4, 0, SEEK_SET)                   = 0
getdents(4, /* 23 entries */, 32768)    = 704
getdents(4, /* 0 entries */, 32768)     = 0
close(4)                                = 0
close(3)                                = 0
open("/dev/sr0", O_RDWR|O_NONBLOCK)     = 3
write(1, "eject: /dev/sr0: trying to eject"..., 60eject: /dev/sr0: trying to eject using CD-ROM eject command
) = 60
ioctl(3, CDROMEJECT, 0x7f75ed745800)    = -1 EIO (Input/output error)
write(1, "eject: CD-ROM eject command fail"..., 35eject: CD-ROM eject command failed
) = 35
write(1, "eject: /dev/sr0: trying to eject"..., 53eject: /dev/sr0: trying to eject using SCSI commands
) = 53
ioctl(3, SG_GET_VERSION_NUM, 0x7fffe4da661c) = 0
ioctl(3, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[1e, 00, 00, 00, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=10000, flags=0, status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=1, info=0}) = 0
ioctl(3, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[1b, 00, 00, 00, 01, 00], mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=10000, flags=0, status=02, masked_status=01, sb[18]=[70, 00, 02, 00, 00, 00, 00, 0a, 00, 00, 00, 00, 3a, 01, 00, 00, 00, 00], host_status=0, driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
ioctl(3, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[1b, 00, 00, 00, 02, 00], mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=10000, flags=0, status=02, masked_status=01, sb[18]=[70, 00, 02, 00, 00, 00, 00, 0a, 00, 00, 00, 00, 53, 02, 00, 00, 00, 00], host_status=0, driver_status=0x8, resid=0, duration=1, info=0x1}) = 0
ioctl(3, BLKRRPART, 0x7fffe4da6540)     = -1 EINVAL (Invalid argument)
write(1, "eject: SCSI eject succeeded\n", 28eject: SCSI eject succeeded
) = 28
close(3)                                = 0
close(1)                                = 0
munmap(0x7f75edba2000, 4096)            = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
Comment 6 SpanKY gentoo-dev 2013-12-07 09:10:17 UTC
you can manually build the old eject by doing:
$ cd /usr/portage/sys-block/eject/
$ ebuild eject-2.1.5-r2.ebuild compile
$ strace /var/tmp/portage/sys-block/eject-2.1.5-r2/work/eject/eject /dev/sr0

that'll be a good way to compare what the old one did vs the new one
Comment 7 SpanKY gentoo-dev 2015-05-04 03:19:34 UTC
(In reply to SpanKY from comment #6)

please try building the old eject and tracing it to get a working log
Comment 8 Bruce Hill 2015-05-05 00:05:38 UTC
(In reply to SpanKY from comment #7)
> (In reply to SpanKY from comment #6)
> 
> please try building the old eject and tracing it to get a working log

SpanKY,

I'm too busy atm to help at all, but I have done what you asked. Let me know next steps.

workstation eject # strace /var/tmp/portage/sys-block/eject-2.1.5-r2/work/eject/eject /dev/sr0
execve("/var/tmp/portage/sys-block/eject-2.1.5-r2/work/eject/eject", ["/var/tmp/portage/sys-block/eject"..., "/dev/sr0"], [/* 40 vars */]) = 0
brk(0)                                  = 0x1e36000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fef9d9e9000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=184066, ...}) = 0
mmap(NULL, 184066, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fef9d9bc000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1680880, ...}) = 0
mmap(NULL, 3787160, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fef9d42c000
mprotect(0x7fef9d5bf000, 2097152, PROT_NONE) = 0
mmap(0x7fef9d7bf000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x193000) = 0x7fef9d7bf000
mmap(0x7fef9d7c5000, 14744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fef9d7c5000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fef9d9bb000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fef9d9ba000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fef9d9b9000
arch_prctl(ARCH_SET_FS, 0x7fef9d9ba700) = 0
mprotect(0x7fef9d7bf000, 16384, PROT_READ) = 0
mprotect(0x605000, 4096, PROT_READ)     = 0
mprotect(0x7fef9d9ea000, 4096, PROT_READ) = 0
munmap(0x7fef9d9bc000, 184066)          = 0
brk(0)                                  = 0x1e36000
brk(0x1e57000)                          = 0x1e57000
open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1607712, ...}) = 0
mmap(NULL, 1607712, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fef9d830000
close(3)                                = 0
access("/dev/sr0", F_OK)                = 0
readlink("/dev/sr0", 0x7fff55921d90, 4095) = -1 EINVAL (Invalid argument)
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/etc/mtab", O_RDONLY)             = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=956, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fef9d9e8000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 4096) = 956
stat("rootfs", 0x7fff559250c0)          = -1 ENOENT (No such file or directory)
stat("/dev/root", {st_mode=S_IFBLK|0660, st_rdev=makedev(9, 0), ...}) = 0
stat("devtmpfs", 0x7fff559250c0)        = -1 ENOENT (No such file or directory)
stat("proc", 0x7fff559250c0)            = -1 ENOENT (No such file or directory)
stat("tmpfs", 0x7fff559250c0)           = -1 ENOENT (No such file or directory)
stat("devpts", 0x7fff559250c0)          = -1 ENOENT (No such file or directory)
stat("tmpfs", 0x7fff559250c0)           = -1 ENOENT (No such file or directory)
stat("sysfs", 0x7fff559250c0)           = -1 ENOENT (No such file or directory)
stat("debugfs", 0x7fff559250c0)         = -1 ENOENT (No such file or directory)
stat("configfs", 0x7fff559250c0)        = -1 ENOENT (No such file or directory)
stat("fusectl", 0x7fff559250c0)         = -1 ENOENT (No such file or directory)
stat("/dev/sda1", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
stat("/dev/md1", {st_mode=S_IFBLK|0660, st_rdev=makedev(9, 1), ...}) = 0
stat("tmpfs", 0x7fff559250c0)           = -1 ENOENT (No such file or directory)
stat("binfmt_misc", 0x7fff559250c0)     = -1 ENOENT (No such file or directory)
stat("rpc_pipefs", 0x7fff559250c0)      = -1 ENOENT (No such file or directory)
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7fef9d9e8000, 4096)            = 0
open("/etc/fstab", O_RDONLY)            = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3424, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fef9d9e8000
read(3, "# <fs>\t\t<mountpoint>\t\t<type>\t\t<o"..., 4096) = 3424
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7fef9d9e8000, 4096)            = 0
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26244, ...}) = 0
mmap(NULL, 26244, PROT_READ, MAP_SHARED, 3, 0) = 0x7fef9d9e2000
close(3)                                = 0
open("/dev/sr0", O_RDWR|O_NONBLOCK)     = 3
ioctl(3, CDROMEJECT, 0)                 = 0
close(3)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++

workstation eject # strace /var/tmp/portage/sys-block/eject-2.1.5-r2/work/eject/eject -T /dev/sr0
execve("/var/tmp/portage/sys-block/eject-2.1.5-r2/work/eject/eject", ["/var/tmp/portage/sys-block/eject"..., "-T", "/dev/sr0"], [/* 40 vars */]) = 0
brk(0)                                  = 0x1cfd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9c44cbb000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=184066, ...}) = 0
mmap(NULL, 184066, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9c44c8e000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1680880, ...}) = 0
mmap(NULL, 3787160, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9c446fe000
mprotect(0x7f9c44891000, 2097152, PROT_NONE) = 0
mmap(0x7f9c44a91000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x193000) = 0x7f9c44a91000
mmap(0x7f9c44a97000, 14744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9c44a97000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9c44c8d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9c44c8c000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9c44c8b000
arch_prctl(ARCH_SET_FS, 0x7f9c44c8c700) = 0
mprotect(0x7f9c44a91000, 16384, PROT_READ) = 0
mprotect(0x605000, 4096, PROT_READ)     = 0
mprotect(0x7f9c44cbc000, 4096, PROT_READ) = 0
munmap(0x7f9c44c8e000, 184066)          = 0
brk(0)                                  = 0x1cfd000
brk(0x1d1e000)                          = 0x1d1e000
open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1607712, ...}) = 0
mmap(NULL, 1607712, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9c44b02000
close(3)                                = 0
access("/dev/sr0", F_OK)                = 0
readlink("/dev/sr0", 0x7fffea3f9540, 4095) = -1 EINVAL (Invalid argument)
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/etc/mtab", O_RDONLY)             = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=956, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9c44cba000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 4096) = 956
stat("rootfs", 0x7fffea3fc870)          = -1 ENOENT (No such file or directory)
stat("/dev/root", {st_mode=S_IFBLK|0660, st_rdev=makedev(9, 0), ...}) = 0
stat("devtmpfs", 0x7fffea3fc870)        = -1 ENOENT (No such file or directory)
stat("proc", 0x7fffea3fc870)            = -1 ENOENT (No such file or directory)
stat("tmpfs", 0x7fffea3fc870)           = -1 ENOENT (No such file or directory)
stat("devpts", 0x7fffea3fc870)          = -1 ENOENT (No such file or directory)
stat("tmpfs", 0x7fffea3fc870)           = -1 ENOENT (No such file or directory)
stat("sysfs", 0x7fffea3fc870)           = -1 ENOENT (No such file or directory)
stat("debugfs", 0x7fffea3fc870)         = -1 ENOENT (No such file or directory)
stat("configfs", 0x7fffea3fc870)        = -1 ENOENT (No such file or directory)
stat("fusectl", 0x7fffea3fc870)         = -1 ENOENT (No such file or directory)
stat("/dev/sda1", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
stat("/dev/md1", {st_mode=S_IFBLK|0660, st_rdev=makedev(9, 1), ...}) = 0
stat("tmpfs", 0x7fffea3fc870)           = -1 ENOENT (No such file or directory)
stat("binfmt_misc", 0x7fffea3fc870)     = -1 ENOENT (No such file or directory)
stat("rpc_pipefs", 0x7fffea3fc870)      = -1 ENOENT (No such file or directory)
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f9c44cba000, 4096)            = 0
open("/etc/fstab", O_RDONLY)            = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3424, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9c44cba000
read(3, "# <fs>\t\t<mountpoint>\t\t<type>\t\t<o"..., 4096) = 3424
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f9c44cba000, 4096)            = 0
stat("/dev/sr0", {st_mode=S_IFBLK|0660, st_rdev=makedev(11, 0), ...}) = 0
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26244, ...}) = 0
mmap(NULL, 26244, PROT_READ, MAP_SHARED, 3, 0) = 0x7f9c44cb4000
close(3)                                = 0
open("/dev/sr0", O_RDONLY|O_NONBLOCK)   = 3
ioctl(3, CDROM_DRIVE_STATUS, 0)         = 2
ioctl(3, CDROMCLOSETRAY, 0)             = 0
exit_group(0)                           = ?
+++ exited with 0 +++