Bug 843434

Summary: OSError: [Errno 25] Inappropriate ioctl for device
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-26 00:23:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to replace os.getlogin() none

Description Michael Schwendt 2012-07-26 10:24:21 UTC
Version-Release number of selected component (if applicable):
  mock.noarch 0:1.1.23-2.1.fc17

This is about mock from updates-testing in a Fedora 17 plague builder.

[...]
Waiting for repository to unlock before starting the build...
Starting step 'building' with command:
   /usr/bin/mock rebuild -r fedora-17-x86_64-plague --arch x86_64 --resultdir=/var/lib/plague/builder/55d801ebc011cf404bfb3c7328e77263309ecc61/result --uniqueext=55d801ebc011cf404bfb3c7328e77263309ecc61 /var/lib/plague/builder/55d801ebc011cf404bfb3c7328e77263309ecc61/source/SOMETHING.src.rpm
ERROR: Timed out waiting for the mock status file!  /var/lib/plague/builder/55d801ebc011cf404bfb3c7328e77263309ecc61/result/state.log
Killing build process group of child pid 2242...
Waiting for child process group to exit...
Build processes exited.
Cleaning up the buildroot...
   /usr/bin/mock clean --uniqueext=55d801ebc011cf404bfb3c7328e77263309ecc61 -r fedora-17-x86_64-plague
Waiting for child process 2343 to exit.
Traceback (most recent call last):
  File "/usr/sbin/mock", line 538, in <module>
    def do_buildsrpm(config_opts, chroot, options, args):
  File "/usr/sbin/mock", line 668, in main
    cfg = '%s/%s' % (os.path.expanduser('~' + os.getlogin()), '.mock/user.cfg')
OSError: [Errno 25] Inappropriate ioctl for device



How reproducible:
Tried a few times, got the same crash. Then downgraded to 1.1.22-2.1.fc17, which worked immediately.


Additional info:
Have not examined it in any way yet due to time constraints.

Comment 1 Clark Williams 2012-07-26 21:22:18 UTC
Could I get the config file you used?  I ran the regression tests on my F17 laptop with no issues, so would like to see what else gets turned on with your -plague config.

Comment 2 Michael Schwendt 2012-07-26 23:04:28 UTC
It's the  os.getlogin()  call that throws the OSError.

os.getuid() returns 992
os.getresuid returns (992, 992, 0)
pwd.getpwuid(os.getuid())[0] returns 'plague-builder'

# getent passwd plague-builder
plague-builder:x:992:987::/var/lib/plague/builder:/sbin/nologin
# getent group plague-builder
plague-builder:x:987:
# getent group mock
mock:x:989:plague-builder

[...]

The -plague config file should be innocent since it only modifies the repos and their costs:

@@ -23,12 +23,26 @@
 name=fedora
 mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=x86_64
 failovermethod=priority
+cost=2000
 
 [updates-released]
 name=updates
 mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=x86_64
 failovermethod=priority
 
+[locf]
+name=fedora local
+baseurl=file:///mnt/distimages/17/64/mnt
+cost=0
+enabled=1
+
+[plague-needsign]
+name=plague needsign Fedora 17 build
+baseurl=file:///mnt/storage/rpmbuild/repodir/fedora-17-build
+cost=0
+metadata_expire=0
+enabled=1
+
 [local]
 name=local
 baseurl=http://kojipkgs.fedoraproject.org/repos/f17-build/latest/x86_64/

Comment 3 Clark Williams 2012-07-27 03:20:52 UTC
Created attachment 600674 [details]
Patch to replace os.getlogin()

Ah, I wondered about os.getlogin(). 

Can you try the attached patch?

Comment 4 Michael Schwendt 2012-07-27 09:01:24 UTC
The patch works, of course.

Comment 5 Clark Williams 2012-07-27 15:38:29 UTC
With something like mock it's not always "of course" but I had high hopes :).

Queued for next release.

Comment 6 Clark Williams 2012-07-27 19:19:54 UTC
I went ahead and pushed 1.1.23 to get the mockchain stuff out there. I'll get 1.1.24 with this fix (and some other stuff) into testing as quick as I can.

Comment 7 Clark Williams 2012-07-27 20:14:46 UTC
Bah, got bit by the mass rebuild and AutoQA kicked me out. I'll just push 1.1.24 to testing, which iwill pick this up.

Comment 8 Fedora Update System 2012-07-27 22:11:43 UTC
mock-1.1.24-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.24-1.fc16

Comment 9 Fedora Update System 2012-07-27 22:12:04 UTC
mock-1.1.24-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.24-1.el6

Comment 10 Fedora Update System 2012-07-27 22:12:22 UTC
mock-1.1.24-2.1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.24-2.1.fc17

Comment 11 Fedora Update System 2012-07-27 22:12:40 UTC
mock-1.0.31-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.31-1.el5

Comment 12 Fedora Update System 2012-07-29 20:29:56 UTC
Package mock-1.0.31-1.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.0.31-1.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-6542/mock-1.0.31-1.el5
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2012-07-31 20:30:24 UTC
mock-1.1.25-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.25-1.fc17

Comment 14 Fedora Update System 2012-07-31 20:30:48 UTC
mock-1.1.25-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.25-1.el6

Comment 15 Fedora Update System 2012-07-31 20:31:13 UTC
mock-1.0.32-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.32-1.el5

Comment 16 Fedora Update System 2012-07-31 20:31:38 UTC
mock-1.1.25-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.25-1.fc16

Comment 17 Fedora Update System 2012-08-06 18:46:06 UTC
mock-1.1.26-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.26-1.fc17

Comment 18 Fedora Update System 2012-08-06 18:46:39 UTC
mock-1.1.26-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.26-1.el6

Comment 19 Fedora Update System 2012-08-06 18:47:09 UTC
mock-1.1.26-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.26-1.fc16

Comment 20 Fedora Update System 2012-08-06 18:47:40 UTC
mock-1.0.34-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.34-1.el5

Comment 21 Fedora Update System 2012-08-15 21:48:55 UTC
mock-1.1.26-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.26-2.fc17

Comment 22 Fedora Update System 2012-08-17 11:52:29 UTC
mock-1.1.26-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.26-2.el6

Comment 23 Fedora Update System 2012-08-17 11:53:56 UTC
mock-1.1.26-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.26-2.fc16

Comment 24 Fedora Update System 2012-08-26 00:23:00 UTC
mock-1.1.26-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2012-09-14 15:27:20 UTC
mock-1.1.27-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.27-2.el6

Comment 26 Fedora Update System 2012-09-14 15:28:29 UTC
mock-1.1.27-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.27-2.fc16

Comment 27 Fedora Update System 2012-09-14 15:29:23 UTC
mock-1.0.35-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.35-1.el5

Comment 28 Fedora Update System 2012-09-14 15:30:28 UTC
mock-1.1.27-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.27-2.fc17

Comment 29 Fedora Update System 2012-11-01 21:09:27 UTC
mock-1.1.28-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.28-1.el6

Comment 30 Fedora Update System 2012-11-01 21:10:49 UTC
mock-1.1.28-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.28-1.fc18

Comment 31 Fedora Update System 2012-11-01 21:11:59 UTC
mock-1.0.36-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.36-1.el5

Comment 32 Fedora Update System 2012-11-01 21:13:07 UTC
mock-1.1.28-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.28-1.fc17

Comment 33 Fedora Update System 2012-11-01 21:14:15 UTC
mock-1.1.28-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.28-1.fc16

Comment 34 Fedora Update System 2012-11-15 02:33:00 UTC
mock-1.1.28-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 35 Fedora Update System 2012-11-15 02:35:13 UTC
mock-1.1.28-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 36 Fedora Update System 2012-11-20 19:37:35 UTC
mock-1.0.36-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.