#1059813 qterminal: /tmp/ storage not released

Package:
qterminal
Source:
qterminal
Description:
Lightweight Qt terminal emulator
Submitter:
ael
Date:
2024-01-02 10:18:03 UTC
Severity:
normal
#1059813#5
Date:
2024-01-01 20:44:38 UTC
From:
To:
After running rsync from an instance of qterminal, the /tmp/
filesystem was full:-

# df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           984M  984M     0 100% /tmp

However, there were no files shown in /tmp/ using ls -l and
lsof /tmp also only showed deleted entries. But df still showed no
available space and no new files could be created in /tmp/.

/tmp had the usual options:
findmnt /tmp gave

TARGET SOURCE FSTYPE OPTIONS
/tmp   tmpfs  tmpfs  rw,nosuid,nodev,relatime,inode64

Closing the instance of qterminal released the memory:

# df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           984M  100K  984M   1% /tmp

I do not know what was using the /tmp space, but presumably rsync.
Because this system has only about 2GB of RAM, the /tmp directory filled
up, although I thought it was supposed to start swapping in some (these?)
circumstances.

I am filling this against qterminal just because closing it corrected
the problem: perhaps some lock/mutex/semaphore was released?

I experimented with dd under a qterminal to fill /tmp/ and the deleted
the file and that worked properly. The /tmp/ storage was released.

#1059813#10
Date:
2024-01-02 10:16:02 UTC
From:
To:
I now think that this may be a generic bug in qterminal failing to
release storage in /tmp/.

Just now I simply opened a qterminal, did a few listings and noted

# df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           984M   20M  965M   2% /tmp

I then closed that qterminal and found the /tmp was only using 120K
instead of 20M.

I hope to have time to investigate further and try the same prodcedure
in an instance of lxterminal.

For what it is worth, lsof on /tmp shows

COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
lsof       1205 root    1w   REG   0,27        0  604 /tmp/bug.2
qterminal  6887  ael   20u   REG   0,27      892   20 /tmp/#20 (deleted)
qterminal  6887  ael   23u   REG   0,27   132544   21 /tmp/#21 (deleted)
qterminal  6887  ael   26u   REG   0,27      223   22 /tmp/#22 (deleted)
qterminal  6887  ael   37u   REG   0,27        0  492 /tmp/#492 (deleted)
qterminal  6887  ael   39u   REG   0,27      132  399 /tmp/#399 (deleted)
qterminal  6887  ael   42u   REG   0,27        0  493 /tmp/#493 (deleted)
qterminal  6887  ael   44u   REG   0,27    22768  400 /tmp/#400 (deleted)
qterminal  6887  ael   45u   REG   0,27        0  494 /tmp/#494 (deleted)
qterminal  6887  ael   46u   REG   0,27       33  401 /tmp/#401 (deleted)
qterminal  6887  ael   47u   REG   0,27        0  433 /tmp/#433 (deleted)
qterminal  6887  ael   52u   REG   0,27        0  434 /tmp/#434 (deleted)
qterminal  6887  ael   54u   REG   0,27        0  435 /tmp/#435 (deleted)

That was with several instances of qterminal running.