Inaccurate errno reporting in ptrace attach error messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdb (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu carries a patch for gdb, ptrace-
Using strace I observed failing tty ioctls which seem to be responsible:
ptrace(
ioctl(2, TCGETS, 0x7fff1d9c2590) = -1 ENOTTY (Inappropriate ioctl for device)
write(2, "Could not attach to process. If"..., 221Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/
again as the root user. For more details, see /etc/sysctl.
) = 221
ioctl(2, TCGETS, 0x7fff1d9c2590) = -1 ENOTTY (Inappropriate ioctl for device)
...
ioctl(1, TCSBRK, 1) = -1 ENOTTY (Inappropriate ioctl for device)
...
write(2, "ptrace: Inappropriate ioctl for "..., 39ptrace: Inappropriate ioctl for device.) = 39
Our qa-regression-
This behavior can be reproduced using scripts/