[19:38] <nanvou> hello, I have a problem with upstart on Ubuntu 12.04
[19:39] <nanvou> even though I submitted a "respaw" stanza, if the program terminate somehow, upstart won't reload it
[19:42] <nanvou> there's no script and only one "exec" stanzas...
[19:54] <nanvou> anyone ?
[20:01] <SpamapS> nanvou: respawn only respawns on abnormal exit
[20:01] <SpamapS> nanvou: make sure you read the respawn section carefully in 'man 5 init'
[20:02] <nanvou> process exits with 139
[20:02] <SpamapS> nanvou: nothing in syslog about it?
[20:03] <nanvou> yes
[20:03] <nanvou> it syslog says it segfault
[20:03] <nanvou> which is normal
[20:03] <SpamapS> nanvou: segfault is also a reason to respawn (SIGSEGV)
[20:04] <nanvou> what isn't normal is that segfault is detected by system but upstart won't do anything about it and let the program stay stopped
[20:04] <SpamapS> nanvou: it is not marked 'task' right? and there's no 'normal exit' stanza?
[20:04] <nanvou> I ran the program manually. It does SEGFAUT with status code "139"
[20:05] <nanvou> SpamapS, http://paste.ubuntu.com/5623801/
[20:06] <SpamapS> nanvou: indeed, upstart should be respawning that on segfault
[20:06] <SpamapS> nanvou: and syslog says, exactly?
[20:06] <nanvou> "kernel: [4526394.732639] segfaultest[25199]: segfault at fffffff7 ip bf9e085c sp bf9e085c error 4
[20:07] <nanvou> "
[20:07] <SpamapS> thats kernel
[20:07] <SpamapS> nanvou: upstart would log as init:
[20:08] <SpamapS> nanvou: if the program is daemonizing before the segfault, you don't have 'expect fork', so upstart will lose track of it
[20:08] <nanvou> in fact it doesn't daemonize at all
[20:12] <SpamapS> nanvou: initctl log-priority info should show more of what init: is doing
[20:13] <nanvou> where should I wait for logs ?
[20:14] <SpamapS> syslog
[20:19] <nanvou> SpamapS, http://paste.ubuntu.com/5623839/
[20:20] <SpamapS> nanvou: hah, so it did respawn
[20:20] <SpamapS> nanvou: eventually it gave up, respawning too fast
[20:21] <nanvou> ah ok
[20:21] <nanvou> so how do I imply some waiting time ?
[20:25] <nanvou> can I use multiple exec statement N
[20:25] <nanvou> *?
[20:25] <nanvou> like "exec sleep 10" ?
[20:26] <SpamapS> nanvou: respawn limit
[20:26] <SpamapS> nanvou: man 5 init explains it
[20:27] <nanvou> yes, but I don't want to limit the respawns themselves, more like the time between the respawns
[20:27] <SpamapS> nanvou: ah, post-start I think can achieve that. What is the point tho?
[20:28] <SpamapS> nanvou: if you have a program this unstable.... 
[20:28] <nanvou> I'll make it better in the future
[20:28] <SpamapS> yeah but upstart is not the answer
[20:29] <nanvou> right now, I just need upstart to be able to respawn it not too fast
[20:29] <SpamapS> nanvou: just make a wrapper that always respawns it
[20:29] <nanvou> mmh
[20:29] <SpamapS> the upstart respawning is for *unexpected* fail
[20:29] <nanvou> yes, that sounds like a possibility
[20:49] <nanvou> SpamapS, thanks for the help
[20:50] <SpamapS> nanvou: any time