snap commands create increasing number of temporary files in /tmp

Bug #1954461 reported by Hao Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

Hi,

Recently we found an issue that each time a snap command runs a few temporary directories are created and would not be removed later, which caused over the time the number of inode in /tmp folder is 100%.

# ls -l /tmp/|wc -l
6

# ls -l /tmp
total 0
drwx------ 5 root root 100 Dec 10 16:15 netplan-config-INSDE1
drwx------ 2 root root 40 Dec 10 16:15 netplan_z147ddv1

# snap get core -d

# ls -l /tmp/|wc -l
9

# ls -l /tmp
total 0
drwx------ 5 root root 100 Dec 10 16:15 netplan-config-INSDE1
drwx------ 5 root root 100 Dec 10 16:18 netplan-config-VLB8D1
drwx------ 2 root root 40 Dec 10 16:18 netplan_hd2w8v9j
drwx------ 2 root root 40 Dec 10 16:15 netplan_z147ddv1

Regards,
Hao

Hao Wang (soccerhaotian)
description: updated
description: updated
Revision history for this message
Ian Johnson (anonymouse67) wrote :

What version of snapd was this with?

Revision history for this message
Hao Wang (soccerhaotian) wrote :

Got the output of "snap list" here:

snapd 2.53.4 14295 latest/stable canonical✓ snapd

Thanks,

Revision history for this message
Hao Wang (soccerhaotian) wrote :

Not sure if this is related, https://bugs.launchpad.net/netplan/+bug/1767464. :)

Revision history for this message
Ian Johnson (anonymouse67) wrote :

Yes that bug may be related, what version of Ubuntu Core is this with? Can you show the version of the core18 or core20 base snap you are using?

We will now run netplan for some system configuration related to `snap get system ...` so if that bug was only fixed in newer versions of netplan it may not have been SRU'd back to i.e. bionic-updates to be picked up into the core18 build.

Revision history for this message
Hao Wang (soccerhaotian) wrote :

Got it, the versions of core18 and core20 are as below:

core18 20211028 2253 latest/stable canonical✓ base
core20 20211129 1270 latest/stable canonical✓ base

Thanks,

Revision history for this message
Ian Johnson (anonymouse67) wrote :

Can you specify what version of Ubuntu Core you are using?

I can reproduce these netplan directories being created every time `netplan apply` is invoked on Ubuntu Core 18, though I cannot reproduce those directories being created by running `snap get system`.

Revision history for this message
Hao Wang (soccerhaotian) wrote (last edit ):

I'm using Ubuntu Core 20 and the kernel is:
# uname -a
Linux test 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Hao Wang (soccerhaotian) wrote :

and "netplan apply" also increase the number of temporary files.

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.