[13:49] <cks_> Hi, I am facing some problem in starting a job automatically by upstart. However if I run "start myjob", it gets started without any errors. Any pointers to debug is appreciated 
[13:53] <xnox> cks_: maybe your "start on" condition is not correct.
[13:53] <xnox> cks_: you can use upstart-monitor to see which events are emitted.
[13:53] <xnox> cks_: can you paste your job to e.g. paste.ubuntu.com ?
[13:55] <cks_> xnox: I pasted my script here: http://paste.ubuntu.com/6808440/
[13:56] <cks_> xnox: I am using upstart 0.3.11
[13:57] <cks_> as shown in the script. pulseaudio depends on audiod.   audiod is up and running. I verified with   initctl status audiod
[13:58] <xnox> cks_: your job appears to be correct, but I have no knoweledge / experience of upstart 0.3.11 however.
[13:59] <xnox> maybe jodh can help you with this ^
[14:00] <cks_> xnox: ok
[14:01] <jodh> cks_: presumably you are running some sort of custom distro? I'd definitely recommend upgrading the upstart package if so as we've added lots of features to make debugging easier.
[14:02] <jodh> cks_: golden rule job writing new jobs is to *not* specify respawn until you are sure it is doing what you want: http://upstart.ubuntu.com/cookbook/#respawn
[14:03] <jodh> cks_: also, http://upstart.ubuntu.com/cookbook/#checking-how-a-service-might-react-when-run-as-a-job, http://upstart.ubuntu.com/cookbook/#determining-why-your-service-fails-to-start.
[14:04] <jodh> cks_: at a guess I wonder if when audiod starts, pulseaudio cannot start as /run is not mounted? Take a look at /etc/init/pulseaudio.conf on a modern ubuntu system to see how it works with current versions of pulse and upstart.
[14:04] <cks_> jodh: but when I run manually "start pulseaudio" it starts without problem. thanks for the links. 
[14:05] <jodh> cks_: then, there must be an error in the 'start on' - are you sure your other job is called /etc/init/audiod.conf and that that daemon is actually running with the expected pid?
[14:08] <cks_> Actually audiod upstart script is present in /etc/event.d/
[14:08] <cks_> even pulseaudio script lies at the same place
[14:10] <jodh> cks_: wow, use of that directory is before my time :)
[14:13] <xnox> jodh: i wonder if that upstart already was using "start on started $job" syntax =)
[14:14] <xnox> cks_: what's the start on condition of the audiod? maybe copy that into pulseaudio or some such?
[14:14] <jodh> yes, maybe back then it was "starte I sayeth forsooth ..."
[14:18] <jodh> cks_: try booting with --debug and capturing syslog/dmesg which will show the event flows.
[14:19] <xnox> jodh: =)))))))
[14:30] <cks_> jodh: thanks for the input
[18:54] <SpamapS> you know.. one unfortunate thing about console log is that programs think they're talking to a tty and thus print with cr's instead of just newlines