getitimer returns it_value=0 erroneously
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Colin Ian King | ||
Trusty |
Fix Released
|
Undecided
|
Colin Ian King | ||
Utopic |
Fix Released
|
Medium
|
Colin Ian King | ||
Xenial |
Fix Released
|
Undecided
|
Thadeu Lima de Souza Cascardo | ||
Bionic |
Fix Released
|
Undecided
|
Thadeu Lima de Souza Cascardo | ||
Eoan |
Fix Released
|
Undecided
|
Thadeu Lima de Souza Cascardo | ||
Focal |
Fix Released
|
Medium
|
Colin Ian King |
Bug Description
According to the 'getitimer()' man page: "The element it_value is set to the amount of time remaining on the timer, or zero if the timer is disabled. Similarly, it_interval is set to the reset value."
As such the following Perl program should never exit:
use Time::HiRes;
$SIG{VTALRM} = sub { };
Time:
while (1) {
my @t = Time::HiRes:
exit 0 if $t[0] == 0;
}
and on linux-image 3.11.0-18-generic (and all other systems tested) it loops forever but 3.13.0-32-generic it exits. Have not bisected between those kernels, nor am I likely to be able to do so soon.
This Perl program shows the timer countdown:
use Time::HiRes;
my $r = [Time::
sub display {
my ($desc) = @_;
my @t = Time::HiRes:
my $i = Time::HiRes:
printf "%s: elasped=%.8f; time left=%.6f reset time=%.6f\n", $desc,
$i,@t;
}
$SIG{VTALRM} = sub {
display(
exit;
};
Time::HiRes:
while (1) {
display(
}
on other (working) systems it gives:
inloop: elasped=1.65178400; time left=0.001000 reset time=0.401000
inloop: elasped=1.65184200; time left=0.001000 reset time=0.401000
inloop: elasped=1.65186800; time left=0.001000 reset time=0.401000
inloop: elasped=1.65192300; time left=0.001000 reset time=0.401000
inloop: elasped=1.65198100; time left=0.001000 reset time=0.401000
VTALRM: elasped=1.65209800; time left=0.400000 reset time=0.401000
(end of file)
but on the 3.13.0-32-generic or later kernel I get:
inloop: elasped=0.54692100; time left=0.000033 reset time=0.400000
inloop: elasped=0.54692800; time left=0.000026 reset time=0.400000
inloop: elasped=0.54693500; time left=0.000020 reset time=0.400000
inloop: elasped=0.54694100; time left=0.000013 reset time=0.400000
inloop: elasped=0.54694800; time left=0.000007 reset time=0.400000
inloop: elasped=0.54695500; time left=0.000000 reset time=0.400000
inloop: elasped=0.54696200; time left=0.004000 reset time=0.400000
[...]
VTALRM: elasped=0.55013600; time left=0.397062 reset time=0.400000
(end of file)
The reset time also looks dodgy.
Hardware is an Intel Core i7-920 on Asus P6T Deluxe v2 (X58) motherboard and hasn't changed.
Requested information:
Ubuntu 3.13.0-
Description: Ubuntu 14.04.1 LTS
Release: 14.04
# apt-cache policy linux-image-generic
linux-image-
Installed: 3.13.0.32.38
Candidate: 3.13.0.32.38
Version table:
*** 3.13.0.32.38 0
500 http://
500 http://
500 http://
500 http://
100 /var/lib/
3.13.0.24.28 0
500 http://
---
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
DistroRelease: Ubuntu 14.04
HibernationDevice: RESUME=
IwConfig:
eth0 no wireless extensions.
eth1 no wireless extensions.
lo no wireless extensions.
MachineType: System manufacturer System Product Name
Package: linux (not installed)
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: root=UUID=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.127.5
RfKill:
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
Tags: trusty
Uname: Linux 3.13.0-32-generic x86_64
UpgradeStatus: Upgraded to trusty on 2014-06-10 (46 days ago)
UserGroups: adm admin cdrom dialout lpadmin mythtv plugdev sambashare vboxusers
WifiSyslog: Jul 26 20:23:08 zwei NetworkManager[
WpaSupplicantLog:
_MarkForUpload: True
dmi.bios.date: 02/04/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0203
dmi.board.
dmi.board.name: P6T DELUXE V2
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: System Product Name
dmi.product.
dmi.sys.vendor: System manufacturer
tags: | added: needs-bisect regression-update |
tags: | added: bios-outdated-1202 |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in linux (Ubuntu Trusty): | |
assignee: | nobody → Colin Ian King (colin-king) |
status: | New → Fix Committed |
Changed in linux (Ubuntu Utopic): | |
status: | Incomplete → Fix Committed |
Changed in linux (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in linux (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in linux (Ubuntu Eoan): | |
status: | New → In Progress |
assignee: | nobody → Thadeu Lima de Souza Cascardo (cascardo) |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → Thadeu Lima de Souza Cascardo (cascardo) |
Changed in linux (Ubuntu Xenial): | |
assignee: | nobody → Thadeu Lima de Souza Cascardo (cascardo) |
Changed in linux (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Eoan): | |
status: | In Progress → Fix Committed |
tags: |
added: verification-done-eoan removed: verification-needed-eoan |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
tags: |
added: verification-done-xenial removed: verification-needed-xenial |
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1349028
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.