Mantis - Resin
Viewing Issue Advanced Details
4308 minor always 11-30-10 08:46 01-12-11 13:34
closed 4.0.13  
none 4.0.15  
0004308: Resin Instance Restarts Several Times During OS Reboot
During an OS reboot, Resin instances are being stopped and started several times. I did not see a serious functional problem because instances do seem to start correctly after the OS reboot finishes. However, the extra stops/starts may be due to a bug and are also very confusing in the log entries.

This might be due to a synchronization problem between OS reboot, start/stop command timing/sequence, Resin instance start/stop and watchdog start/stop.

Attached are log entries demonstrating the problem. I used the following steps to reproduce the problem:

1. Setup resin to start/stop with the OS.
2. Start instance manually via the "start" command.
3. Check that instance is up and running.
4. Wait a few minutes.
5. Reboot the OS.
6. Check that instance is up and running.
7. Wait a few minutes.
8. Stop instance manually via the "stop" command.

Reported by:
 watchdog-manager.log [^] (4,543 bytes) 11-30-10 08:46
 jvm-default.log [^] (279,230 bytes) 11-30-10 08:47
 access.log [^] (3,016 bytes) 11-30-10 08:47

01-12-11 13:33   
[2010/11/29 20:40:51.000] {watchdog-} Watchdog detected close of Resin[,pid=0]
                                        exit reason: signal=15 (exit code=143)

Signal 15 is a SIGTERM.

On windows, SIGTERM is sent when a user logs in or logs out, and the JVM's default behavior is to exit without notice.

The fix is to add a -Xrs (in WatchdogChildProcess) so the JVM won't exit itself when someone logs in or out.