/usr/bin/unattended-upgrade leaking and saturating RAM in 30 seconds

Bug #2029120 reported by Aurélien
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hello,
We are facing a huge memory leak with unattended-upgrade binary. It appears that in around 20s, 2.9Go (80%) of RAM is consumed by the process making the system unresponsive (even a basic 'ps' command remains stuck).
The swap was voluntarily disabled, but anyway I do not expect such a process to consume up to 3Go of RAM in nominal operation.

Note: the logs were captured on a system configured in French. I manually translated some words below, which could explain it is not exactly what you would have on an english based system.

Ubuntu release:
Description: Ubuntu 22.04 LTS
Release: 22.04

Package version:
unattended-upgrades:
  Installed : 2.8ubuntu1
  Candidate : 2.8ubuntu1
 Version table :
 *** 2.8ubuntu1 500
        500 http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        500 http://fr.archive.ubuntu.com/ubuntu jammy/main i386 Packages
        100 /var/lib/dpkg/status

In attachment you will find 2 files:
- periodic monitoring of available memory (with free -m)
- periodic monitoring of highest memory consumer processes (with ps + sort on memory column)
- screenshot of syslog (from a distinct run) showing that unattended-upgr went out of memory and was killed by OOM. You can also see that the run occured as part of the apt-daily service.

Revision history for this message
Aurélien (aurelien-fr) wrote :
Revision history for this message
Aurélien (aurelien-fr) wrote :
Revision history for this message
Aurélien (aurelien-fr) wrote :
description: updated
Revision history for this message
Ronald Baker (rabbit200) wrote :

Hello, I notice the same problem as reported by Aurélien. It happens daily at the time the unattended upgrades are scheduled. Sometimes it lasts only a minute, sometimes longer. But when it occurs at a moment that an unresponsive system is not acceptable, this causes problems. It consumes 90% memory (32 Gb RAM - swapfile is twice that size)! Until now I didn't notice an out of memory for that process, but it seems that it keeps growing until it fills the whole memory available.

Ubuntu 22.04.3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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