darius12_hi, upstart's testsuite hangs in nih_child_poll() (with signal from traced child)12:41
darius12_I left it for ~ 15 minutes before I killed it12:42
ion_keybuk: Btw, did you notice this?12:42
ion_2008-01-25 17:02:41 < ion_> keybuk: An idea occured to me: how about disallowing nih_ref when the object has a parent (so that it always has a reference count of 1 and nih_unref would be used just like nih_free is now – not callect directly on the object), thus reference counting could *optionally* be used with parentless objects?12:42
ion_2008-01-25 17:03:54 < ion_> Children would be released whenever their parent is released, and the refcounting may be used with the parent when appropriate just by using nih_ref.12:42
Keybukdarius12_: kernel version?12:46
Keybukion_: that wouldn't seem unreasonable12:46
Keybukion_: would that let you do what you want?12:46
darius12_2.6.18 from debian etch12:46
ion_keybuk: Yes12:46
darius12_I suspected the kernel as well12:46
Keybukdarius12_: you need a newer kernel (assuming you're talking about trunk's test suite)12:47
darius12_so I 've been building 2.6.24 to try with this too12:47
darius12_ah, thanks :-)12:47
Keybukthe test suite manages to find a couple of kernel bugs ;)12:47
Keybukin fact, that particular one it's hanging on, got a CVE assigned to it12:47
darius12_yes, I 'm talking about trunk's latest testsuite, I noticed you mentioning about the usefulness of upstart as a kernel bug uncovering tool :-)12:48
Keybukthe test suite uses waitid(W_NOWAIT) so it can ensure that there's no race conditions12:50
Keybukie. if it kills a child, it waits without reaping for the child to die, so then when it calls nih_child_poll() it knows *that* function's call to wait() will work12:50
Keybukit turns out that waitid(W_NOWAIT) isn't used much, so had some issues12:51
Keybukespecially when combined with ptrace12:51
darius12_I see12:51
darius12_I 'm a bit scared about upstart using ptrace12:52
darius12_Especially if there is a bit of flux in this area when/if utrace gets merged12:53
darius12_I 'm ok with strace breaking for a while but pid #1 is a different story ...12:53
darius12_Then again, if upstart manages to get in fedora it will get testing combined with utrace so bugs will probably get fixed before utrace becomes mainstream12:56
KeybukI haven't heard of utrace before12:59
darius12_It is roland mcgrath's heroic effort to reimplement ptrace in the kernel12:59
darius12_(the kernel-userspace interface of course stays the same)13:00
darius12_It is quite nice, e.g., with it you can implement policies such as "on segfault, just freeze the thread and wait for me to attach a debugger instead of dumping core"13:01
darius12_very easily in few lines of code13:02
darius12_and it gets even neater when you want to implement dtrace-like monitoring etc13:03
darius12_It is already in the fedora kernel and it is slowly getting merged upstream13:03
Keybukif the interface is the same, there shouldn't be any problems there?13:16
darius12_just increased probability for new bugs :-)13:20
darius12_ptrace is pretty hard to get right13:20
Keybukreimplementations always do13:22
Keybukhappily we have a test suite ;)13:22
darius12_The test suite will give you reassurance that the bug is not yours.13:24
Keybukit also helps us fix the kernel bug too13:25
Keybuksince it's a small (10-20 lines of code) test case for the bug13:25
darius12_yep, this is also true :-)13:25
darius12_maybe upstart's testsuite should be added to test.kernel.org13:27
darius12_Is there a way to declare in upstart that bash wants to be killed with SIGHUP?13:45
Keybukit does?13:48
Keybuk(not yet)13:48
darius12_yes, otherwise it doesn't save its history13:48
darius12_which is very annoying13:48
Keybukyou spawn a login shell with Upstart? :)13:50
Keybukdon't you usually spawn getty or login for that?13:51
darius12_yes, but how about kde konsole sessions?13:51
Keybukthose get killed by other means13:54
KeybukUpstart doesn't send them a signal directly since it doesn't know about them13:54
Keybukthey might be in a process group of something that Upstart does know about13:55
Keybukor they might get the signal from something else that is being killed itself13:55
darius12_back 15:01
darius12_you are right. Login sends sighup to its child login shell when it gets a sigterm15:02
darius12_This didn't happen when I was testing it ages ago (it seems it has been fixed since 2003)15:02
darius12_So there is no problem15:03
darius12_for kde I guess when it doesn't work, konsole is to blame15:04
=== kyle__ is now known as kylem
darius12_Keybuk: with kernel 2.6.24 I get 3 testsuite failures:17:02
darius12_nih_dir_walk()  nih_main_write_pidfile() and nih_watch_new()17:03
Keybukwhich failures?17:04
Keybukerr, ok17:17
Keybukhow kooky17:17
Keybukthings that should fail are not failing17:20
darius12_which kernel version are you testing upstart with?17:39
Keybukubuntu hardy stock17:40
darius12_it looks like it is 2.6.24-rc8 based17:41

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