/srv/irclogs.ubuntu.com/2009/07/29/#upstart.txt

ionkeybuk: Btw, have you seen http://check.sourceforge.net/? (I didn’t take a look at it yet, just noticed something else uses it.)00:59
ion“ In C, a unit test is just as likely to trash its address space as it is to fail to meet its test requirements, and if the test framework sits in the same address space, goodbye test framework.01:05
ionTo solve this problem, Check uses the fork() system call to create a new address space in which to run each unit test, and then uses message queues to send information on the testing process back to the test framework. That way, your unit test can do all sorts of nasty things with pointers, and throw a segmentation fault, and the test framework will happily note a unit test error, and chug along. ”01:05
=== sadmac2_ is now known as sadmac2
Keybukmbiebl: applied, pushed11:50
Keybukion: I looked at check, but found it far too complicated for what I needed11:50
Keybukfor me, the primary thing a C-based test suite should give you is the ability to run gdb or valgrind on the tests to debug11:50
=== robbiew1 is now known as robbiew
ionkeybuk: Alright14:07
EsmilIs there a way to 'reset' jobs? Right now I have a job stop/killed, process 1050 and both start/stop job hangs, but there is no process 1050 running on my system14:24
Keybukthat's odd14:25
Keybukthat implies upstart missed SIGCHLD for it14:25
EsmilApparently the avahi-daemon needs 'expect daemon' not 'expect fork'. That's how it happened14:26
Keybukah, so you have a floating ptrace entry basically?14:26
EsmilSorry, don't know what that means >.<14:26
KeybukI don't think there's a way to get rid of that14:27
EsmilHmm.. ok. Next reboot then14:27
KeybukI'll test with avahi myself and see if I can find out why it lost track of things14:27
Esmilupstart 0.6.2 btw14:28
Keybukdon't suppose you can pastebin your avahi conf file?14:28
Keybuk(/etc/init one that is)14:28
Esmilhttp://pastebin.org/504814:29
EsmilOhh, thats after I changed expect fork to daemon14:29
Keybukthanks14:29
Esmilbtw. I had sort of the opposite problem with hald. It needs expect fork not daemon. Sort of the same happened when I stopped the hald job14:31
EsmilOnly this time upstart would TERM/KILL a sub-process of hald14:31
Keybukright, I see the issue14:32
Keybukwell, I can replicate it ;)14:32
EsmilHeh, and when I sent a SIGTERM to the real hald process upstart would throw an error and hang my system14:33
EsmilOk, good14:33
Keybukooh, that's fun :)14:33
Keybukwhat was the error?14:34
EsmilCan't remember exactly. Assert something != NULL when it was I think, but I can try and replicate it if you want14:35
Keybukyes please14:36
Keybukcould you file a bug about the avahi issue?  (http://bugs.launchpad.net/upstart)14:40
Keybuklikewise, once you can get the assert out of hal, a bug about that one too14:43
Keybuk(I can't get it to assert, but I can see the sigchld issue)14:43
EsmilYes, I just saw you need to be a bit more clever to make upstart error than I just described15:02
EsmilWhen upstart kills the child process of hald, hald exits, so start/stop hald works15:03
Esmil..but in my hald.conf i have 'stop on stopping dbus-system'15:03
Esmiland when I go stop dbus-system, upstart goes into a funny state15:03
Esmilthe command hangs, and when you ^C and list dbus-system is stop/stopping, process ... and hald is stop/killed process ...15:04
Keybukno assert though?15:04
Keybukcould the assert have been with 0.6.1 ?15:04
EsmilNo, the assert comes when you kill the dbus-daemon15:05
Keybukyou still get it?15:05
Esmilyes15:05
Keybukwhat's the assert message?15:05
Esmilinit: dbus-system main process ended, respawning15:05
Esmilinit: job.c: 282: Assertion failed in job_changed_state: job ->blocker == NULL15:05
Keybukthat's not an assert message?15:05
Keybukah!15:05
Keybukthat is :D15:06
Esmilinit: Caught abort, core dumped15:06
EsmilKernel panic - ...15:06
EsmilSorry I should really do this on a virtual machine, so I don't have to copy to paper and then back >.<15:06
Esmiljob.c: 283 actually15:07
Keybuk*nods*15:07
Keybukok blocker isn't being cleared15:07
sadmacKeybuk: a job can be blocked by an event. When can an event block another event?15:08
Keybukcan you file a bug about that one too ;)  include the assert message in the title15:08
Keybuksadmac: can't15:08
sadmacKeybuk: hmm. I thought there was code for it15:09
sadmacKeybuk: also, a finished event can't block anything, correct?15:10
Keybukcorrect15:10
sadmacKeybuk: ok, then EventOperator seems to be doing something strange15:10
sadmacKeybuk: suppose I have a job with "start on a and b"15:11
Keybukevent operators can block events15:11
sadmacKeybuk: oh. oh wow. That's actually kinda scary.15:11
Keybukthere's some deeply fun side-effects of that simple little stanza you just quoted aren't there <g>15:12
Keybukstart on starting a and starting b15:12
Keybuksuddenly a won't be started until b is too ;-)15:12
sadmacKeybuk: yeah. I picked the right area of the code to rework :)15:12
sadmacKeybuk: did I mention reorganizing EventOperator?15:13
Keybukyeah you did15:13
Keybuknot how though?15:13
sadmacKeybuk: Its an N-ary tree the way I'm doing it.15:13
Keybukone of the reasons it's a binary tree is efficient traversal-without-leafs15:14
sadmacKeybuk: before if you had "a or b or (c and d)" you'd get a tree like (or (or (or b (and c d))))15:14
sadmacKeybuk: now you get (or a b (and c d))15:14
Keybukyes15:14
Keybukthat's deliberate though15:14
Keybukif a, c and d happen15:14
Keybukerr15:15
Keybukimaging15:15
Keybukimagine15:15
Keybuk(a and b) or (c and d)15:15
Keybukif a, c & d happen15:15
Keybukyou *don't* want the environment from a being leaked to the job15:15
Keybukif you can keep that, sweeet15:15
sadmacas soon as a happens the operator is true15:15
Keybukyeah, I had to clarify15:16
sadmacKeybuk: that tree would remain binary15:17
sadmacKeybuk: there's no optimization to it15:17
Keybukwhat about15:17
Keybukok15:17
KeybukI look forwards to playing with it :)15:17
sadmacKeybuk: it makes it easier to do 0.10-with-0.6-compatibility and check your errors, since you can make qualifying statements about EventOperators more quickly15:18
Keybuk*nods*15:18
Keybuksounds good to me15:19
sadmaccool15:19
Keybukif you could write up what you're doing and post it to the list at some point, great15:19
Keybukotherwise no problem if that comes with the code ;-)15:19
Keybuk(not everyone writes their plans before they code like me :p)15:19
sadmacyeah, dunno which will get done first. The testcases will probably take long enough to justify taking a break to write it in human.15:20
Keybuklol15:20
sadmacKeybuk: I also noticed libnih still uses a cursor for FOREACH. I thought the reference stuff gave us a nifty way around that.15:23
Keybukcursor is still useful when removing15:24
Keybukand traversing a list that may be reordered15:24
sadmaccool15:25
KeybukEsmil: did you file those two bugs?15:25
EsmilWriting on the second one at the moment15:31
EsmilDone15:39
sadmacKeybuk: 0.6.2 is using proc connector now, right?15:41
sadmacor have we not gone there yet?15:41
Keybukno15:47
EsmilIs there some way to tell init that the system dbus is up, so please register yourself there?15:53
Esmil..or planned something like that?15:53
sadmacEsmil: planned15:54
EsmilOk, good. Thanks15:54
KeybukEsmil: telinit q15:59
sadmacKeybuk: has behavior of that changed?16:00
EsmilHah, cool.16:01
Keybuksadmac: in what sense?16:01
sadmacKeybuk: does it still re-exec?16:01
Keybuksadmac: q reloads, you're confusing with u16:01
sadmacKeybuk: oh. shit. that's a good place for that.16:01
Keybuke.g. in dbus.conf16:06
Keybukpost-start exec telinit q16:06
Keybuk;-)16:06
Keybukit's a hack really, but it suffices for now16:06
sadmacKeybuk: I can't figure out what the interface should look like16:07
Keybukwhich?16:07
sadmacKeybuk: to mark the dbus job as allowing dbus to start16:08
Keybukdunno16:08
KeybukI was wondering whether it'd be interesting to add a "dbus name" field16:08
Keybukso you can hold the job in SPAWNED until it registers a name16:08
Keybukif you specified org.freedesktop.DBus it'd behave magically ;)16:08
Keybukthat'd also mean you could StartByDBusName("...")16:08
Keybukwhich might be nice for D-Bus activation purposes16:09
EsmilIs it possible to start certain instances on events? E.g. start agetty TTY=vc/2 when sysinit.conf fails to start without having another job just to do exec start --no-wait agetty TTY=vc/216:14
Keybukno, that's one problem I haven't solved yet ;-)16:25
EsmilOk, just wondering if just hadn't found it in the man pages yet. There are many hacks around it I guess16:27
* sadmac sighs at fedora-devel20:21
sadmacLennart + Pulseaudio vs. The World, Round 1320:22
ionPlease elaborate, for the lazy ones among us. :-)20:51
sadmacion: Lennart: "New pulse release with mixer changes." Everyone: "WE HATE YOU AND ALL YOU STAND FOR." Lennart: "Let me further you in those convictions." JGarzik: "Some of your ideas for Pulse are bad." Lennart: "You don't know about /new/ soundcards. You're the /old/ audio guy." JGarzik: "God you're stupid. I'm gonna go get some coffee."20:53
sadmacPulse is an example of what happens when someone correctly times a bad solution to a serious problem.20:55
ionHehe20:55
sadmacI'd punch Lennart if I could reach his head.20:55

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