classification
Title: test_distutils fails on PPC64 Fedora 3.x: /tmp/subprocess.py
Type: Stage: resolved
Components: Distutils, Tests Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: David.Edelsohn, dstufft, eric.araujo, vstinner
Priority: normal Keywords:

Created on 2020-01-07 18:12 by vstinner, last changed 2020-01-27 20:54 by vstinner. This issue is now closed.

Messages (5)
msg359531 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-01-07 18:12
https://buildbot.python.org/all/#/builders/8/builds/136

0:11:37 load avg: 2.21 [230/420/1] test_distutils failed
Traceback (most recent call last):
  File "/tmp/tmpo2bw8_ak.py", line 5, in <module>
    byte_compile(files, optimize=1, force=None,
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/util.py", line 359, in byte_compile
    import subprocess
  File "/tmp/subprocess.py", line 28
    """Subprocesses with accessible I/O streams

This module allows you to spawn processes, connect to their
input/output/error pipes, and obtain their return codes.

For a complete description of this module see the Python documentation.

Main API
========
call(...): Runs a command, waits for it to complete, then returns
    the return code.
check_call(...): Same as call() but raises CalledProcessError()
    if return code is not 0
check_output(...): Same as check_call() but returns the contents of
    stdout instead of a return code
Popen(...): A class for flexibly executing a command in a new process

Constants
---------
PIPE:    Special value that indicates a pipe should be created
STDOUT:  Special value that indicates that stderr should go to stdout
"""Instruction context:
       ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "/tmp/tmpkoui1d2n.py", line 5, in <module>
    byte_compile(files, optimize=1, force=None,
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/util.py", line 359, in byte_compile
    import subprocess
  File "/tmp/subprocess.py", line 28
    """Subprocesses with accessible I/O streams

This module allows you to spawn processes, connect to their
input/output/error pipes, and obtain their return codes.

For a complete description of this module see the Python documentation.

Main API
========
call(...): Runs a command, waits for it to complete, then returns
    the return code.
check_call(...): Same as call() but raises CalledProcessError()
    if return code is not 0
check_output(...): Same as check_call() but returns the contents of
    stdout instead of a return code
Popen(...): A class for flexibly executing a command in a new process

Constants
---------
PIPE:    Special value that indicates a pipe should be created
STDOUT:  Special value that indicates that stderr should go to stdout
"""Instruction context:
       ^
SyntaxError: invalid syntax
error: command '/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/python' failed with exit status 1
error: Bad exit status from /var/tmp/rpm-tmp.yc4Iwj (%install)
    Bad exit status from /var/tmp/rpm-tmp.yc4Iwj (%install)
Traceback (most recent call last):
  File "/tmp/tmp6h6zfdg2.py", line 5, in <module>
    byte_compile(files, optimize=1, force=None,
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/util.py", line 359, in byte_compile
    import subprocess
  File "/tmp/subprocess.py", line 28
    """Subprocesses with accessible I/O streams

This module allows you to spawn processes, connect to their
input/output/error pipes, and obtain their return codes.

For a complete description of this module see the Python documentation.

Main API
========
call(...): Runs a command, waits for it to complete, then returns
    the return code.
check_call(...): Same as call() but raises CalledProcessError()
    if return code is not 0
check_output(...): Same as check_call() but returns the contents of
    stdout instead of a return code
Popen(...): A class for flexibly executing a command in a new process

Constants
---------
PIPE:    Special value that indicates a pipe should be created
STDOUT:  Special value that indicates that stderr should go to stdout
"""Instruction context:
       ^
SyntaxError: invalid syntax
error: command '/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/python' failed with exit status 1
error: Bad exit status from /var/tmp/rpm-tmp.ccdCTP (%install)
    Bad exit status from /var/tmp/rpm-tmp.ccdCTP (%install)
Traceback (most recent call last):
  File "/tmp/tmp_slztuax.py", line 5, in <module>
    byte_compile(files, optimize=1, force=None,
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/util.py", line 359, in byte_compile
    import subprocess
  File "/tmp/subprocess.py", line 28
    """Subprocesses with accessible I/O streams

This module allows you to spawn processes, connect to their
input/output/error pipes, and obtain their return codes.

For a complete description of this module see the Python documentation.

Main API
========
call(...): Runs a command, waits for it to complete, then returns
    the return code.
check_call(...): Same as call() but raises CalledProcessError()
    if return code is not 0
check_output(...): Same as check_call() but returns the contents of
    stdout instead of a return code
Popen(...): A class for flexibly executing a command in a new process

Constants
---------
PIPE:    Special value that indicates a pipe should be created
STDOUT:  Special value that indicates that stderr should go to stdout
"""Instruction context:
       ^
SyntaxError: invalid syntax
test_byte_compile (distutils.tests.test_install_lib.InstallLibTestCase) ... ERROR
(...)
test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... ERROR
test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... ERROR
(...)
test_byte_compile_optimized (distutils.tests.test_build_py.BuildPyTestCase) ... ERROR

======================================================================
ERROR: test_byte_compile (distutils.tests.test_install_lib.InstallLibTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/tests/test_install_lib.py", line 46, in test_byte_compile
    cmd.byte_compile([f])
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/command/install_lib.py", line 136, in byte_compile
    byte_compile(files, optimize=self.optimize,
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/util.py", line 425, in byte_compile
    spawn(cmd, dry_run=dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 157, in _spawn_posix
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/python' failed with exit status 1

======================================================================
ERROR: test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/tests/test_bdist_rpm.py", line 120, in test_no_optimize_flag
    cmd.run()
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/command/bdist_rpm.py", line 363, in run
    self.spawn(rpm_cmd)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/cmd.py", line 365, in spawn
    spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 157, in _spawn_posix
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 1

======================================================================
ERROR: test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/tests/test_bdist_rpm.py", line 77, in test_quiet
    cmd.run()
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/command/bdist_rpm.py", line 363, in run
    self.spawn(rpm_cmd)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/cmd.py", line 365, in spawn
    spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 157, in _spawn_posix
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 1

======================================================================
ERROR: test_byte_compile_optimized (distutils.tests.test_build_py.BuildPyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/tests/test_build_py.py", line 118, in test_byte_compile_optimized
    cmd.run()
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/command/build_py.py", line 95, in run
    self.byte_compile(self.get_outputs(include_bytecode=0))
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/command/build_py.py", line 391, in byte_compile
    byte_compile(files, optimize=self.optimize,
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/util.py", line 425, in byte_compile
    spawn(cmd, dry_run=dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/distutils/spawn.py", line 157, in _spawn_posix
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/python' failed with exit status 1

----------------------------------------------------------------------

Ran 248 tests in 3.360s

FAILED (errors=4, skipped=29)
test test_distutils failed
msg359545 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-01-07 21:00
It seems like a change on the worker rather than in the code, since 3.7, 3.8 and master branches are affected.

David Edelsohn: Would you mind to have a look at this issue?

PPC64 Fedora 3.7:
https://buildbot.python.org/all/#builders/32/builds/40

PPC64 Fedora 3.8:
https://buildbot.python.org/all/#/builders/118/builds/70

PPC64 Fedora 3.x:
https://buildbot.python.org/all/#/builders/8/builds/136
msg359546 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-01-07 21:01
The problem seems to be that /tmp/subprocess.py file exists: when /tmp/tmpo2bw8_ak.py temporary script was run, /tmp/subprocess.py was used rather than the subprocess of the stdlib.
msg360783 - (view) Author: David Edelsohn (David.Edelsohn) * Date: 2020-01-27 17:20
The file was created and owned by another user.  I have removed the file.  I have reached out to the user to find out why he is creating it.
msg360799 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-01-27 20:54
The buildbot is back to green, thank you David :-)
https://buildbot.python.org/all/#/builders/8/builds/254
History
Date User Action Args
2020-01-27 20:54:48vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg360799

stage: resolved
2020-01-27 17:20:35David.Edelsohnsetmessages: + msg360783
2020-01-08 12:57:54vstinnersettitle: test_distutils fails on PPC64 Fedora 3.x -> test_distutils fails on PPC64 Fedora 3.x: /tmp/subprocess.py
2020-01-07 21:01:56vstinnersetmessages: + msg359546
2020-01-07 21:00:20vstinnersetnosy: + David.Edelsohn
messages: + msg359545
2020-01-07 18:12:11vstinnercreate