classification
Title: test_distutils failing on OpenSUSE 10.3, Py3k
Type: behavior Stage: resolved
Components: Distutils, Tests Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: merwok Nosy List: ShuaibKhan, merwok, neologix, rpetrov, skrah, tarek
Priority: normal Keywords:

Created on 2009-04-29 07:49 by ShuaibKhan, last changed 2011-11-03 17:45 by skrah. This issue is now closed.

Files
File name Uploaded Description Edit
output.txt ShuaibKhan, 2009-04-29 07:49 Complete output of "./python Lib/tests/regrtest.py -v test_distutils"
rpm-tmp.15210 ShuaibKhan, 2009-04-29 07:56
rpm-tmp.15211 ShuaibKhan, 2009-04-29 07:56
Messages (16)
msg86781 - (view) Author: M. Shuaib Khan (ShuaibKhan) Date: 2009-04-29 07:49
Hi,

Running test_distutils as a non root user fails for me. Running it as a
root user works.

System information:

uname -a
Linux Matrix 2.6.22.5-31-default #1 SMP 2007/09/21 22:29:00 UTC i686
i686 i386 GNU/Linux

./python --version
Python 3.1a2+


======================================================================
ERROR: test_no_optimize_flag
(distutils.tests.test_bdist_rpm.BuildRpmTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/tests/test_bdist_rpm.py",
line 114, in test_no_optimize_flag
    cmd.run()
  File
"/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/command/bdist_rpm.py",
line 363, in run
    self.spawn(rpm_cmd)
  File "/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/cmd.py", line
368, in spawn
    spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/spawn.py", line
31, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/spawn.py", line
139, in _spawn_posix
    % (cmd[0], exit_status))
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/shuaib/Tools/GSoC2009/py3k/Lib/distutils/tests/test_bdist_rpm.py",
line 74, in test_quiet
    cmd.run()
  File
"/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/command/bdist_rpm.py",
line 363, in run
    self.spawn(rpm_cmd)
  File "/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/cmd.py", line
368, in spawn
    spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/spawn.py", line
31, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/shuaib/Tools/GSoC2009/py3k/Lib/distutils/spawn.py", line
139, in _spawn_posix
    % (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit
status 1

----------------------------------------------------------------------
msg86783 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-04-29 08:27
can you try to remove all /var/tmp/rpm-tmp.* directories and relaunch
the tests as a simple user ?

I would like to see if this problem doesn't occur because this temp
directory was previously created by root.
msg86789 - (view) Author: M. Shuaib Khan (ShuaibKhan) Date: 2009-04-29 09:46
Tried. Same failure.
msg86790 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-04-29 09:50
can you tell me the owner and permission setttings for:

- /var/tmp/rpm-tmp.*
- /var/tmp

(and if /var/tmp is a symklink, if it points to /tmp, 
 and in that case the same info for /tmp)
msg86791 - (view) Author: M. Shuaib Khan (ShuaibKhan) Date: 2009-04-29 10:04
drwxrwxrwt  5 root  root  4096 2009-04-29 15:46 tmp

And after a number of failed test runs...

-rw-r--r-- 1 shuaib users  893 2009-04-29 16:01 rpm-tmp.11523
-rw-r--r-- 1 shuaib users  893 2009-04-29 16:01 rpm-tmp.11524
-rw-r--r-- 1 shuaib users  893 2009-04-29 15:46 rpm-tmp.13270
msg86792 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-04-29 10:16
Can you remove 

/var/tmp/foo-0.1-1-buildroot

and try again ?

if it fails, can you look at the permissions of

/var/tmp/foo-0.1-1-buildroot/dev/null/lib
msg86793 - (view) Author: M. Shuaib Khan (ShuaibKhan) Date: 2009-04-29 10:21
I've already tried the removal of foo... directory. Failed.

I think the following might be interesing...

drw-rw-rw- 3 shuaib users 4096 2009-04-29 15:46 null

Permissions for null/lib are as follows:

drwxr-xr-x 3 shuaib users 4096 2009-04-29 15:46 lib
msg145649 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-10-16 22:03
I temporarily changed the Fedora bot to run Fedora-14-i386. The
same failures can be observed:

======================================================================
ERROR: test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/tests/test_bdist_rpm.py", line 121, in test_no_optimize_flag
    cmd.run()
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/command/bdist_rpm.py", line 365, in run
    self.spawn(rpm_cmd)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/cmd.py", line 366, in spawn
    spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", line 32, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", line 163, in _spawn_posix
    % (cmd[0], exit_status))
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/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/tests/test_bdist_rpm.py", line 81, in test_quiet
    cmd.run()
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/command/bdist_rpm.py", line 365, in run
    self.spawn(rpm_cmd)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/cmd.py", line 366, in spawn
    spawn(cmd, search_path, dry_run=self.dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", line 32, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/distutils/spawn.py", line 163, in _spawn_posix
    % (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'rpmbuild' failed with exit status 1

----------------------------------------------------------------------
Ran 177 tests in 2.967s
msg145717 - (view) Author: Éric Araujo (merwok) * (Python committer) Date: 2011-10-17 15:41
The patch from #11599 should let us get the full error message, for a start.
msg145758 - (view) Author: Roumen Petrov (rpetrov) * Date: 2011-10-17 20:42
May be last report is not related to initial two years old . It seems to me it is introduced recently after some optimization related to creation of pyc files and this is not OpenSUSE related.
msg146631 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-10-30 11:37
Here's the error message:
"""
error: File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyc
error: File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyo
    File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyc
    File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyo
"""
http://python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/934/steps/test/logs/stdio
msg146708 - (view) Author: Éric Araujo (merwok) * (Python committer) Date: 2011-10-31 16:32
> Here's the error message:
> error: File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyc

Thanks.  Some rpm tool is looking for byte-compiled files in the old location, but I’ve fixed sdist (used under the cover by bdist_rpm) recently to use __pycache__ directories.  There must be some other code path that reports wrong locations for byte-compiled files, similar to the get_outputs methods that I fixed in another commit, but I’m unable to find it right now.  I’ll try to install Fedora in a VM when I get more time.
msg146749 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-10-31 22:41
For the buildbot failures see #13307. I think that it's indeed a
different issue, since AFAIK __pycache__ didn't exist when this one
was opened.
msg146950 - (view) Author: Éric Araujo (merwok) * (Python committer) Date: 2011-11-03 17:24
Buildbot passes, certainly thanks to the fix for #13307.
msg146952 - (view) Author: Éric Araujo (merwok) * (Python committer) Date: 2011-11-03 17:29
Hm, did I close this too hastily?  The original report was not about the buildbot; does the buildbot run as a non-root user with the same version that was reported in the first message?  If no, can someone try to reproduce the issue in the same conditions as the OP?
msg146955 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-11-03 17:45
The buildbot runs as non-root, so it should reproduce this
issue (but it's green).

The original report was for 2.6/3.1, so I think closing this as
out-of-date is reasonable.
History
Date User Action Args
2011-11-03 17:45:09skrahsetmessages: + msg146955
2011-11-03 17:29:52merwoksetmessages: + msg146952
2011-11-03 17:24:43merwoksetstatus: open -> closed
messages: + msg146950

assignee: tarek -> merwok
resolution: out of date
stage: resolved
2011-10-31 22:41:54skrahsetmessages: + msg146749
2011-10-31 16:32:49merwoksetmessages: + msg146708
2011-10-30 11:37:44neologixsetnosy: + neologix
messages: + msg146631
2011-10-17 20:42:59rpetrovsetnosy: + rpetrov
messages: + msg145758
2011-10-17 15:41:45merwoksetnosy: + merwok
messages: + msg145717
2011-10-16 22:03:39skrahsetnosy: + skrah

messages: + msg145649
versions: + Python 3.3, - Python 2.7
2011-06-26 19:55:10terry.reedysetversions: + Python 3.2, - Python 3.1
2009-04-29 10:21:07ShuaibKhansetmessages: + msg86793
2009-04-29 10:16:58tareksetmessages: + msg86792
2009-04-29 10:04:02ShuaibKhansetmessages: + msg86791
2009-04-29 09:50:15tareksetmessages: + msg86790
2009-04-29 09:46:02ShuaibKhansetmessages: + msg86789
2009-04-29 08:27:22tareksetmessages: + msg86783
versions: + Python 2.7
2009-04-29 07:56:45ShuaibKhansetfiles: + rpm-tmp.15211
2009-04-29 07:56:30ShuaibKhansetfiles: + rpm-tmp.15210
2009-04-29 07:49:31ShuaibKhancreate