You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "John Sirois (JIRA)" <ji...@apache.org> on 2016/06/16 20:07:05 UTC

[jira] [Comment Edited] (AURORA-1717) pants fails to run in integration tests (flaky)

    [ https://issues.apache.org/jira/browse/AURORA-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15334579#comment-15334579 ] 

John Sirois edited comment on AURORA-1717 at 6/16/16 8:06 PM:
--------------------------------------------------------------

OK - so after both killing the {{0.0.80}} symlink and its target from the {{\~/.cache/pants}} and nuking the {{\~/.cache/pip}} a concurrent run nets me 1 success and 1:
{noformat}
$ ./pants test src/test/python/apache/aurora/executor -- -v
New python executable in /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/bin/python2.7
Also creating executable in /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/bin/python
Installing setuptools, pip, wheel...done.
...
Building wheels for collected packages: pantsbuild.pants, twitter.common.collections, pathspec, twitter.common.dirutil, ansicolors, pystache, psutil, Markdown, Pygments, docutils, twitter.common.confluence, zincutils, coverage, pytest, pytest-cov, setproctitle, pywatchman, twitter.common.lang, twitter.common.log, cov-core, twitter.common.options
  Running setup.py bdist_wheel for pantsbuild.pants
  Stored in directory: /home/jsirois/.cache/pip/wheels/48/62/17/4f31c622c372daa09d5a7a88c11f11d0f95e7607234fcaf467
Exception:
Traceback (most recent call last):
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/commands/install.py", line 293, in run
    wb.build(autobuilding=True)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/wheel.py", line 785, in build
    session=self.requirement_set.session)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/download.py", line 814, in unpack_url
    unpack_file_url(link, location, download_dir)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/download.py", line 723, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/utils/__init__.py", line 644, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/utils/__init__.py", line 534, in unzip_file
    data = zip.read(name)
  File "/usr/lib64/python2.7/zipfile.py", line 935, in read
    return self.open(name, "r", pwd).read()
  File "/usr/lib64/python2.7/zipfile.py", line 968, in open
    raise BadZipfile("Truncated file header")
BadZipfile: Truncated file header

./pants: line 95: /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/0.0.80/bin/pants: No such file or directory
{noformat}

This is not the error seen under AuroraBot CI, but its enough to move forward with at least disabling the pip cache or relocating it inside the workspace for isolation.


was (Author: jsirois):
OK - so after both killing the {{0.0.80}} symlink and its target from the {{~/.cache/pants}} and nuking the {{~/.cache/pip}} a concurrent run nets me 1 success and 1:
{noformat}
$ ./pants test src/test/python/apache/aurora/executor -- -v
New python executable in /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/bin/python2.7
Also creating executable in /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/bin/python
Installing setuptools, pip, wheel...done.
...
Building wheels for collected packages: pantsbuild.pants, twitter.common.collections, pathspec, twitter.common.dirutil, ansicolors, pystache, psutil, Markdown, Pygments, docutils, twitter.common.confluence, zincutils, coverage, pytest, pytest-cov, setproctitle, pywatchman, twitter.common.lang, twitter.common.log, cov-core, twitter.common.options
  Running setup.py bdist_wheel for pantsbuild.pants
  Stored in directory: /home/jsirois/.cache/pip/wheels/48/62/17/4f31c622c372daa09d5a7a88c11f11d0f95e7607234fcaf467
Exception:
Traceback (most recent call last):
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/commands/install.py", line 293, in run
    wb.build(autobuilding=True)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/wheel.py", line 785, in build
    session=self.requirement_set.session)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/download.py", line 814, in unpack_url
    unpack_file_url(link, location, download_dir)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/download.py", line 723, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/utils/__init__.py", line 644, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/pants.zjCgz9/install/lib/python2.7/site-packages/pip/utils/__init__.py", line 534, in unzip_file
    data = zip.read(name)
  File "/usr/lib64/python2.7/zipfile.py", line 935, in read
    return self.open(name, "r", pwd).read()
  File "/usr/lib64/python2.7/zipfile.py", line 968, in open
    raise BadZipfile("Truncated file header")
BadZipfile: Truncated file header

./pants: line 95: /home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/0.0.80/bin/pants: No such file or directory
{noformat}

This is not the error seen under AuroraBot CI, but its enough to move forward with at least disabling the pip cache or relocating it inside the workspace for isolation.

> pants fails to run in integration tests (flaky)
> -----------------------------------------------
>
>                 Key: AURORA-1717
>                 URL: https://issues.apache.org/jira/browse/AURORA-1717
>             Project: Aurora
>          Issue Type: Bug
>          Components: Build
>            Reporter: John Sirois
>            Assignee: John Sirois
>
> As noted by [~StephanErb] in [IRC|http://wilderness.apache.org/channels/?f=aurora/2016-06-15#1466009185], python tests occasionally fail like so under AuroraBot:
> {noformat}
> ...
>       with temporary_dir() as checkpoint_root:
>         te = AuroraExecutor(
> >           runner_provider=make_provider(checkpoint_root),
>             sandbox_provider=DefaultTestSandboxProvider())
> src/test/python/apache/aurora/executor/test_thermos_executor.py:580: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> src/test/python/apache/aurora/executor/test_thermos_executor.py:193: in make_provider
>     pex_location=thermos_runner_path(),
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> build = True
>     def thermos_runner_path(build=True):
>       if not build:
>         return getattr(thermos_runner_path, 'value', None)
>     
>       if not hasattr(thermos_runner_path, 'value'):
>         pex_dir = safe_mkdtemp()
> >       assert subprocess.call(["./pants", "--pants-distdir=%s" % pex_dir, "binary",
>           "src/main/python/apache/thermos/runner:thermos_runner"]) == 0
> E       assert 1 == 0
> E        +  where 1 = <function call at 0x7f39ef905938>(['./pants', '--pants-distdir=/tmp/user/2396/tmpU8sLiq', 'binary', 'src/main/python/apache/thermos/runner:thermos_runner'])
> E        +    where <function call at 0x7f39ef905938> = subprocess.call
> src/test/python/apache/aurora/executor/test_thermos_executor.py:185: AssertionError
> -------------- Captured stderr call --------------
> Traceback (most recent call last):
> File "/home/jenkins/.cache/pants/setup/bootstrap-Linux-x86_64/0.0.80/bin/pants", line 7, in <module>
>  from pants.bin.pants_exe import main
> ImportError: No module named pants.bin.pants_exe
> generated xml file: /home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/415337499eb72578eab327a6487c1f5c9452b3d6.xml 
>  16 failed, 638 passed, 6 skipped, 1 warnings, 8 error in 127.24 seconds 
> ...
> {noformat}
> This has all the signs of a race in pants bootstrapping; ie: the {{\[version symlink]/bin/pants}} script is installed but the interpreter it points to in its shebang does not have pants fully installed yet.  That said, a review of the pants bootstrap script seems to indicate correct atomicity.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)