Bug 714627 - pty handling is still broken
Summary: pty handling is still broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-20 09:55 UTC by Dan Horák
Modified: 2011-11-26 23:06 UTC (History)
3 users (show)

Fixed In Version: mock-1.1.17-1.fc15
Clone Of:
Environment:
Last Closed: 2011-10-24 22:59:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
test code to show the problem (276 bytes, text/x-csrc)
2011-06-20 09:55 UTC, Dan Horák
no flags Details

Description Dan Horák 2011-06-20 09:55:44 UTC
Created attachment 505575 [details]
test code to show the problem

The pty handling (/dev/ptmx & co) that was reported in bug #683111 is still broken in mock 1.1.10. The openpty() call fails and that causes issues in the buildsystem like Fedora/s390x (with mock 1.1.10 on EL6) when package testsuites are run (affects python, python3, ModemManager). The x86 Fedora uses mock 1.1.8 on the builders so it's not yet affected.


Version-Release number of selected component (if applicable):
mock-1.1.10 (tested on f14, f15, el6)


strace output when the code from attachment is run on Rawhide environment on F-15 host:
...

open("/dev/ptmx", O_RDWR)               = 5
statfs("/dev/pts", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
ioctl(5, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [1])                 = 0
stat("/dev/pts/1", 0x7fffe069d940)      = -1 ENOENT (No such file or directory)
fcntl(5, F_GETFD)                       = 0
close(5)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0964e6000
...

/dev layout after "mock -r fedora-rawhide-x86_64 shell":
mock-chroot> ls -al /dev
celkem 8
drwxrwxr-x.  4 root root 4096 20. čen 11.52 .
dr-xr-xr-x. 23 root root 4096 20. čen 11.52 ..
crw-------.  1 root root 5, 1 20. čen 11.52 console
lrwxrwxrwx.  1 root root   13 20. čen 11.52 fd -> /proc/self/fd
crw-rw-rw-.  1 root root 1, 7 20. čen 11.52 full
crw-rw-rw-.  1 root root 1, 3 20. čen 11.52 null
crw-rw-rw-.  1 root tty  5, 2 20. čen 11.52 ptmx
drwxr-xr-x.  2 root root    0 20. čen 11.52 pts
crw-rw-rw-.  1 root root 1, 8 20. čen 11.52 random
drwxrwxrwt.  2 root root   40 20. čen 11.52 shm
lrwxrwxrwx.  1 root root   15 20. čen 11.52 stderr -> /proc/self/fd/2
lrwxrwxrwx.  1 root root   15 20. čen 11.52 stdin -> /proc/self/fd/0
lrwxrwxrwx.  1 root root   15 20. čen 11.52 stdout -> /proc/self/fd/1
crw-rw-rw-.  1 root tty  5, 0 20. čen 11.52 tty
cr--r--r--.  1 root root 1, 9 20. čen 11.52 urandom
crw-rw-rw-.  1 root root 1, 5 20. čen 11.52 zero
mock-chroot> ls -al /dev/pts
celkem 4
drwxr-xr-x. 2 root root    0 20. čen 11.52 .
drwxrwxr-x. 4 root root 4096 20. čen 11.52 ..
crw-rw-rw-. 1 root root 5, 2 20. čen 11.52 ptmx

Comment 1 Clark Williams 2011-06-23 00:39:17 UTC
I've just built mock 1.1.11 which removes the 'newinstance' mount modifier for the devpts filesystem inside the chroot. I believe this is what was causing pty failures inside the chroot.

Comment 2 Clark Williams 2011-08-17 00:44:25 UTC
the 1.1.12 version has 'newinstance' back with logic to properly setup symlinks. Please let me know if this version fixes your issues.

Comment 3 Tim Flink 2011-09-08 07:10:26 UTC
I've been trying to build python for the armhfp bootstrap project and I think that I'm hitting this, even with mock-1.1.12. However, I'm not getting the same test failures on F15 x86_64 and this might be arch specific.

I'm happy to test stuff if there are ideas on how to fix this for armhfp.

build logs:
http://tflink.fedorapeople.org/packages/python/python-2.7.1-7.fc15/

The problem shows up in test failures. The two tests that are failing are test_pty (line 15184 of build.log) and test_openpty (line 15120 of build.log).

Comment 4 Clark Williams 2011-10-14 03:38:05 UTC
Can either of you confirm/deny that 1.1.15 solves your pty problems?

Comment 5 Dan Horák 2011-10-14 15:03:31 UTC
(In reply to comment #4)
> Can either of you confirm/deny that 1.1.15 solves your pty problems?

mock 1.1.15 behaves correctly

Comment 6 Fedora Update System 2011-10-14 16:28:01 UTC
mock-1.1.16-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.16-1.fc15

Comment 7 Fedora Update System 2011-10-14 16:29:20 UTC
mock-1.0.23-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.23-1.el5

Comment 8 Fedora Update System 2011-10-14 16:30:22 UTC
mock-1.1.16-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.16-1.fc14

Comment 9 Fedora Update System 2011-10-14 16:31:26 UTC
mock-1.1.16-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.16-1.el6

Comment 10 Fedora Update System 2011-10-15 20:24:43 UTC
Package mock-1.1.16-1.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.1.16-1.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14382
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2011-10-24 22:59:08 UTC
mock-1.1.16-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2011-10-24 23:04:36 UTC
mock-1.1.16-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2011-11-01 15:40:07 UTC
mock-1.1.17-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.fc15

Comment 14 Fedora Update System 2011-11-01 15:41:31 UTC
mock-1.1.17-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.fc16

Comment 15 Fedora Update System 2011-11-01 15:42:45 UTC
mock-1.1.17-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.fc14

Comment 16 Fedora Update System 2011-11-01 15:44:06 UTC
mock-1.0.24-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.24-1.el5

Comment 17 Fedora Update System 2011-11-01 15:45:30 UTC
mock-1.1.17-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.17-1.el6

Comment 18 Fedora Update System 2011-11-11 01:22:27 UTC
mock-1.1.17-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2011-11-26 19:23:33 UTC
mock-1.1.17-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2011-11-26 19:24:51 UTC
mock-1.0.24-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2011-11-26 23:02:07 UTC
mock-1.1.17-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2011-11-26 23:06:23 UTC
mock-1.1.17-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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