Linux rtc self test fails in a VM under xenial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
Seth Forshee | ||
Xenial |
Fix Released
|
High
|
Seth Forshee |
Bug Description
== SRU Justification ==
Impact: A race in kvm can result in the EOI signal for the rtc irq to be lost. After this happens no more rtc interrupts will be delivered to the guest.
Fix: Three upstream cherry picks which fix the problem.
Regression Potential: These patches have been upstream since 4.6, so they're well-tested at this point. Thus regressions are unlikely.
---
ADT testing for the linux package hangs at the kernel's rtc selftest, for example:
Running this test manually, I've observed that this will hang in me with various kernel versions going back to 4.4 in a VM on my machine which is running xenial. The test runs to completion in a VM on a different machine running zesty.
This is the section of the test which produces the hang:
/* Turn on update interrupts (one per second) */
retval = ioctl(fd, RTC_UIE_ON, 0);
if (retval == -1) {
if (errno == EINVAL) {
}
}
for (i=1; i<6; i++) {
/* This read will block */
if (retval == -1) {
}
}
The read blocks indefinitely most of the time. After boot it might return once or twice before it hangs, but running the test subsequently always hangs on the first read. I'll attach the full source for the test (rtctest.c).
description: | updated |
Changed in linux (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
Can you attach the qemu version, kernel version and qemu command line used?
A quick search shows this possibly related bug in RHEL:
https:/ /bugzilla. redhat. com/show_ bug.cgi? id=1184691
Which was closed WONTFIX with no reason. More digging is required.
On Wed, Dec 14, 2016 at 12:02 AM, Seth Forshee <
<email address hidden>> wrote:
> Public bug reported: /objectstorage. prodstack4- 5.canonical. com/v1/ AUTH_ 9a74ba3b87153c0 ac zesty/zesty/ amd64/l/ linux/20161212_ 132117_ a258d@/ log.gz /bugs.launchpad .net/bugs/ 1649718/ +attachment/ +files/ rtctest. c /bugs.launchpad .net/bugs/ 1649718 /bugs.launchpad .net/ubuntu/ +source/ qemu/+bug/ 1649718/ +subscriptions
>
> ADT testing for the linux package hangs at the kernel's rtc selftest,
> for example:
>
> https:/
> 77e2ada1e7a8492
> /autopkgtest-
>
> Running this test manually, I've observed that this will hang in me with
> various kernel versions going back to 4.4 in a VM on my machine which is
> running xenial. The test runs to completion in a VM on a different
> machine running zesty.
>
> This is the section of the test which produces the hang:
>
> /* Turn on update interrupts (one per second) */
> retval = ioctl(fd, RTC_UIE_ON, 0);
> if (retval == -1) {
> if (errno == EINVAL) {
> fprintf(stderr,
> "\n...Update IRQs not supported.\n");
> goto test_READ;
> }
> perror("RTC_UIE_ON ioctl");
> exit(errno);
> }
>
> fprintf(stderr, "Counting 5 update (1/sec) interrupts from reading
> %s:",
> rtc);
> fflush(stderr);
> for (i=1; i<6; i++) {
> /* This read will block */
> retval = read(fd, &data, sizeof(unsigned long));
> if (retval == -1) {
> perror("read");
> exit(errno);
> }
> fprintf(stderr, " %d",i);
> fflush(stderr);
> irqcount++;
> }
>
> The read blocks indefinitely most of the time. After boot it might
> return once or twice before it hangs, but running the test subsequently
> always hangs on the first read. I'll attach the full source for the test
> (rtctest.c).
>
> ** Affects: qemu (Ubuntu)
> Importance: Undecided
> Status: New
>
> ** Attachment added: "rtctest.c"
> https:/
> 4791346/
>
> --
> You received this bug notification because you are subscribed to qemu in
> Ubuntu.
> https:/
>
> Title:
> Linux rtc self test fails in a VM under xenial
>
> To manage notifications about this bug go to:
> https:/
>