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

jodhstgraber/xnox: my setenv branch should be usable if you want to give it a try. Tests will take a day or so to write (he says optimistically ;-) before I raise an MP.17:21
jonnorI have a custom software running on Ubuntu 12.04 where I just converted from using sysvinit scripts to an upstart job for starting. Problem is: the service crashes when ran with upstart, and not without21:17
jonnorHow is the runtime environment of an upstart (system) job different from that of sysvinit or when using a shell?21:17
jonnorAnd how may I attach gdb to my service when ran from upstart?21:18
jonnorThe issue is reproducible when the upstart job just consists of "exec /opt/my/service"21:19
jonnorI am able to run gdbserver from inside the upstart job, and connect to it using gdb (on same machine). However, when ran this way, no symbols are found for the executable and the stack only has one entry in ld. When running gdb /opt/my/service I get all symbols and proper stack (and no crash...)21:54
xnoxwhen running from upstart there isn't much of environment at all. Try for example `exec env` and look at the logs.21:54
xnox(under sysvinit the environment is poluted more)21:55
xnoxfor example $HOME is not set at all.21:55
jonnorxnox: thanks! It is very minimal indeed. The code uses $HOME, could be that is what takes it down21:59
jonnorxnox: haha, exporting HOME fixed it. Thanks a lot!22:01
xnoxwell it did take down and caused emacs daemon to hang. it turns out software doesn't often handle missing environment variables well ("e.g. surely $HOME will always be set")22:01
jonnoryou can tally this piece of software up on that list :p22:01
jonnorand confirmed - converting my sysvinit script to upstart fixed my original issue as well. Now I can sleep22:07
jonnorgood night22:07
xnoxnight22:19

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