Bug 43619 - AppCenter: LockFailedException: Failed to lock /var/cache/apt/archives/lock
AppCenter: LockFailedException: Failed to lock /var/cache/apt/archives/lock
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.2-2-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-23 11:04 CET by Florian Best
Modified: 2018-10-26 17:13 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.206
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018102421000337, 2018081621000893, 2018092121000471, 2018040921000038, 2017111121000165, 2017102021000721, 2017022121000565, 2017020721000271, 2017053121000701
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-02-23 11:04:58 CET
Version: 4.1-4 errata360 (Vahr)

Remark: i am not able to install this app

Traceback(9aa68b43f0fbd6edf90c73ff5f8a34eb):
Execution of command 'appcenter/docker/progress' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 281, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 404, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 185, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 191, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 67, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 109, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 65, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 80, in _do_it
    self._register_database(app)
  File "%PY2.7%/univention/appcenter/actions/register.py", line 274, in _register_database
    database_connector.create_database()
  File "%PY2.7%/univention/appcenter/database.py", line 173, in create_database
    self.setup()
  File "%PY2.7%/univention/appcenter/database.py", line 169, in setup
    self.install()
  File "%PY2.7%/univention/appcenter/database.py", line 111, in install
    mark_packages_as_manually_installed(packages)
  File "%PY2.7%/univention/appcenter/packages.py", line 104, in mark_packages_as_manually_installed
    return get_package_manager().mark_auto(False, *pkgs)
  File "%PY2.7%/univention/lib/package_manager.py", line 500, in mark_auto
    self.commit()
  File "%PY2.7%/univention/lib/package_manager.py", line 645, in commit
    result = self.cache.commit(**kwargs)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 478, in commit
    res = self._fetch_archives(fetcher, pm)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 296, in _fetch_archives
    raise LockFailedException("Failed to lock %s" % lockfile)
LockFailedException: Failed to lock /var/cache/apt/archives/lock
Comment 1 Florian Best univentionstaff 2017-02-23 11:25:56 CET
Reported again,

Version: 4.1-4 errata386 (Vahr)

Remark: Hello, I installed ucs on a virtual server, I made updates without problems, but I tried to install owncloud 9.1, I registered an error.

We are reviewing your product, but we still do not fall in love.

regards
Comment 2 Florian Best univentionstaff 2017-05-29 14:09:02 CEST
Fixed by Bug #41303?
Comment 3 Florian Best univentionstaff 2017-06-01 09:36:44 CEST
Reported again, 4.2-0 errata26 (Lesum)
Comment 4 Florian Best univentionstaff 2017-10-23 16:48:03 CEST
Version: 4.2-1 errata197 (Lesum)
Comment 5 Johannes Keiser univentionstaff 2017-11-15 17:31:23 CET
Reported again: 4.2-2 errata157 (Lesum)
Comment 6 Florian Best univentionstaff 2017-11-20 14:45:36 CET
@Dirk: You commited the changes in 4.2-2. Please assign a milestone and adjust the YAML file.
Comment 7 Dirk Wiesenthal univentionstaff 2017-11-21 17:03:54 CET
Fixed in
  univention-lib (6.0.9-21)

This issue was solved in the underlying PackageManager. It now also locks the apt lock file.
Comment 8 Felix Botner univentionstaff 2017-11-22 14:36:46 CET
OK - code review
OK 

-> apt-get install mc
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden zusätzlichen Pakete werden installiert:
  mc-data
Vorgeschlagene Pakete:
  arj catdvi texlive-binaries dbview djvulibre-bin genisoimage gv imagemagick links w3m lynx odt2txt poppler-utils python-boto xpdf pdf-viewer
Die folgenden NEUEN Pakete werden installiert:
  mc mc-data
0 aktualisiert, 2 neu installiert, 0 zu entfernen und 35 nicht aktualisiert.
Es müssen 1.717 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 7.006 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] 

@different terminal-> univention-app install xrdp
...
E: Konnte Sperre /var/lib/dpkg/lock nicht bekommen - open (11: Die Ressource ist zur Zeit nicht verfügbar)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, wird es von einem anderen Prozess verwendet?
E: Konnte Sperre /var/lib/dpkg/lock nicht bekommen - open (11: Die Ressource ist zur Zeit nicht verfügbar)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, wird es von einem anderen Prozess verwendet?
Failed to install the App
Aborting...
...

OK - UMC
OK - YAML
Comment 9 Arvid Requate univentionstaff 2017-11-22 16:30:26 CET
<http://errata.software-univention.de/ucs/4.2/225.html>
Comment 10 Johannes Keiser univentionstaff 2018-04-27 18:52:41 CEST
Reported again: Version: 4.2-2 errata197 (Lesum)
Comment 11 Johannes Keiser univentionstaff 2018-10-04 13:20:27 CEST
Reported again: Version: 4.2-1 errata131 (Lesum)

Execution of command 'appcenter/docker/progress' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 249, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 417, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 239, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 245, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 70, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 126, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 65, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 83, in _do_it
    self._register_database(app)
  File "%PY2.7%/univention/appcenter/actions/register.py", line 341, in _register_database
    database_connector.create_database()
  File "%PY2.7%/univention/appcenter/database.py", line 173, in create_database
    self.setup()
  File "%PY2.7%/univention/appcenter/database.py", line 169, in setup
    self.install()
  File "%PY2.7%/univention/appcenter/database.py", line 111, in install
    mark_packages_as_manually_installed(packages)
  File "%PY2.7%/univention/appcenter/packages.py", line 102, in mark_packages_as_manually_installed
    return get_package_manager().mark_auto(False, *pkgs)
  File "%PY2.7%/univention/lib/package_manager.py", line 500, in mark_auto
    self.commit()
  File "%PY2.7%/univention/lib/package_manager.py", line 645, in commit
    result = self.cache.commit(**kwargs)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 501, in commit
    res = self._fetch_archives(fetcher, pm)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 322, in _fetch_archives
    raise LockFailedException("Failed to lock %s" % lockfile)
LockFailedException: Failed to lock /var/cache/apt/archives/lock
Comment 12 Johannes Keiser univentionstaff 2018-10-04 13:35:33 CEST
Reported again: Version: 4.2-1 errata131 (Lesum)
Traceback: Same as Comment 11
Comment 13 Johannes Keiser univentionstaff 2018-10-26 17:13:10 CEST
Reported again:  Version: 4.2-1 errata197 (Lesum)

Execution of command 'appcenter/docker/progress' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 249, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 417, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 239, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 245, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 70, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 126, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 65, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 83, in _do_it
    self._register_database(app)
  File "%PY2.7%/univention/appcenter/actions/register.py", line 341, in _register_database
  File "%PY2.7%/univention/appcenter/database.py", line 173, in create_database
    self.setup()
  File "%PY2.7%/univention/appcenter/database.py", line 169, in setup
    self.install()
  File "%PY2.7%/univention/appcenter/database.py", line 111, in install
    mark_packages_as_manually_installed(packages)
  File "%PY2.7%/univention/appcenter/packages.py", line 102, in mark_packages_as_manually_installed
    return get_package_manager().mark_auto(False, *pkgs)
  File "%PY2.7%/univention/lib/package_manager.py", line 500, in mark_auto
    self.commit()
  File "%PY2.7%/univention/lib/package_manager.py", line 645, in commit
    result = self.cache.commit(**kwargs)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 501, in commit
    res = self._fetch_archives(fetcher, pm)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 322, in _fetch_archives
    raise LockFailedException("Failed to lock %s" % lockfile)
LockFailedException: Failed to lock /var/cache/apt/archives/lock

Role: domaincontroller_master