Bug#757396: autopkgtest: crashes on spamassassin 3.4.0-2 with --built-tree, but not with --apt-source

2014-08-20 Thread Martin Pitt
Control: tag -1 -moreinfo -unreproducible confirmed

Hey Antonio,

Antonio Terceiro [2014-08-19 12:43 -0300]:
 Now I get this:
 
 $ ./run-from-checkout --user debci /tmp/spamassassin-3.4.0/ --- schroot 
 debci-unstable-amd64
 PermissionError: [Errno 13] Permission denied: 'sa-compile.raw'

I suppose your /tmp/spamassassin-3.4.0/ is owned by someone other than
yourself, and/or sa-compile.raw is from a previous build/test run.

I can reproduce this now with a root-owned file in a root-owned
directory in my source tree.

Thanks!

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#757396: autopkgtest: crashes on spamassassin 3.4.0-2 with --built-tree, but not with --apt-source

2014-08-20 Thread Antonio Terceiro
On Wed, Aug 20, 2014 at 12:26:15PM +0200, Martin Pitt wrote:
 Control: tag -1 -moreinfo -unreproducible confirmed
 
 Hey Antonio,
 
 Antonio Terceiro [2014-08-19 12:43 -0300]:
  Now I get this:
  
  $ ./run-from-checkout --user debci /tmp/spamassassin-3.4.0/ --- schroot 
  debci-unstable-amd64
  PermissionError: [Errno 13] Permission denied: 'sa-compile.raw'
 
 I suppose your /tmp/spamassassin-3.4.0/ is owned by someone other than
 yourself,

It's not.

 and/or sa-compile.raw is from a previous build/test run.

This is more probable.

 I can reproduce this now with a root-owned file in a root-owned
 directory in my source tree.

Maybe the test run created that file with permissions that wouldn't
allow it to be removed. note that the spamassassin tests declare
`needs-root`

-- 
Antonio Terceiro terce...@debian.org


signature.asc
Description: Digital signature


Bug#757396: autopkgtest: crashes on spamassassin 3.4.0-2 with --built-tree, but not with --apt-source

2014-08-13 Thread Martin Pitt
tag 757396 unreproducible moreinfo
thanks

Hello Antonio,

Antonio Terceiro [2014-08-07 15:30 -0300]:
 Let me show how I can currently reproduce this bug.

I have some trouble with reproducing this. It works for me with both a
directory and a file type schroot. I also checked out current debci,
created a new schroot with sudo bin/debci setup, and ran exactly
this command:

 $ adt-run --user debci spamassassin-3.4.0/ --- schroot debci-unstable-amd64

I only get the python: command not found proper failures, not the
exception in copydown_shareddir(). So I suppose this is not specific
to a schroot configuration but perhaps specific to a file system or a
race condition. I also have this case (multiple tests with schroot and
a tree, although it uses --unbuilt-tree instead of --built-tree) in
the test suite:

  
http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/tree/tests/adt-run#n1433

Would you mind running this (from apt-get source autopkgtest or a git
checkout):

  ADT_TEST_SCHROOT=debci-unstable-amd64 tests/adt-run 
SchrootRunner.test_tree_norestrictions_nobuild_success

You can try with different schroots; this needs to be able to run the
schroot with the same user, thus you might need to run the entire
thing in sudo -u debci -i or so. Does that succeed or fail
(hopefully with the same exception)?

   File /usr/share/autopkgtest/python/VirtSubproc.py, line 417, in copyupdown
 copydown_shareddir(sd[0], sd[1], dirsp, downtmp_host)
   File /usr/share/autopkgtest/python/VirtSubproc.py, line 374, in 
 copydown_shareddir
 shutil.copytree(host, host_tmp, symlinks=True)
 FileExistsError: [Errno 17] File exists: 
 '/var/lib/schroot/mount/debci-unstable-amd64-06662192-e8ac-4c1a-aaf7-e36c434659c6/tmp/adt-run.FL2v8q/tree'

The command immediately before the copytree() is
shutil.rmtree(host_tmp, ignore_errors=True). I suppose there are
actually some errors in removing the previous tree, so
ignore_errors=True is probably not such a good idea here after all.
Could you try to edit /usr/share/autopkgtest/python/VirtSubproc.py
in-place to drop the ignore_errors=True from the rmtree() call and
give me the error message then? It's apparently running into some file
which it could create but not delete (permissions? EBUSY?)

Thanks!

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#757396: autopkgtest: crashes on spamassassin 3.4.0-2 with --built-tree, but not with --apt-source

2014-08-07 Thread Antonio Terceiro
Package: autopkgtest
Version: 3.3.2
Severity: normal

Let me show how I can currently reproduce this bug.

First, I download the source for spamassassin (I don't think it's
related to spamassassin tests per se, it just happens to be the package
I saw the problem with):

$ apt-get source spamassassin
[...]

Then I run the tests passing the source directory (equivalent to passing 
--built-tree):

888-
$ adt-run --user debci spamassassin-3.4.0/ --- schroot debci-unstable-amd64
adt-run [15:08:48]: version 3.3.2
adt-run [15:08:49]: testbed dpkg architecture: amd64
adt-run [15:08:49]:  built-tree spamassassin-3.4.0/
adt-run [15:08:49]: testing package spamassassin version 3.4.0-2
adt-run [15:08:49]: test spamassassin.nospam: preparing
Selecting previously unselected package adt-satdep.

... snip installation of dependencies ...

adt-run [15:08:59]: test spamassassin.nospam: [---
/tmp/adt-run.FL2v8q/tree/debian/tests/spamassassin.nospam: line 7: python: 
command not found
ERROR: POINTS SHOULD BE ZERO
adt-run [15:09:00]: test spamassassin.nospam: ---]
adt-run [15:09:00]: test spamassassin.nospam:  - - - - - - - - - - results - - 
- - - - - - - -
spamassassin.nospam  FAIL non-zero exit status 1
adt-run [15:09:00]: test spamassassin.spam: preparing
(Reading database ... 12244 files and directories currently installed.)
Preparing to unpack .../adt-run.FL2v8q/adt-satdep.deb ...
Unpacking adt-satdep (0) over (0) ...
Reading package lists...
Building dependency tree...
Reading state information...
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up adt-satdep (0) ...
Unexpected error:
Traceback (most recent call last):
  File /usr/share/autopkgtest/python/VirtSubproc.py, line 617, in mainloop
command()
  File /usr/share/autopkgtest/python/VirtSubproc.py, line 552, in command
r = f(c, ce)
  File /usr/share/autopkgtest/python/VirtSubproc.py, line 494, in cmd_copydown
copyupdown(c, ce, False)
  File /usr/share/autopkgtest/python/VirtSubproc.py, line 417, in copyupdown
copydown_shareddir(sd[0], sd[1], dirsp, downtmp_host)
  File /usr/share/autopkgtest/python/VirtSubproc.py, line 374, in 
copydown_shareddir
shutil.copytree(host, host_tmp, symlinks=True)
  File /usr/lib/python3.4/shutil.py, line 302, in copytree
os.makedirs(dst)
  File /usr/lib/python3.4/os.py, line 237, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: 
'/var/lib/schroot/mount/debci-unstable-amd64-06662192-e8ac-4c1a-aaf7-e36c434659c6/tmp/adt-run.FL2v8q/tree'
adt-run [15:09:02]: ERROR: testbed failed: cannot send to testbed: 
['BrokenPipeError: [Errno 32] Broken pipe\n']
888-



Then, if I run adt-run with the same arguments, but passing the package name
instead (equivalent to passing --apt-source).

888-
$ adt-run --user debci spamassassin --- schroot debci-unstable-amd64
adt-run [15:09:09]: version 3.3.2
adt-run [15:09:09]: testbed dpkg architecture: amd64
adt-run [15:09:09]:  apt-source spamassassin

... snip installation of dependencies ...

adt-run [15:09:31]: test spamassassin.nospam: [---
/tmp/adt-run.zjnpdq/build.9hA/spamassassin-3.4.0/debian/tests/spamassassin.nospam:
 line 7: python: command not found
ERROR: POINTS SHOULD BE ZERO
adt-run [15:09:31]: test spamassassin.nospam: ---]
adt-run [15:09:31]: test spamassassin.nospam:  - - - - - - - - - - results - - 
- - - - - - - -
spamassassin.nospam  FAIL non-zero exit status 1
adt-run [15:09:31]: test spamassassin.spam: preparing
(Reading database ... 13020 files and directories currently installed.)
Preparing to unpack .../adt-run.zjnpdq/adt-satdep.deb ...
Unpacking adt-satdep (0) over (0) ...
Reading package lists...
Building dependency tree...
Reading state information...
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up adt-satdep (0) ...
adt-run [15:09:35]: test spamassassin.spam: [---
/tmp/adt-run.zjnpdq/build.9hA/spamassassin-3.4.0/debian/tests/spamassassin.spam:
 line 7: python: command not found
ERROR: POINTS SHOULD BE HIGHER THAN ZERO
adt-run [15:09:35]: test spamassassin.spam: ---]
adt-run [15:09:35]: test spamassassin.spam:  - - - - - - - - - - results - - - 
- - - - - - -
spamassassin.spamFAIL non-zero exit status 1
adt-run [15:09:35]: test daemon: