Apt update not working anymore

Gamienator

Member
Mar 16, 2021
41
6
13
33
Hey there,

for a couple of days my proxmox Hypervisor isn't able to update apt :confused:.

This is my current output:

Code:
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 3885896 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/


When I kill the process and run apt update its getting stuck on the following screen for hours...

Code:
root@proxmox1:~# apt update
Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://ftp.de.debian.org/debian bookworm InRelease                             
Hit:3 http://download.proxmox.com/debian/pve bookworm InRelease                     
Hit:4 http://ftp.de.debian.org/debian bookworm-updates InRelease
0% [Working]


Does anybody got an idea what could go wrong?
 
Hi,
Code:
root@proxmox1:~# apt update
Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://ftp.de.debian.org/debian bookworm InRelease                            
Hit:3 http://download.proxmox.com/debian/pve bookworm InRelease                    
Hit:4 http://ftp.de.debian.org/debian bookworm-updates InRelease
0% [Working]
do you have other repositories configured beside those four? It might be stuck connecting to/querying the next one.
 
What is the output of ps aux | grep "apt\|dpkg"? Can you run strace apt update &> /tmp/apt-strace.log and share the resulting file (or tail -n 100 /tmp/apt-strace.log if it's too big)?
 
Heyho,
sorry for the late reply! Private life was turbulent :eek:

What is the output of ps aux | grep "apt\|dpkg"?

Code:
root@proxmox1:~# ps aux | grep "apt\|dpkg"
100000   2209312  0.0  0.0   4476  2176 ?        S    10:03   0:00 /bin/bash ./mk_apt
100000   2209313  0.0  0.0   4476  1276 ?        S    10:03   0:00 /bin/bash ./mk_apt
100000   2209314  0.0  0.0  13612  5760 ?        S    10:03   0:00 apt-get update -qq
100100   2209317  0.0  0.0  19280  5888 ?        S    10:03   0:00 /usr/lib/apt/methods/http
100100   2209318  0.0  0.0  19280  6016 ?        S    10:03   0:00 /usr/lib/apt/methods/http
100100   2209326  0.0  0.0  12380  4480 ?        S    10:03   0:00 /usr/lib/apt/methods/gpgv
root     2217898  0.0  0.0   7456  2560 ?        S    10:04   0:00 /bin/bash ./mp_apt
root     2217899  0.0  0.0   7456  1388 ?        S    10:04   0:00 /bin/bash ./mp_apt
root     2217900  0.0  0.0  16592  6912 ?        S    10:04   0:00 apt-get update -qq
_apt     2217903  0.0  0.0  22264  7424 ?        S    10:04   0:00 /usr/lib/apt/methods/http
_apt     2217905  0.0  0.0  22264  7168 ?        S    10:04   0:00 /usr/lib/apt/methods/http
_apt     2217906  0.0  0.0  22264  7296 ?        S    10:04   0:00 /usr/lib/apt/methods/http
_apt     2217908  0.0  0.0  15360  5376 ?        S    10:04   0:00 /usr/lib/apt/methods/gpgv
100100   2240445  0.0  0.0  12380  3084 ?        S    10:06   0:00 /usr/lib/apt/methods/gpgv
100100   2240446  0.0  0.0   2576  1280 ?        S    10:06   0:00 /bin/sh /usr/bin/apt-key --quiet --readonly verify --status-fd 3 /tmp/apt.sig.OOwWMi /tmp/apt.data.oEaJSW
100100   2240535  0.0  0.0   3468  1280 ?        D    10:06   0:00 cp -a /tmp/apt-key-gpghome.J1gBFSjVE0/pubring.gpg /tmp/apt-key-gpghome.J1gBFSjVE0/pubring.orig.gpg
_apt     2247333  0.0  0.0  15360  3088 ?        S    10:07   0:00 /usr/lib/apt/methods/gpgv
_apt     2247350  0.0  0.0   2576  1536 ?        S    10:07   0:00 /bin/sh /usr/bin/apt-key --quiet --readonly verify --status-fd 3 /tmp/apt.sig.mALuEw /tmp/apt.data.dk4qeX
_apt     2247577  0.0  0.0   3468  1792 ?        D    10:07   0:00 cp -a /tmp/apt-key-gpghome.sL2UC5YnPH/pubring.gpg /tmp/apt-key-gpghome.sL2UC5YnPH/pubring.orig.gpg
root     2274123  0.0  0.0   6332  1792 pts/0    S+   10:10   0:00 grep apt\|dpkg

Can you run strace apt update &> /tmp/apt-strace.log and share the resulting file (or tail -n 100 /tmp/apt-strace.log if it's too big)?
I added a attachment :)
 

Attachments

  • apt.txt
    279.7 KB · Views: 2
Make shure all apt and dpkg processes are killed.

Find all remaining lock files from those processes

find /var -type f -name lock

and remove them (only of they Belang to apt and dpkg)

Try apt Update

and apt upgrade again
 
Thats the Problem ... nothing is locked! When I remove all sources from the apt list its working fine. It seems to me that my Proxmox is not able to proccess the packages
 
Okay, a new update. After making sure no process is running I noticed: apt-update takes 30 Minutes to fetch all! That is way to long ... I'll change some sources maybe :/
 
Hey there,
found the issue. One of the SystemSSD war failing, so the IO Load was beyond good and evil. Swapping the SSD fixed everything.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!