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

=== Md_ is now known as Md
rvgateim creating a custom upstart script... when i say "service pentaho start" it tells me, job is already running... "service pentaho stop" hangs, and "initctl status pentaho" tells me pentaho is start/killed... what do i do now? :/13:06
rvgatei want to be able to do a clean start/stop again13:07
SpamapSrvgate: does 'status pentaho' show a pid that does not exist?13:13
rvgateSpamapS, yes13:14
SpamapSrvgate: ok, you have 'expect fork' set wrong13:16
SpamapSrvgate: its a known bug, if you set it wrong then the pid will go missing13:16
SpamapSrvgate: you have to exhaust pid space to release the job13:17
SpamapSrvgate: (or reboot)13:17
rvgatereboot it is13:17
rvgatedev machine anyway :P13:17
SpamapShttps://bugs.launchpad.net/upstart/+bug/40639713:17
SpamapShttp://heh.fi/tmp/workaround-upstart-snafu13:18
SpamapShas a script which does the pid space trick13:18
SpamapSrvgate: make sure before you reboot that you disable the start on for the job or it won't help right? :)13:19
SpamapSjodh: any progress on that bug btw?13:19
SpamapSslangasek: ^^13:19
rvgatei didnt even bother defining a start on yet, since i need to make sure it works first :P13:19
SpamapSIIRC there was some thought that it would go away if we moved away from ptrace13:19
rvgateSpamapS, while the machine reboots... could you explain the "exhaust pid space"... it went way over my head13:21
jodhSpamapS: a little - watch this space...13:21
SpamapSjodh: :)13:23
SpamapSrvgate: so when you fork(), you get highestpid+113:23
SpamapSwell.. actually its just a counter that goes up until you reach a free slot13:24
SpamapSrvgate: anyway, that counter wraps at 65535 .. so.. you have to keep fork()'ing until the missing pid is re-tried.. then upstart will be able to see that pid, reattach to it, and then watch it die13:24
rvgatehaha13:25
rvgateso basicly the pid used gets lost13:25
rvgateunable to find it... unable to stop it.. and it hangs13:25
SpamapSThere are a bunch of ways I'd love to fix it, but jodh and slangasek have told me "don't bother" for a while.. 13:25
rvgategot the script working now again, thanks for the help SpamapS 13:32
slangasekSpamapS: I don't remember the "don't bother"... I remember saying we should fix it right instead of extending initctl with an "oops" interface13:55
SpamapSslangasek: thats "don't bother" in my head anyway14:00
slangasekheh, well, I wouldn't mind help fixing it right ;)14:01
SpamapSjodh: If you're around.. was poking at the logging bits of upstart and wondering about what might happen if a system had way too many upstart processes actively logging....19:52
SpamapSjodh: like, say, 50 active loggers producing > 8K/s19:53
SpamapSslangasek: ^^ ?19:53
jodhSpamapS: if upstart is unable to create a new pty to handle the logging, it emits a error, then degrades the job to "console none" automatically.19:54
SpamapSjodh: pty's aren't the problem. Processes blocked on write() to stdout/stderr would be though.19:55
jodhSpamapS: but if you're talking about lots of jobs producing a ton of output, then you might have issues, yeah.19:55
SpamapSjodh: seems to me that the buffer size might need to be configurable.19:55
jodhSpamapS: are you talking about specifying a buffer size limit?20:01
SpamapSjodh: I'm talking about the buffer on the pty. Its just a default buffer size AFAICT.. and my brain says that is only 8K20:03
jodhSpamapS: kernel code suggests it is 64k, but you might want to check with apw on that. init caches as required to minimise the possibility of jobs blocking on write so I don't think there is much else we can do. About to log off but if you can provoke bad behaviour, please let us know.20:36
SpamapS64k is much better than 8k20:37
SpamapSwell, 8x better anyway *20:39

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