[Bug 1484661] [NEW] 'click install' within an adt-virt-schroot fails with "Sandbox failure: 'click install' not permitted to write-open '/dev/pts/8'"

Jamie Strandboge jamie at ubuntu.com
Thu Aug 13 19:32:40 UTC 2015


Public bug reported:

This used to work and I don't know when this starting failing. If I try to run the click-apparmor autopkgtests (tried both vivid and wily) on a vivid host, then I get:
adt-run [13:51:51]: test test_aa-clickhook: [-----------------------
Successfully built package in './com.example.click-apparmor-test_0.1_all.click'.
WARNING:root:debsig-verify not available; cannot check signatures
ERROR:root:['dpkg', '--force-not-root', '--force-bad-path', '--force-architecture', '--instdir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1', '--admindir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1/.click', '--path-exclude', '*/.click/*', '--log', '/opt/click.ubuntu.com/.click/log', '--no-triggers', '--install', '/tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click'] failed with exit_code 1:
Sandbox failure: 'click install' not permitted to write-open '/dev/pts/8'
dpkg: error processing archive /tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click (--install):
 subprocess dpkg-deb --control returned error exit status 1
Errors were encountered while processing:
 /tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click

Traceback (most recent call last):
  File "/usr/bin/click", line 86, in <module>
    sys.exit(main())
  File "/usr/bin/click", line 82, in main
    return mod.run(args)
  File "/usr/lib/python3/dist-packages/click/commands/install.py", line 66, in run
    quiet=not options.verbose)
  File "/usr/lib/python3/dist-packages/click/install.py", line 457, in install
    path, user=user, all_users=all_users, quiet=quiet)
  File "/usr/lib/python3/dist-packages/click/install.py", line 413, in _unpack
    **kwargs)
  File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['dpkg', '--force-not-root', '--force-bad-path', '--force-architecture', '--instdir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1', '--admindir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1/.click', '--path-exclude', '*/.click/*', '--log', '/opt/click.ubuntu.com/.click/log', '--no-triggers', '--install', '/tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click']' returned non-zero exit status 1
adt-run [13:51:52]: test test_aa-clickhook: -----------------------]
test_aa-clickhook    FAIL non-zero exit status 1


This tests attempts to install a click within the schroot (note that debian/tests/test_aa-clickhook mocks the click framework, sets apparmor_parser to /bin/true and modifies click.py to use mock_testenv = True) using:
click install --user=`getent passwd | sort -t: -nk3 | awk -F: '{if ($3 >= 500) { print $1; exit } }'` /path/to/click

The above error messages comes from clickpreload.c in the click package
which is preloaded to reject any writes (except to /dev/tty) outside of
the click install directory. For some reason, dpkg is trying to write to
/dev/pts/* (stderr?) when run under autopkgtest.

If I run the command manually (after making the aforementioned changes
test_aa-clickhook does), it works fine.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: autopkgtest 3.13
ProcVersionSignature: Ubuntu 4.1.0-1.1~rc2-generic 4.1.0
Uname: Linux 4.1.0-1-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.17.2-0ubuntu1.2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Aug 13 14:12:56 2015
InstallationDate: Installed on 2015-06-13 (60 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
PackageArchitecture: all
SourcePackage: autopkgtest
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: autopkgtest (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug vivid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1484661

Title:
  'click install' within an adt-virt-schroot fails with "Sandbox
  failure: 'click install' not permitted to write-open '/dev/pts/8'"

Status in autopkgtest package in Ubuntu:
  New

Bug description:
  This used to work and I don't know when this starting failing. If I try to run the click-apparmor autopkgtests (tried both vivid and wily) on a vivid host, then I get:
  adt-run [13:51:51]: test test_aa-clickhook: [-----------------------
  Successfully built package in './com.example.click-apparmor-test_0.1_all.click'.
  WARNING:root:debsig-verify not available; cannot check signatures
  ERROR:root:['dpkg', '--force-not-root', '--force-bad-path', '--force-architecture', '--instdir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1', '--admindir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1/.click', '--path-exclude', '*/.click/*', '--log', '/opt/click.ubuntu.com/.click/log', '--no-triggers', '--install', '/tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click'] failed with exit_code 1:
  Sandbox failure: 'click install' not permitted to write-open '/dev/pts/8'
  dpkg: error processing archive /tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click (--install):
   subprocess dpkg-deb --control returned error exit status 1
  Errors were encountered while processing:
   /tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click

  Traceback (most recent call last):
    File "/usr/bin/click", line 86, in <module>
      sys.exit(main())
    File "/usr/bin/click", line 82, in main
      return mod.run(args)
    File "/usr/lib/python3/dist-packages/click/commands/install.py", line 66, in run
      quiet=not options.verbose)
    File "/usr/lib/python3/dist-packages/click/install.py", line 457, in install
      path, user=user, all_users=all_users, quiet=quiet)
    File "/usr/lib/python3/dist-packages/click/install.py", line 413, in _unpack
      **kwargs)
    File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
      raise CalledProcessError(retcode, process.args, output=output)
  subprocess.CalledProcessError: Command '['dpkg', '--force-not-root', '--force-bad-path', '--force-architecture', '--instdir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1', '--admindir', '/opt/click.ubuntu.com/com.example.click-apparmor-test/0.1/.click', '--path-exclude', '*/.click/*', '--log', '/opt/click.ubuntu.com/.click/log', '--no-triggers', '--install', '/tmp/adttmp.sme399/com.example.click-apparmor-test_0.1_all.click']' returned non-zero exit status 1
  adt-run [13:51:52]: test test_aa-clickhook: -----------------------]
  test_aa-clickhook    FAIL non-zero exit status 1

  
  This tests attempts to install a click within the schroot (note that debian/tests/test_aa-clickhook mocks the click framework, sets apparmor_parser to /bin/true and modifies click.py to use mock_testenv = True) using:
  click install --user=`getent passwd | sort -t: -nk3 | awk -F: '{if ($3 >= 500) { print $1; exit } }'` /path/to/click

  The above error messages comes from clickpreload.c in the click
  package which is preloaded to reject any writes (except to /dev/tty)
  outside of the click install directory. For some reason, dpkg is
  trying to write to /dev/pts/* (stderr?) when run under autopkgtest.

  If I run the command manually (after making the aforementioned changes
  test_aa-clickhook does), it works fine.

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: autopkgtest 3.13
  ProcVersionSignature: Ubuntu 4.1.0-1.1~rc2-generic 4.1.0
  Uname: Linux 4.1.0-1-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.17.2-0ubuntu1.2
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Thu Aug 13 14:12:56 2015
  InstallationDate: Installed on 2015-06-13 (60 days ago)
  InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
  PackageArchitecture: all
  SourcePackage: autopkgtest
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1484661/+subscriptions



More information about the foundations-bugs mailing list