timing bug creates interacctions between util-linux utitlities
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This is a creepy bug that seems to disappear under examination. In this case it appears that the bug is a timing bug, and introducing delays makes it go away. I call this sort of thing a "frankenbug" because of creepyness and difficulty diagnosing.
It appears to be an interaction between a call to sfdisk(8) and a subsequent call to lsblk(8). I have a test script that displays the bug on my systems under the right circumstances -- in particular, on my core i-7 Dell 990, it shows up when reporting on a USB 3.0 GPT stick, but not when reporting on the boot drive /dev/sda formatted with MBR.
This is a much simplified program, derived from a backup utility I've been working on. You can run it with no delays (default) or introduce delays with the -z (sleep 1) switch or the -y (sync) switch. The correct output occurs with the -z switch. In the others, the partition types are not reported. There should be no difference.
Example runs:
root@giggles:~/bin# bash test.sh sdd
label: gpt
ptv[@] is ""
ftv[@] is "ext4 swap vfat ext4 "
root@giggles:~/bin# bash test.sh -z sdd
label: gpt
ptv[@] is "0fc63daf-
ftv[@] is "ext4 swap vfat ext4 "
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: util-linux 2.34-0.1ubuntu9.1
ProcVersionSign
Uname: Linux 5.4.0-52-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Sat Oct 24 11:50:53 2020
InstallationDate: Installed on 2020-09-19 (35 days ago)
InstallationMedia: Xubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: util-linux
UpgradeStatus: No upgrade log present (probably fresh install)