/srv/irclogs.ubuntu.com/2013/05/01/#upstart.txt

nanvouhello, I have a problem with upstart on Ubuntu 12.0419:38
nanvoueven though I submitted a "respaw" stanza, if the program terminate somehow, upstart won't reload it19:39
nanvouthere's no script and only one "exec" stanzas...19:42
nanvouanyone ?19:54
SpamapSnanvou: respawn only respawns on abnormal exit20:01
SpamapSnanvou: make sure you read the respawn section carefully in 'man 5 init'20:01
nanvouprocess exits with 13920:02
SpamapSnanvou: nothing in syslog about it?20:02
nanvouyes20:03
nanvouit syslog says it segfault20:03
nanvouwhich is normal20:03
SpamapSnanvou: segfault is also a reason to respawn (SIGSEGV)20:03
nanvouwhat isn't normal is that segfault is detected by system but upstart won't do anything about it and let the program stay stopped20:04
SpamapSnanvou: it is not marked 'task' right? and there's no 'normal exit' stanza?20:04
nanvouI ran the program manually. It does SEGFAUT with status code "139"20:04
nanvouSpamapS, http://paste.ubuntu.com/5623801/20:05
SpamapSnanvou: indeed, upstart should be respawning that on segfault20:06
SpamapSnanvou: and syslog says, exactly?20:06
nanvou"kernel: [4526394.732639] segfaultest[25199]: segfault at fffffff7 ip bf9e085c sp bf9e085c error 420:06
nanvou"20:07
SpamapSthats kernel20:07
SpamapSnanvou: upstart would log as init:20:07
SpamapSnanvou: if the program is daemonizing before the segfault, you don't have 'expect fork', so upstart will lose track of it20:08
nanvouin fact it doesn't daemonize at all20:08
SpamapSnanvou: initctl log-priority info should show more of what init: is doing20:12
nanvouwhere should I wait for logs ?20:13
SpamapSsyslog20:14
nanvouSpamapS, http://paste.ubuntu.com/5623839/20:19
SpamapSnanvou: hah, so it did respawn20:20
SpamapSnanvou: eventually it gave up, respawning too fast20:20
nanvouah ok20:21
nanvouso how do I imply some waiting time ?20:21
nanvoucan I use multiple exec statement N20:25
nanvou*?20:25
nanvoulike "exec sleep 10" ?20:25
SpamapSnanvou: respawn limit20:26
SpamapSnanvou: man 5 init explains it20:26
nanvouyes, but I don't want to limit the respawns themselves, more like the time between the respawns20:27
SpamapSnanvou: ah, post-start I think can achieve that. What is the point tho?20:27
SpamapSnanvou: if you have a program this unstable.... 20:28
nanvouI'll make it better in the future20:28
SpamapSyeah but upstart is not the answer20:28
nanvouright now, I just need upstart to be able to respawn it not too fast20:29
SpamapSnanvou: just make a wrapper that always respawns it20:29
nanvoummh20:29
SpamapSthe upstart respawning is for *unexpected* fail20:29
nanvouyes, that sounds like a possibility20:29
nanvouSpamapS, thanks for the help20:49
SpamapSnanvou: any time20:50

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!