Hide Forgot
Description of problem: ------------------------ Set i6300esb action as "pause", trigger it, after first time expire, system pause, in qemu monitor, run "cont", trigger i6300esb again, there is error prompt in qemu monitor immediately, and system pause without heartbeat time. Version-Release number of selected component (if applicable): -------------------------------------------------------------- qemu-kvm-0.12.1.2-2.216.el6.x86_64 How reproducible: ------------------ 100% Steps to Reproduce: --------------------- 1.boot guest with "-device i6300esb,id=watchdog -watchdog-action pause" 2.in guest "echo 0 > /dev/watchdog" 3.after heartbeat, system pause 4.in qemu monitor: (qemu) info status VM status: paused (watchdog) 5.in qemu monitor: (qemu) cont 6.in guest "echo 0 > /dev/watchdog" again 7.after step 6, system pause immediately without heartbeat time, and in qemu monitor: (qemu) i6300esb_timer_expired: I would send APIC 1 INT 10 here if I knew how (XXX) (qemu) info status VM status: paused (watchdog) Expected results: ------------------ second time pause should take heartbeat time, and no error in qemu monitor.
I'll just note here that 'echo 0 > /dev/watchdog' is not a valid way to use the watchdog API. See this document for a description of the API: http://www.mjmwired.net/kernel/Documentation/watchdog/watchdog-api.txt
Using following code to test again, still hit the problem. "-d" - open watchdog then disable it "-e" - open watchdog, enable it again (equals to open, optional), wait for reset "" - without any parameter, open watchdog then keep it from expiration /* * Watchdog Driver Test Program */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/types.h> #include <linux/watchdog.h> int fd; /* * This function simply sends an IOCTL to the driver, which in turn ticks * the PC Watchdog card to reset its internal timer so it doesn't trigger * a computer reset. */ static void keep_alive(void) { int dummy; ioctl(fd, WDIOC_KEEPALIVE, &dummy); printf("Keep it alive\n"); } static void timeleft(void) { int timeleft=0; ioctl(fd, WDIOC_GETTIMELEFT, &timeleft); printf("The time left is %d seconds\n", timeleft); } /* * The main program. Run the program with "-d" to disable the card, * or "-e" to enable the card then wait for reset, without any parameter, it enable the card then keep it alive. */ int main(int argc, char *argv[]) { int flags; int timeout; struct watchdog_info ident; fd = open("/dev/watchdog", O_WRONLY); if (fd == -1) { fprintf(stderr, "Watchdog device not enabled.\n"); fflush(stderr); exit(-1); } ioctl(fd, WDIOC_GETTIMEOUT, &timeout); printf("The timeout is %d seconds\n", timeout); timeout=10; ioctl(fd, WDIOC_SETTIMEOUT, &timeout); printf("The timeout is set to %d seconds\n", timeout); ioctl(fd, WDIOC_GETSUPPORT, &ident); printf("The driver is %s \n", ident.identity); if (argc > 1) { if (!strncasecmp(argv[1], "-d", 2)) { flags = WDIOS_DISABLECARD; ioctl(fd, WDIOC_SETOPTIONS, &flags); fprintf(stderr, "Watchdog card disabled.\n"); fflush(stderr); exit(0); } else if (!strncasecmp(argv[1], "-e", 2)) { flags = WDIOS_ENABLECARD; ioctl(fd, WDIOC_SETOPTIONS, &flags); fprintf(stderr, "Watchdog card enabled.\n"); fflush(stderr); while(1) { timeleft(); sleep(1); } } else { fprintf(stderr, "-d to disable, -e to enable.\n"); fprintf(stderr, "run by itself to tick the card.\n"); fflush(stderr); exit(0); } } else { fprintf(stderr, "Watchdog Ticking Away!\n"); fflush(stderr); } while(1) { keep_alive(); sleep(1); } }
Have to be note here, this time it may expire immediately from third or forth time, no regular pattern.
if watchdog action is reset, after guest reboot, everything works fine, seems action pause and debug is virtual machine unique action, so fix this or not would be a judgemental call, i am fine with moving this to 6.4 or closing as won't fix.
Since RHEL 6.3 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
Closing this as WONTFIX, although I believe that this is probably working upstream and just needs to be retested.