Public bug reported:

Bug Report: lsblk -f enters infinite output loop due to loop device
handling issue


Summary

lsblk -f causes an infinite output loop and does not terminate on Ubuntu
24.04.4 LTS. The command continuously prints blank lines until manually
interrupted with Ctrl+C.

The issue appears to be related to filesystem information probing of
loop devices.


System Information

Operating System: Ubuntu 24.04.4 LTS
Hardware: Intel Core i5-4210U, 4GB RAM, 500 GB HDD
lsblk version: lsblk from util-linux 2.39.3


Problem Description

1. When running ' lsblk -f ' the command does not complete. Instead, the 
terminal continuously prints blank lines indefinitely.
2. The command has to be stopped manually using Ctrl+C
3. The normal lsblk command may also reproduce the issue.


Steps to Reproduce

1. Boot Ubuntu 24.04.4 LTS.
2. Open Terminal.
3. Run lsblk -f
4. Observe that the command does not return to the shell prompt.
5. Terminal continues printing blank lines until interrupted.


Expected Behaviour

lsblk -f should display block devices with filesystem information and
then exit normally.

Example:

NAME   FSTYPE LABEL UUID                     MOUNTPOINTS
sda
├─sda1 ntfs
├─sda2 ntfs
├─sda4 ext4
└─sda6 ext4                                      /


Actual Behaviour

lsblk -f enters an endless loop and continuously outputs blank lines.

The command never finishes without user interruption.


Additional Tests

1. lsblk version

Command: lsblk --version
 Output: lsblk from util-linux 2.39.3

2. Full block device listing

Command: lsblk -a
Output shows a large number of loop devices:

loop0  7:0   201.3M loop /snap/brave/661
loop1  7:1   201.3M loop /snap/brave/658
...
loop56 7:56 182.3M loop /snap/yt-dlp/1337
loop57 7:57 0B loop

The system contains 58 loop devices:

/dev/loop0
...
/dev/loop57

Most are Snap package loop mounts.

3. Loop devices

Command: ls /dev/loop*
Output confirms the presence of:

/dev/loop0
/dev/loop1
...
/dev/loop57
/dev/loop-control


Disk Layout

Output from lsblk -a:

sda      465.8G disk

├─sda1   100M   part
├─sda2   90G    part
├─sda3   512B   part
├─sda4   185.4G part
├─sda5   3G     part
└─sda6   187.2G part /

Additional devices:

sr0      1024M rom
zram0    2.8G   swap


Other Storage Tools Tested

The following tools work normally:

blkid
fdisk
GParted

They correctly detect partitions and filesystems.
The problem appears limited to lsblk.


Possible Cause

The problem may be caused by lsblk filesystem probing entering an
infinite loop while processing loop devices created by Snap packages.

The presence of:
loop57  7:57  0B loop
may also be relevant.


Additional Information

The executable being used:

Command: type lsblk
 Output: lsblk is /usr/bin/lsblk


Requested Investigation

Please investigate whether util-linux lsblk in Ubuntu 24.04.4 LTS has an
issue handling loop devices or filesystem probing when a large number of
Snap loop mounts are present.

I can provide additional debugging information if required.


Attachments / Additional Logs Available

Can provide:

journalctl -b
dmesg
udevadm info
lsblk --json
lsblk --fs

if required.


-End of Report-

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: util-linux 2.39.3-9ubuntu6.5
ProcVersionSignature: Ubuntu 6.8.0-136.136-generic 6.8.12
Uname: Linux 6.8.0-136-generic x86_64
ApportVersion: 2.28.2-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: MATE
Date: Mon Jul 27 08:03:08 2026
InstallationDate: Installed on 2019-07-21 (2562 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: util-linux
UpgradeStatus: Upgraded to noble on 2024-05-22 (795 days ago)

** Affects: util-linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2161864

Title:
  lsblk -f gives endless loop of blank prints

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/2161864/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to