Bug 612305

Summary: [python / osc build] subprocess problem
Product: [openSUSE] openSUSE.org Reporter: Alex Savin <alexo.veto>
Component: BuildServiceAssignee: Mr Maintenance <maintenance>
Status: RESOLVED FIXED QA Contact: Adrian Schröter <adrian.schroeter>
Severity: Major    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: openSUSE 11.2   
Whiteboard: .
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Alex Savin 2010-06-07 20:12:05 UTC
User-Agent:       Opera/9.80 (X11; Linux i686; U; ru) Presto/2.5.28/2.5.23 Version/10.60

osc build - VERY often fail to build:


Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/osc/babysitter.py", line 46, in run
    return prg.main()
  File "/usr/lib/python2.6/site-packages/osc/cmdln.py", line 308, in main
    return self.cmd(args)
  File "/usr/lib/python2.6/site-packages/osc/cmdln.py", line 331, in cmd
    retval = self.onecmd(argv)
  File "/usr/lib/python2.6/site-packages/osc/cmdln.py", line 447, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/usr/lib/python2.6/site-packages/osc/cmdln.py", line 1177, in _dispatch_cmd
    return handler(argv[0], opts, *args)
  File "/usr/lib/python2.6/site-packages/osc/commandline.py", line 3227, in do_build
    return osc.build.main(opts, args)
  File "/usr/lib/python2.6/site-packages/osc/build.py", line 632, in main
    rc = subprocess.call(cmd, shell=True)
  File "/usr/lib/python2.6/subprocess.py", line 444, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.6/subprocess.py", line 595, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1084, in _execute_child
    data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
OSError: [Errno 4] Interrupted system call
[Errno 4] Interrupted system call
Password: 
alex@sled:~/projects/alexqwesa/home:alexqwesa:branches:KDE:KDE4:Playground/kaffeine> su: incorrect password



look like process read from pipe before write, for test I add delay to subprocess.py:

--- /usr/lib/python2.6/subprocess.py    2010-06-08 00:09:05.699185850 +0400
+++ /tmp/subprocess.py  2010-06-07 23:44:53.227184008 +0400
@@ -1081,6 +1081,9 @@
                 os.close(errwrite)
 
             # Wait for exec to fail or succeed; possibly raising exception
+            import time
+            time.sleep(5)
             data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
             os.close(errpipe_read)
             if data != "":

and osc build start work good


rpm -q python python-base osc
python-2.6.2-6.4.1.i586
python-base-2.6.2-6.4.1.i586
osc-0.125.5-0.2.1.i586


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Adrian Schröter 2010-06-09 11:23:26 UTC
looks more like a generic python issue. But I don't see this on factory at least.

Which distribution do you use ?
Comment 2 Alex Savin 2010-06-09 15:37:34 UTC
openSUSE 11.2 + update + other repos

python, python-base and osc packages from update repo(http://download.opensuse.org/update/11.2/ )
Comment 3 Alex Savin 2010-06-09 15:39:37 UTC
2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100 i686 athlon i386 GNU/Linux
Comment 4 Jan Matejek 2010-06-10 11:59:21 UTC
seems to be subprocess-eintr-safety issue http://bugs.python.org/issue1068268

but i thought that this was patched long ago ... i'm checking it now
Comment 5 Jan Matejek 2010-06-10 12:18:04 UTC
ah, well.
Adrian, you don't see it in Factory because it's already fixed in there.
the EINTR-safety bug existed for a long time, but there were some other EINTR-unsafe calls discovered recently.

I am not sure whether to push for update on this one, seeing as 11.3 is very close, so leaving this to the original poster.

Alex, can you upgrade to Factory python to confirm that the bug is gone?
Do you think that we need to push this as an online update? If so, please set NEEDINFO to opensuse maintenance team, as described in [1].
The patch [2] is trivial and i can prepare the updated package in a matter of minutes.

Otherwise i'll close this bug as FIXED

[1] http://wiki.opensuse.org/openSUSE:Maintenance
[2] http://svn.python.org/view?view=rev&revision=78523
Comment 6 Alex Savin 2010-06-10 14:27:54 UTC
>Alex, can you upgrade to Factory python to confirm that the bug is gone?

I test python-2.6.5-15.1.i586 and python-base-2.6.5-18.1.i586 from 
http://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_11.2/
and problem fixed in this version



>Do you think that we need to push this as an online update?

yes
Comment 7 Christian Dengler 2010-06-14 11:56:41 UTC
+1 (for an update)
Comment 8 Swamp Workflow Management 2010-06-15 15:12:26 UTC
The SWAMPID for this issue is 33932.
This issue was rated as low.
Please submit fixed packages as soon as possible.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/33932
Comment 9 Christian Dengler 2010-06-15 15:13:52 UTC
Update process started. Be so kind and submit the sources and a patchinfo.
Comment 10 Jan Matejek 2010-06-16 16:14:44 UTC
submitted to 11.2 in SR 41619, patchinfo submitted. handing over to maintenance
Comment 11 Swamp Workflow Management 2010-07-06 12:00:54 UTC
Update released for: libpython2_6-1_0, libpython2_6-1_0-debuginfo, python, python-base, python-base-debuginfo, python-base-debugsource, python-curses, python-curses-debuginfo, python-debuginfo, python-debugsource, python-demo, python-devel, python-gdbm, python-gdbm-debuginfo, python-idle, python-tk, python-tk-debuginfo, python-xml, python-xml-debuginfo
Products:
openSUSE 11.2 (debug, i586, x86_64)
Comment 12 Alex Savin 2010-09-19 12:21:18 UTC
look like fixed, i think we can close this bug
Comment 13 Bernhard Wiedemann 2016-04-15 11:50:50 UTC
This is an autogenerated message for OBS integration:
This bug (612305) was mentioned in
https://build.opensuse.org/request/show/41619 11.2:Test / python