[00:03] <Keybuk> you lost the container?
[00:03] <Keybuk> ahh, the running init died?
[00:03] <blueyed> yes. but patched and build again. what to do?
[00:03] <Keybuk> hmm
[00:03] <Keybuk> we need a way for you to be able to crash that one, without losing the container you're doing it in
[00:04] <Keybuk> one way would be to do something like
[00:04] <blueyed> well.. I see what gets displayed until the crash..
[00:05] <Keybuk> ok
[00:05] <Keybuk> so try that
[00:05] <blueyed> cfg_create_modify_handler: foo job definition changed
[00:05] <blueyed> cfg_read_job: Loading foo from /etc/event.d/foo
[00:05] <blueyed> init:error.c:255: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[00:05] <blueyed> Aborted
[00:05] <blueyed> got signal 9
[00:05] <blueyed>             exited from VE 12345
[00:05] <Keybuk> did the debug version crash?
[00:07] <blueyed> how can I be sure? from the core file?
[00:07] <Keybuk> from the debug output
[00:07] <Keybuk> it should also asset
[00:07] <Keybuk> assert
[00:07] <blueyed> what I've pasted..
[00:07] <Keybuk> we need the container now to crash
[00:07] <Keybuk> not to crash
[00:07] <Keybuk> rm /sbin/init
[00:07] <Keybuk> cp /bin/bash /sbin/init
[00:07] <Keybuk> and boot the container that way
[00:11] <blueyed> well.. it does not start that way.. "init: Failed to open console: Permission denied" isn't a problem, is it?
[00:11] <blueyed> ..just stops after ~1 sec again, cannot enter
[00:11] <Keybuk> sorry?
[00:11] <Keybuk> I don't understand
[00:11] <Keybuk> what does not start what way?
[00:11] <blueyed> the container, with bash as init.
[00:12] <Keybuk> oh
[00:12] <Keybuk> no idea
[00:12] <Keybuk> I don't know openvz
[00:12] <Keybuk> but you need to be running _something_ as /sbin/init that isn't Upstart
[00:12] <Keybuk> since otherwise every time you trigger the crash, you'll lose the container
[00:12] <Keybuk> and since I want you to run gdb inside the container while triggering the crash, that won't help ;)
[00:22] <blueyed> busybox does not work either. But "minit" does.. :)
[00:23] <Keybuk> heh
[00:23] <Keybuk> as long as you have something
[00:23] <Keybuk> once in, start the debug upstart with --debug
[00:23] <Keybuk> (no need to redirect now)
[00:23] <Keybuk> and try and trigger the crash
[00:23] <Keybuk> you should get an assert in its output
[00:24] <blueyed> "Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL", then "Aborted" on a single line
[00:25] <Keybuk> excellent
[00:25] <blueyed> I have it started now in gdb.. with "--debug".
[00:25] <Keybuk> ok
[00:25] <Keybuk> and does it crash in gdb too?
[00:26] <blueyed> it crashed right away, when the empty file was not there.. I'll touch it again.
[00:26] <blueyed> no, does not crash now..?! I've done "gdb ./init/init", then "run --debug".
[00:27] <Keybuk> ?
[00:27] <Keybuk> it works under gdb?
[00:27] <Keybuk> what about under stract
[00:27] <Keybuk> strace ./init/init --debug
[00:27] <blueyed> no.. Had done "rm" instead of "touch", sry.
[00:28] <blueyed> crashes in the gdb session after touching the file, too.
[00:28] <Keybuk> oh good
[00:28] <Keybuk> ok, so the next bit is to find out which of the parsing functions is exiting
[00:29] <Keybuk> this isn't quite easy
[00:29] <blueyed> do you want access on that machine btw? :)
[00:29] <Keybuk> if you can give me access, that would be a lot quicker, yeah :p
[00:36] <Keybuk> if not, we can step through by hand
[01:50] <Keybuk> sadmac2: great!
[13:59] <keesj> hi
[14:01] <Keybuk> hey
[14:11] <keesj> are there examples of handling a failed emit?
[14:13] <Keybuk> you know of failure in two ways
[14:13] <keesj> I have a jobs that itself calls  "stop an_other_job" (the last one fails and apparently also the "stop" command itself return false
[14:13] <Keybuk> the "emit" command will return a non-zero value
[14:14] <Keybuk> _and_ a "/failed" event will also be emitted
[14:14] <Keybuk> is that what you mean?
[14:15] <Keybuk> or do you mean failed start and/or stop commands?
[14:15] <keesj> I think I already answerd my own question
[14:16] <keesj> Keybuk: what is failing is a post-stop script 
[14:17] <Keybuk> right
[14:17] <Keybuk> then the stop command will return non-zero
[14:17] <Keybuk> for the job "foo" (that calls the failing stop command) you'll also have the following event:
[14:17] <Keybuk>   stopped foo RESULT=failed PROCESS=post-stop EXIT_STATUS=...
[14:19] <keesj> but I can "if stop my_job ; then you failed ; done" right?
[14:19] <Keybuk> right
[14:20] <keesj> any upstart people going to linuxtag btw?
[14:20] <keesj> thanks
[14:22] <Keybuk> I wasn't planning to
[14:23] <keesj> it is far away for you :p
[14:30] <Keybuk> not so much that
[14:31] <Keybuk> everyone has the conferences that they go to
[14:31] <Keybuk> mine happen to be GUADEC and if I can, LCA
[14:31] <Keybuk> I've never been to FOSDEM or LinuxTag which seem to be another common set
[14:31] <Keybuk> it's not that I don't want to, just that I never know when they are, and it's too late by the time someone tells me :)
[14:31] <keesj> :p
[17:28]  * Keybuk starts bricking his new MP3 player
[17:35] <Keybuk> hurrah, success
[17:35] <Keybuk> I now have a USB mass storage-capable OGG player ;)
[18:14] <Jc2k> rockbox?
[18:29] <keesj> upstart enabled mp3 player?
[18:36] <Keybuk> Jc2k: heh, no, just the Korean firmware for the player
[18:36] <Keybuk> Samsung are strange like that
[18:36] <Keybuk> Europeans get RDS support for the radio
[18:36] <Keybuk> Koreans get OGG and UMS support
[21:47] <sadmac2> Keybuk: how are things progressing?
[21:48] <Keybuk> anyone would think you were in a hurry
[21:48] <sadmac2> Hyperactive. Too much television as a kid.
[21:52] <Keybuk> lol
[21:53] <sadmac2> Keybuk: well if you consider that, essentially, I'm now paid full time to work on Upstart, and that there's not much for me to do until 0.5 comes out, basically Red Hat pays me to annoy you 40 hours a week.
[21:55] <sadmac2> which I like :)
[21:57] <sadmac2> Keybuk: in the process of writing that web server I mentioned, I got sidetracked on some error handling code and ended up implementing lisp-style signal handling in C.
[21:57] <sadmac2> Could libnih profit from this?
[21:58] <Keybuk> what's lisp-style signal handling?
[21:59] <sadmac2> Keybuk: its kind of like exceptions.
[21:59] <Keybuk> example?
[22:00] <sadmac2> lemme cook one up....
[22:36] <Keybuk> http://paste.ubuntu.com/12129/
[22:37] <sadmac2> sweet
[22:46] <sadmac2> hmm. crap.
[22:47] <sadmac2> something suddenly stopped working :)
[22:47] <Keybuk> hrh
[22:52] <sadmac2> ahh. I think I figured it out.
[22:52] <sadmac2> fun with setjmp :)
[22:59] <xsun> Hi there
[22:59] <Keybuk> xsun: hi
[23:00] <xsun> Anyone knows where I can find Scott here?
[23:00] <Keybuk> that's me
[23:01] <xsun> Hey Scott, can I pvt you?
[23:01] <Keybuk> sure, what's uo?
[23:01] <Keybuk> up
[23:03] <sadmac2> Keybuk: DCC sending ok by you?
[23:03] <Keybuk> sure
[23:04] <sadmac2> Keybuk: sending
[23:05] <Keybuk> can't seem to connect to you
[23:05] <sadmac2> Keybuk: email then
[23:05] <Keybuk> scott@netsplit.com :-)
[23:06] <sadmac2> Keybuk: you have it
[23:08] <Keybuk> ah, you're using lngjmp
[23:09] <sadmac2> Keybuk: only way to do it.
[23:09] <sadmac2> modulo inline asm
[23:09] <Keybuk> dpkg does something very similar to this
[23:09] <Keybuk> you push cleanup handlers
[23:09] <Keybuk> and errors are raised by lngjmp, which will replay any cleanup handlers
[23:11] <sadmac2> there's a bit more to this one. There are 3 namespaces for signals. USER (ones you make up for your app) ERROR (allows you to directly throw ENOMEM and the like as errors) and UNIX (literal signals like SIGSEGV)
[23:12] <sadmac2> you can treat them similarly (the last category might get me into trouble, still investigating it)
[23:13] <Keybuk> if only C had closures
[23:13] <sadmac2> Keybuk: GCC has function nesting, which gets you mostly there.
[23:13] <sadmac2> if only the rest of C had them.
[23:22] <Keybuk> yeah, but you can't return pointers to them :)
[23:22] <sadmac2> true.
[23:22] <sadmac2> You can pass them downward.
[23:29] <sadmac2> I need to go home