Auto-update system fails to get lock /var/cache/apt/archives/lock

Bug #21479 reported by Evandro Pastor on 2005-09-12
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Medium
Michael Vogt

Bug Description

When i use tray icon system to update packages, a window is open with this message:

E: Could not get lock /var/cache/apt/archives/lock - open (11 Recurso temporariamente
indisponível)
E: Impossível trancar o diretório de "download"

But, I can do a upgrade packages using apt-get.

My system:
 Linux phoenix 2.6.12-8-k7 #1 Tue Aug 30 23:29:08 BST 2005 i686 GNU/Linux
 Ubuntu 5.10 breezy

Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Do you get a password dialog before you get the error message? Can you please
make a screenshot of the error messsage so that I get a idea from what package
the message comes? Do those tools in System/Administration work: Synaptic,
Update Manager?

Thanks,
 Michael

Created an attachment (id=3762)
error dialog from update manager

This screenshot is taked from error dialog come from update manager

Michael Vogt (mvo) wrote :

Thanks for the screenshot.

Can you please tell me if a apt is maybe running in the background. Run a in a
terminal:
$ ps ax | grep apt

It may be a apt is auto-downloading the packages/indexfiles in the background.

(In reply to comment #1)
> Thanks for your bugreport.
>
> Do you get a password dialog before you get the error message?

yes

>Can you please
> make a screenshot of the error messsage so that I get a idea from what package
> the message comes?
sended

>Do those tools in System/Administration work: Synaptic,
> Update Manager?
>
I make some tests, and I receive this error from both of them. I've tried
upgrade my system using terminal yesterday, and I don't have any problems to do
that. Today I'm tried to upgrade my system using Synaptic and Update-Manager.
I've make a test: using terminal I update a apt after that, I used a Sinaptic
and Update-manager, and they work whitout any problems.

> Thanks,
> Michael

Tks

Evandro Pastor

Michael Vogt (mvo) wrote :

(In reply to comment #4)
> (In reply to comment #1)
> >Do those tools in System/Administration work: Synaptic,
> > Update Manager?
> >
> I make some tests, and I receive this error from both of them. I've tried
> upgrade my system using terminal yesterday, and I don't have any problems to do
> that. Today I'm tried to upgrade my system using Synaptic and Update-Manager.
> I've make a test: using terminal I update a apt after that, I used a Sinaptic
> and Update-manager, and they work whitout any problems.

Thanks for this additional information. Do I understand that correctly? Does
that mean that today apt,synaptic,update-manager work? And yesterday synaptic,
update-manager did not work but apt itself worked?

Thanks,
 Michael

(In reply to comment #3)
> Thanks for the screenshot.
>
> Can you please tell me if a apt is maybe running in the background. Run a in a
> terminal:
> $ ps ax | grep apt
>
To do that, I need to reproduce this error. When I do an `apt-get update` via
terminal, I can do a upgrade via Synaptic or Update-Manager. After this
procedure, I can't. That's why i take some time to answer your e-mails. I can
reproduce this bug just once time a day... In a first update of the day. Do you
have any idea how-to reproduce this error?

> It may be a apt is auto-downloading the packages/indexfiles in the background.

I can do that tomorow...

Evandro Pastor

Michael Vogt (mvo) wrote :

(In reply to comment #6)
> (In reply to comment #3)
[..]
> > It may be a apt is auto-downloading the packages/indexfiles in the background.
>
> I can do that tomorow...

Thats fine, thanks.

Cheers,
 Michael

Yesterday i've upgrade upgrade-manager package to a 2.12.0.1 version. Do it
probaly solve the problem, because I dont receive any popup alert from system.
Anyway I'm keep wathing... Any change I mail you.

Tks

Evandro Pastor

alexander botero (alex-botero) wrote :

1) Gnome's update-manager reports "/var/cache/apt/archives/lock" error in
Breeze-preview.

Update-managet should delete the "/var/cache/apt/archives/lock" after it quits
(normally or killed).
-------------------------

2) --version option reports wrong version string ;-)

Get help:
$ sudo update-manager -?
...
...
 --version 2.12.0.1 <---

--------------------------------------
And this:

$ sudo update-manager --version
Gnome update-manager 0.39 <---

Cheers
  Alex ;)

(In reply to comment #9)
> 1) Gnome's update-manager reports "/var/cache/apt/archives/lock" error in
> Breeze-preview.
>
> Update-managet should delete the "/var/cache/apt/archives/lock" after it quits
> (normally or killed).

It's happened again!!! I've activate update-manager, and aways return that
message. I get some informations using 'ps aux|grep apt':

root 6606 0.0 0.2 2396 1148 ? SNs 07:21 0:00 /bin/sh
/etc/cron.daily/apt
root 6657 0.2 1.8 11272 9300 ? SN 07:22 0:00 apt-get -qq -d
dist-upgrade
root 6662 0.2 0.3 3640 1716 ? SN 07:22 0:00
/usr/lib/apt/methods/http
root 6700 9.7 5.3 41444 27436 ? S 07:23 0:01
/usr/sbin/synaptic --hide-main-window --non-interactive --plug-progress-into
524321 31 --set-selections --progress-str The updates are being applied.
--finish-str Upgrade terminado
 evandro 6723 0.0 0.1 2912 668 pts/0 R+ 07:24 0:00 grep apt

After using 'sudo su' only, whitout any other comand, I tried to use a
update-manager again, an it works, look what I get from anoter 'ps aux|grep apt'

root 6700 0.2 5.3 41444 27436 ? S 07:23 0:01
/usr/sbin/synaptic --hide-main-window --non-interactive --plug-progress-into
52432131 --set-selections --progress-str The updates are being applied.
--finish-str Upgrade terminado
evandro 7307 0.0 0.1 2796 740 pts/0 D+ 07:34 0:00 grep apt

And lock arquive don't be deleted after update...

$ ls -lah /var/cache/apt/archives/|grep lock
-rw-r----- 1 root root 0 2005-09-15 07:38 lock

> -------------------------
>
> 2) --version option reports wrong version string ;-)
>
> Get help:
> $ sudo update-manager -?
> ...
> ...
> --version 2.12.0.1 <---
>
> --------------------------------------
> And this:
>
> $ sudo update-manager --version
> Gnome update-manager 0.39 <---
>
Sorry Alex, You are right, I'm using 0.39 version... Thanks for the tip.

> Cheers
> Alex ;)
>

Tks

Evandro Pastor

Matt Zimmerman (mdz) wrote :

You have apt set up to download available updates on a nightly basis. You can't
update the system at the same time that job is running (by default it starts at
0630 or so)

(In reply to comment #11)
> You have apt set up to download available updates on a nightly basis. You can't
> update the system at the same time that job is running (by default it starts at
> 0630 or so)

I just do upgrade when update-manager show me a alert. Now even using apt-get
via terminal i can't do a upgrade. I grab these messages using ps.

# ps aux|grep update
evandro 6414 0.0 1.9 18748 9892 ? Ss 07:47 0:00 update-notifier
--sm-config-prefix /update-notifier-SOogbm/ --sm-client-id
11c0a80003000112117418200000074670005 --screen 0
evandro 6883 0.3 1.8 21924 9724 ? S 08:05 0:00 /usr/bin/gksudo
--message Por favor, digite a sua senha para executar:? Mostrar atualizações
/usr/bin/update-manager
root 6885 5.5 9.4 74540 48672 ? Ss 08:05 0:03 python2.4
/usr/bin/update-manager
root 6932 0.0 0.1 2964 792 pts/0 R+ 08:06 0:00 grep update

# ps aux |grep apt-get
root 6637 0.0 1.8 11320 9416 ? SN 07:53 0:00 apt-get -qq -d
dist-upgrade
root 7053 0.0 0.1 2912 648 pts/0 R+ 08:13 0:00 grep apt-get

In gnome I receive this message:

E: Could not get lock /var/cache/apt/archives/lock - open (11 Recurso
temporariamente indisponível)
E: Impossível trancar o diretório de "download"

And via console:

E: Could not get lock /var/cache/apt/archives/lock - open (11 Recurso
temporariamente indisponível)
E: Impossível trancar o diretório de "download"

I just can do a upgrade if I rename or remove a lock file.

Evandro Pastor

Karl Hegbloom (karl.hegbloom) wrote :

I get the same error when I run update manager from the administration menu,
right after I modify the repository lists using the configuration button. It
lets me edit the list, then afterward offers to update the packages listing. It
cannot, saying that it cannot get the lock. Then I'm back at the main screen,
and the Refresh button works fine. My guess is that update manager has the lock
and some other tool is run to update the packages listing and it cannot get the
lock. Instead of another program being run, why not have update manager perform
the equivalent of 'apt-get update' itself? Seems to me that must be part of the
libapt.

Michael Vogt (mvo) wrote :

Can you still reproduce this on dapper?

Thanks,
 Michael

Carthik Sharma (carthik) wrote :

Closing this bug since there has been no response since Dapper! Please reopen this if the problem still persists with Edgy, or better still, Feisty.

Thank you for reporting this bug.

Changed in update-manager:
status: Needs Info → Rejected
ayoub (baron98) on 2016-07-15
Changed in update-manager (Ubuntu):
status: Invalid → New
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.