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

sadmac2Keybuk: good morning14:14
Keybuksadmac2: morning17:54
sadmac2Keybuk: progress continuing steady?18:04
Keybukyeah I have rough versions of the major commands (start/stop/emit)18:06
sadmac2sweet18:16
sadmac2Keybuk: got bored waiting, so I started writing a web server in C :)18:16
sadmac2Keybuk: does the job definition format support custom stanzas?18:28
Keybukno18:28
sadmac2for example: X-redhat-boot-icon /usr/share/icons/fubar18:28
Keybukwould you want to parse the file yourself, or get it via d-bus properties?18:28
sadmac2Keybuk: the former would suffice, but just putting all stanzas beginning with an X- keyword into a hash available from the dbus object would be nice.18:29
Keybukthat's doable18:29
sadmac2sweet18:33
blueyedHi. upstart/init crashes on me in an OpenVZ container ("signal 9"), when I save a file in /etc/event.d/. This may be related to the backup file vi creates (or the .pysieved.sw? files laying there). Any idea how I could get a backtrace of this? I'm trying to set this up in another container, because this is on my mailserver container..23:06
Keybukit should drop a core in / ?23:07
Keybukactually23:07
Keybukno it won't23:07
Keybuk!! 9 ??23:07
blueyedinit: error.c:255: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL23:08
Keybukeep.23:08
Keybukthat should still be signal 6 ;)23:08
blueyedThis is how vim (and the container) crashes when pressing ":wq"+enter:23:09
blueyed"foo"got signal 923:09
blueyed                 exited from VE 1234523:09
blueyed"foo" being the filename.23:09
Keybukah, vim crashed23:09
Keybukis there a /core file?23:09
blueyedyes..23:09
Keybukgdb /sbin/init /core23:10
Keybukwhere23:10
blueyedmom.. need to setup the new container first with gdb etc23:10
blueyedI guess I need the dbgsym packages for init?23:14
Keybukyup23:14
Keybukupstart-dbgsym23:14
blueyedthere you go: http://pastebin.com/m693040b323:16
Keybukupstart 0.3.9 ?23:16
blueyed0.3.9-2, yup23:17
blueyedubuntu hardy, minimal image, in openvz container23:17
Keybukif only gdb could step backwards *sigh*23:18
blueyedIt happens always when changing the file and saving it anew. I'll try to trigger it down to some certain line(s). Currently it's: http://pastebin.com/m55a7424f23:19
Keybukerr23:24
Keybukso, that's basically impossible ;)23:24
Keybukcan you gdb init while it's running in openvz?23:25
Keybukie gdb -p 123:25
blueyedI'll try.. currently the container does not start at all anymore.. I'll look at that core dump and then remove the event file again.23:26
Keybukwhat's happened is it's tried to parse the file23:27
Keybukand an error has occurred, causing the function chain to end23:27
Keybukbut no error is in the stack23:27
KeybukI've just been through the code and can't see anything that returns without first raising an error23:27
Keybukoops, killed the wrong window23:27
blueyedDo dot-files and backup file get ignored? (e.g. "foo~" and .foo.swp) - or could that cause a race condition?23:28
Keybukyes23:29
Keybukthey're ignored23:29
blueyedIt failed to start because of an empty file "foo".. had to remove this from outside of the container first..23:32
blueyedthe bt from that crash: http://pastebin.com/m569cc61723:32
blueyedAttaching to process 123:33
blueyedptrace: Operation not permitted.23:33
blueyed..does not seem to work?23:33
Keybukno, was hoping openvz might let that happen ;)23:36
Keybukwould you be able to rebuild the source to upstart inside the openvz?23:37
blueyedyes23:37
blueyedwithout any patches?23:37
Keybukapt-get source upstart23:37
Keybukapt-get build-dep upstart23:37
Keybukthen cd into the upstart directory and _EDIT_ init/main.c23:38
Keybukcomment out (I tend to use #if 0 ... #endif around them) the following lines23:38
Keybukprototypes for all handlers (65-70)23:39
Keybukthe pid 1 check (140-147)23:39
Keybukthe log redirection (178-179)23:39
Keybukthe console fu (185-191)23:40
Keybuksignal setup for handlers (213-239)23:40
Keybukthe startup event (283)23:40
Keybukalso comment out the handler functions themselves (353-567/eof)23:41
Keybuk-- 23:41
Keybukthat'll give you a version of upstart you can run as an ordinary process ;)23:41
Keybukthen build with debian/rules build23:42
blueyed"signal setup for handlers (213-239)"?`all nih_signal_set_* lines there? (line numbers do not seem to match)23:42
Keybuknot all of them23:45
Keybukthe ones that set a local handler23:46
Keybukthe ones that set nih_signal_handler have to remain23:46
Keybukthey cause the main loop to iterate23:46
blueyedok. Built, 3/17 tests failed.. which might be expected, but I'm trying a clean build, too.23:51
blueyedWhat should I do with the stripped version now?23:52
blueyedclean version also fails with 3 tests..!23:52
KeybukI'll worry about the tests later ;)23:55
Keybukok23:55
Keybukjust run it ./src/init23:55
Keybukoh23:55
Keybukjust run it ./src/init --debug23:55
Keybukthe --debug helps ;)23:55
Keybukyou'll get output on the terminal23:55
Keybuk(as root, obviously)23:55
blueyedok. then try to recreate the crash? (it's ./init/init btw)23:57
Keybukyup23:57
Keybukoh, yes ;)23:57
blueyedwell, now the container is gone.. I should have redirected the debug output probably?23:58
blueyed..and I shouldn't have built/modified it in /tmp.. :/23:59

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