/srv/irclogs.ubuntu.com/2008/05/14/#upstart.txt

Keybukyou lost the container?00:03
Keybukahh, the running init died?00:03
blueyedyes. but patched and build again. what to do?00:03
Keybukhmm00:03
Keybukwe need a way for you to be able to crash that one, without losing the container you're doing it in00:03
Keybukone way would be to do something like00:04
blueyedwell.. I see what gets displayed until the crash..00:04
Keybukok00:05
Keybukso try that00:05
blueyedcfg_create_modify_handler: foo job definition changed00:05
blueyedcfg_read_job: Loading foo from /etc/event.d/foo00:05
blueyedinit:error.c:255: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL00:05
blueyedAborted00:05
blueyedgot signal 900:05
blueyed            exited from VE 1234500:05
Keybukdid the debug version crash?00:05
blueyedhow can I be sure? from the core file?00:07
Keybukfrom the debug output00:07
Keybukit should also asset00:07
Keybukassert00:07
blueyedwhat I've pasted..00:07
Keybukwe need the container now to crash00:07
Keybuknot to crash00:07
Keybukrm /sbin/init00:07
Keybukcp /bin/bash /sbin/init00:07
Keybukand boot the container that way00:07
blueyedwell.. 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 enter00:11
Keybuksorry?00:11
KeybukI don't understand00:11
Keybukwhat does not start what way?00:11
blueyedthe container, with bash as init.00:11
Keybukoh00:12
Keybukno idea00:12
KeybukI don't know openvz00:12
Keybukbut you need to be running _something_ as /sbin/init that isn't Upstart00:12
Keybuksince otherwise every time you trigger the crash, you'll lose the container00:12
Keybukand since I want you to run gdb inside the container while triggering the crash, that won't help ;)00:12
blueyedbusybox does not work either. But "minit" does.. :)00:22
Keybukheh00:23
Keybukas long as you have something00:23
Keybukonce in, start the debug upstart with --debug00:23
Keybuk(no need to redirect now)00:23
Keybukand try and trigger the crash00:23
Keybukyou should get an assert in its output00:23
blueyed"Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL", then "Aborted" on a single line00:24
Keybukexcellent00:25
blueyedI have it started now in gdb.. with "--debug".00:25
Keybukok00:25
Keybukand does it crash in gdb too?00:25
blueyedit crashed right away, when the empty file was not there.. I'll touch it again.00:26
blueyedno, does not crash now..?! I've done "gdb ./init/init", then "run --debug".00:26
Keybuk?00:27
Keybukit works under gdb?00:27
Keybukwhat about under stract00:27
Keybukstrace ./init/init --debug00:27
blueyedno.. Had done "rm" instead of "touch", sry.00:27
blueyedcrashes in the gdb session after touching the file, too.00:28
Keybukoh good00:28
Keybukok, so the next bit is to find out which of the parsing functions is exiting00:28
Keybukthis isn't quite easy00:29
blueyeddo you want access on that machine btw? :)00:29
Keybukif you can give me access, that would be a lot quicker, yeah :p00:29
Keybukif not, we can step through by hand00:36
Keybuksadmac2: great!01:50
keesjhi13:59
Keybukhey14:01
keesjare there examples of handling a failed emit?14:11
Keybukyou know of failure in two ways14:13
keesjI have a jobs that itself calls  "stop an_other_job" (the last one fails and apparently also the "stop" command itself return false14:13
Keybukthe "emit" command will return a non-zero value14:13
Keybuk_and_ a "/failed" event will also be emitted14:14
Keybukis that what you mean?14:14
Keybukor do you mean failed start and/or stop commands?14:15
keesjI think I already answerd my own question14:15
keesjKeybuk: what is failing is a post-stop script 14:16
Keybukright14:17
Keybukthen the stop command will return non-zero14:17
Keybukfor 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:17
keesjbut I can "if stop my_job ; then you failed ; done" right?14:19
Keybukright14:19
keesjany upstart people going to linuxtag btw?14:20
keesjthanks14:20
KeybukI wasn't planning to14:22
keesjit is far away for you :p14:23
Keybuknot so much that14:30
Keybukeveryone has the conferences that they go to14:31
Keybukmine happen to be GUADEC and if I can, LCA14:31
KeybukI've never been to FOSDEM or LinuxTag which seem to be another common set14:31
Keybukit'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:p14:31
* Keybuk starts bricking his new MP3 player17:28
Keybukhurrah, success17:35
KeybukI now have a USB mass storage-capable OGG player ;)17:35
Jc2krockbox?18:14
keesjupstart enabled mp3 player?18:29
KeybukJc2k: heh, no, just the Korean firmware for the player18:36
KeybukSamsung are strange like that18:36
KeybukEuropeans get RDS support for the radio18:36
KeybukKoreans get OGG and UMS support18:36
sadmac2Keybuk: how are things progressing?21:47
Keybukanyone would think you were in a hurry21:48
sadmac2Hyperactive. Too much television as a kid.21:48
Keybuklol21:52
sadmac2Keybuk: 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:53
sadmac2which I like :)21:55
sadmac2Keybuk: 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
sadmac2Could libnih profit from this?21:57
Keybukwhat's lisp-style signal handling?21:58
sadmac2Keybuk: its kind of like exceptions.21:59
Keybukexample?21:59
sadmac2lemme cook one up....22:00
Keybukhttp://paste.ubuntu.com/12129/22:36
sadmac2sweet22:37
sadmac2hmm. crap.22:46
sadmac2something suddenly stopped working :)22:47
Keybukhrh22:47
sadmac2ahh. I think I figured it out.22:52
sadmac2fun with setjmp :)22:52
xsunHi there22:59
Keybukxsun: hi22:59
xsunAnyone knows where I can find Scott here?23:00
Keybukthat's me23:00
xsunHey Scott, can I pvt you?23:01
Keybuksure, what's uo?23:01
Keybukup23:01
sadmac2Keybuk: DCC sending ok by you?23:03
Keybuksure23:03
sadmac2Keybuk: sending23:04
Keybukcan't seem to connect to you23:05
sadmac2Keybuk: email then23:05
Keybukscott@netsplit.com :-)23:05
sadmac2Keybuk: you have it23:06
Keybukah, you're using lngjmp23:08
sadmac2Keybuk: only way to do it.23:09
sadmac2modulo inline asm23:09
Keybukdpkg does something very similar to this23:09
Keybukyou push cleanup handlers23:09
Keybukand errors are raised by lngjmp, which will replay any cleanup handlers23:09
sadmac2there'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:11
sadmac2you can treat them similarly (the last category might get me into trouble, still investigating it)23:12
Keybukif only C had closures23:13
sadmac2Keybuk: GCC has function nesting, which gets you mostly there.23:13
sadmac2if only the rest of C had them.23:13
Keybukyeah, but you can't return pointers to them :)23:22
sadmac2true.23:22
sadmac2You can pass them downward.23:22
sadmac2I need to go home23:29

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