[00:14] <racarr> killall mir_stress;
[00:14] <racarr> fun to write ;)
[00:19] <racarr> feel very close to this stress bug
[00:19] <racarr> but need to go help build a dome
[00:19] <racarr> back later :)
[00:33] <RAOF> racarr: Yo
[00:36] <racarr> RAOF: Hi! Sorry. I am about to leave (I literally have to go help build a dome)
[00:36] <RAOF> That's ok.
[00:36] <racarr> but, I will be around...was hoping we could have a hangout later
[00:36] <RAOF> Sure.
[00:36] <racarr> I am jumping more on the xmir train (WHISTLE WHISTLE SCREEEEEECH)
[00:36] <RAOF> Wooo wooo!
[00:37] <racarr> and have a few items I want to sync with you on and just in general
[00:37] <racarr> clarify
[00:43] <RAOF> Cool.
[00:44] <racarr> Ok play time!
[00:45] <racarr> aww truncated
[00:45] <racarr> *runs in shame*
[01:05] <RAOF> What the whatting what? My perfectly valid DrawablePtr gets mangled in the process of calling xmir_dri2_drawable_can_bypass. Are there two different definitions of struct _Drawable or something?
[01:09] <RAOF> There must be! What the whatting what?
[01:22] <RAOF> Well, that's moderately terrible. Always #include <xorg-config.h>, lest your structures magically change layout!
[01:46]  * duflu includes <xorg-config.h> in all files from now on
[01:58] <duflu> Oh kdub, you put conflicts in all my code today :)
[02:11] <duflu> Worse than conflicts... classes don't exist any more . Hmm...
[03:31] <kgunn> so does gdb have known issues with xmir ?
[03:39] <duflu> kgunn: X in general is not GDB friendly. You always have to GDB from an ssh login
[03:40] <duflu> or remote shell of choice...
[03:41] <RAOF> I'm happily gdbing XMir right now.
[03:41] <RAOF> FSVO “happily”
[03:44] <kgunn> got it
[03:59] <RAOF> Bah.
[03:59] <RAOF> I should have remembered the unofficial X motto.
[03:59] <RAOF> “X: More difficult than you think”
[04:00] <duflu> X: Solve everything for...
[04:04] <RAOF> Alright. That's enough GLX bypass for now. Upstreaming!
[04:06] <duflu> Woo!
[05:00] <duflu> thomi: Sorry to bug you late in the day but any idea about... https://jenkins.qa.ubuntu.com/job/mir-clang-saucy-amd64-build/1222/console
[05:25] <didrocks> hey kgunn!
[05:25] <kgunn> hey didrocks !
[05:26] <didrocks> waow, you are using French punctuation (space before ! : and ; )
[05:27] <didrocks> kgunn: I confirm that u-s-c depends on libmirserver FYI
[05:27] <didrocks> unity-system-compositor:
[05:27] <didrocks>  Depends: libboost-program-options1.53.0, libboost-system1.53.0, libc6 (>= 2.9), libgcc1 (>= 1:4.1.1), libmirserver0 (= 0.0.7+13.10.20130716ubuntu.unity.next-0ubuntu1), libstdc++6 (>= 4.6)
[05:28] <didrocks> (this dep is automatically resolved by the linker)
[05:29] <kgunn> didrocks: hmmm,  i know  it uses a "shared" header...but it must actually end up being in libmirserver
[05:29] <didrocks> src/system_compositor.h:#include <mir/default_server_configuration.h>
[05:29] <didrocks> yeah, should be that ^
[05:30] <kgunn> that be the one
[05:31] <didrocks> kgunn: so, +1 on the virtual package, created by a soname (in cmake) which creates a config.h file (#define)?
[05:31] <kgunn> didrocks: wanna join our team meeting ?....we can get all our stuff out of the way & ping you to join
[05:31] <racarr> didrocks: It's really fun. you know you want to
[05:31] <didrocks> racarr: ahah :p
[05:31] <didrocks> kgunn: oh sure, when is it? (I thought your meetings were on Thursday)
[05:32] <kgunn> nope tonight
[05:32] <kgunn> or this morning sorry
[05:32] <didrocks> I was able to translate :-)
[05:32] <didrocks> how long from now?
[05:32] <kgunn> we start in 1/2 hour
[05:33] <didrocks> ok, just time to get the coffee ready then!
[05:33] <kgunn> oh sure
[05:34]  * racarr jealous
[05:34] <racarr> If I had coffee there would be no going back
[05:34] <didrocks> racarr: caffein-free tea? :)
[05:34] <racarr> didrocks: One step ahead XD
[05:34] <didrocks> heh
[05:34] <racarr> it's the caffeine I want. it's just the caffeine I dont want in 1 hour
[05:48] <RAOF> didrocks: Incidentally, how do we work out when the ABI has changed for that?
[05:48] <RAOF> Empirically?
[05:48] <didrocks> RAOF: you mean, how do you see the ABI changed? Yeah, you have to notice that your change did that
[05:48] <didrocks> RAOF: the integration tests will tell you that quickly I think :p
[05:49] <RAOF> Ah, ok.
[05:54] <thomi> duflu: hey, I missed your message before
[05:54] <thomi> duflu: it looks like possibly a bzr bug? Did you retry the build?
[05:55] <duflu> thomi: No, I don't think I have the VPN set up any more
[05:55] <thomi> duflu: OK
[05:57] <thomi> duflu: I've just kicked it off again, we'll see if it works this time.
[05:57] <duflu> thomi: Ta
[05:57] <thomi> duflu: and I'll file a bug against bzr builder and see what the devs say
[05:57]  * duflu wonders if the VPN setup instructions are any simpler tnow
[05:58] <thomi> I'm not sure they're any simpler... but I set it up once, and have never had to touch it again
[05:58] <duflu> ... because I tend to wipe my machines between releases
[05:58] <thomi> I recommend using the network-manager-applet instructions
[05:58] <thomi> ahhh
[05:58] <thomi> I haven't done that for a few years now
[05:59] <thomi> duflu: perhaps you have a router that's VPN capable? Although that's not very secure, depending on who has access to your personal network
[06:00] <robert_ancell> thomi, hikiko, alf_ kgunn kdub meeting
[06:41] <RAOF> racarr: Are you still hankering for a hangout?
[06:56] <didrocks> kgunn: RAOF: let me enlight your day/night and please approve https://code.launchpad.net/~didrocks/mir/remove-powerpc/+merge/175201 :)
[07:03] <thomi> duflu: looks like the re-run of that jenkins job worked. I've filed a bug against bzr-builder anyway
[07:03] <duflu> thomi: Yep thanks
[07:09] <dholbach> good morning! :)
[07:12] <thomi> RAOF: Is a string like "Intel Corporation: 2nd Generation Core Processor Family Integrated Graphics Controller" useful enough to identify the graphics chipset for the xmir devices?
[07:12] <thomi> I as because that's all we get for the cert lab machines at the moment
[07:13] <thomi> But I guess ideally we'd get the specific model number
[07:13] <RAOF> thomi: It's pretty good, but could be better.
[07:13] <thomi> ok.. as long as it's not totally useless, I'll run with it for now
[07:13] <RAOF> Ideally we'd get a tuple of (gen, GT #).
[07:13] <RAOF> Xorg.0.log should actually have the (gen, GT #) tuple in in.
[07:14] <RAOF> But I can't tell at the moment, because btrfs has done it's "I'll just wedge for a couple of minutes, k" thing, and anything that hits the disc subsystem is going to hang in D state.
[07:14] <RAOF> Ah, there we go! Hissy fit ended!
[07:15] <RAOF> [  6184.799] (--) intel(0): Integrated Graphics Chipset: Intel(R) Sandybridge Mobile (GT2)
[07:15] <RAOF> That one's nice :)
[07:17] <tvoss_> didrocks, just let me know when I can have fun on the arm builders, happy to take a look
[07:17] <didrocks> tvoss_: yeah, I pinged infinity, but no luck :/
[07:17] <tvoss_> didrocks, no pong or "no, you can't have fun on the builders"?
[07:18] <didrocks> no pong
[07:22] <duflu> I hate it when I wait a month for something to arrive, and then the wrong thing arrives
[07:22] <duflu> Day spoiled
[07:23] <alf_> duflu: :/
[07:36] <duflu> alf_: You mentioned it's a problem when the ground moves under your feet and MPs become conflicted... Yes I experienced this today as I have many times already. I don't think it's a problem we can avoid completely while so many people are working on Mir simultaneously
[07:36] <didrocks> alf_: look at https://code.launchpad.net/~didrocks/mir/remove-powerpc/+merge/175201 for the first part I guess :)
[07:36] <alf_> didrocks: thanks
[07:36] <didrocks> yw!
[07:38] <alf_> didrocks: Agreed. My point was that if we have too many such "disruptions", it will unavoidably slow down critical work, and it is a risk we should have in mind.
[07:38] <alf_> duflu: ^^
[07:38] <alf_> didrocks: sorry, wrong nick :)
[07:39] <didrocks> alf_: I started to think I hadn't enough coffee :p
[07:39] <duflu> alf_: Yes. I guess then large changes must be justified and have high value for helping future work... which usually large changes do
[07:40] <duflu> For example; a driver interface. It's a large change, but has high value
[08:23] <alan_g> duflu: why do you think the graphics namespace might "go away"?
[08:24] <duflu> alan_g: Because it makes no sense to designate part of Mir as "graphics" and other parts not graphics. It's all intended for graphics, so we should avoid the word
[08:25] <duflu> alan_g: "platform" ?...
[08:25] <alan_g> duflu: I concede that it is possible you can persuade the team to rename "graphics" to <something else>, but the namespace will still exist.
[08:26] <duflu> How?
[08:26] <duflu> alan_g: How would it still exist if it was renamed?
[08:26] <alan_g> As, for example, "platform"
[08:26] <RAOF> But Mir is not all intended for graphics; there's input, too.
[08:26] <alan_g> It will still have the same contents and role
[08:26] <duflu> RAOF: Almost all. The statement still holds :)
[08:27] <RAOF> In put is *at least* as big as graphics.
[08:27] <duflu> alan_g: Yes, true. Is your current proposal significantly different to just the namespace changes though?
[08:27] <duflu> I haven't looked at it all in detail
[08:28] <alan_g> yes, it moves stuff into that namespace
[08:28] <tvoss_> duflu, if we remove graphics, we should have a namespace platform
[08:29] <alan_g> Which is part of having a delineated garphics/platform API we can take to vendors
[08:29] <tvoss_> duflu, we almost certainly end up with prefixes like Graphics* and that's what namespaces are for
[08:29] <duflu> tvoss_, alan_g: Looking in more detail, I see we are moving things out of "compositor" that are platform independent. I don't think such things make sense in "platform" actually
[08:30] <duflu> Maybe "graphics" is just a stepping stone
[08:32] <alan_g> "graphics" is intentionally platform independent. That's why we have android and gbm implementations.
[08:33] <alf_> alan_g: ... which contradicts our moving platform independent code into it :/
[08:34] <alan_g> alf_: how does ""graphics" is intentionally platform independent" contradict " moving platform independent code into it :/"
[08:34] <alan_g> ?
[08:35] <alf_> alan_g: sorry, I read graphics (thinking gbm/android) is platform *dependent*, my comment is invalid
[08:45] <didrocks> alf_: still no review on my branch?
[08:49] <alf_> didrocks: done
[08:49] <didrocks> thanks ;)
[09:36]  * duflu goes stealth mode to avoid bugging Europe for the day (and vice versa)
[10:28] <hikiko> alf_, ping!
[10:28] <alf_> hikiko: pong
[10:28] <hikiko> hi
[10:28] <hikiko> do you have some time to ask you about the miron mir?
[10:30] <alf_> hikiko: sure
[10:31] <hikiko> https://lists.ubuntu.com/archives/mir-devel/2013-June/000166.html
[10:31] <hikiko> I have this as a reference but I am not sure about my design:
[10:32] <hikiko> mg::create_native_platform will be similar to current create_platform and leave in gbm/android
[10:32] <hikiko> mg::create_nested_platform will be similar to create_platform and in nested_platform.cpp
[10:33] <hikiko> and the create_native_platform_nested will call both?
[10:34] <hikiko> if the native platform doesn't know anything about the nested platform
[10:35] <alf_> hikiko: @mg::create_nested_platform, as things have evolved, you can probably skip this function and instantiate NestedPlatform directly (because it will live in libmirserver)
[10:35] <hikiko> yes but where?
[10:36] <hikiko> if it's required that
[10:36] <alf_> hikiko: @mg::create_native_platform_nested, this will create a native platform configured for nested functioning (e.g. no drm, no vt)
[10:36] <hikiko> sure but
[10:36] <hikiko> my question is:
[10:37] <alf_> hikiko: you can select which platform to create in DefaultServerConfiguration::the_graphics_platform()
[10:40] <hikiko> so I choose there to create the native_platform_nested and this does the rest
[10:41] <hikiko> I mean I just have to load the right callback
[10:44] <alf_> hikiko: at that point you should create either 1. the native platform: with mg::create_native_platform or 2. the nested platform: use the NestedPlatform class. We can start with NestedPlatform calling mg::create_native_platform_nested() internally to create the native platform in "nested" mode.
[10:47] <hikiko> got it :)
[10:48] <hikiko> thanks alan_g
[10:48] <hikiko> alf_*
[10:48] <hikiko> :)
[10:48] <alan_g> hikiko: yw
[10:48] <hikiko> hahaha
[10:52] <tvoss_> greyback, ping
[10:52] <greyback> tvoss_: pong
[15:21] <tvoss_> something is flakey in our armhf tests
[15:25] <tvoss_> dear armhf machine, faster please
[15:26] <bregma> tvoss_, can you be more specific about the flakiness?
[15:26]  * bregma is not disagreeing
[15:27] <tvoss_> bregma, I'm not entirely sure, but the file-based sync mechanism should be totally reliable albeit a bit unelegant :)
[15:27] <tvoss_> however, I do see the clients starting in strace and immediately exiting with 0
[15:29]  * bregma goes off to play with the synch mech
[15:30] <tvoss_> bregma, a pipe should help :)
[15:51]  * tvoss_ thinks that he could help the armhf build machine a little in translating to assembler
[15:56] <tvoss_> bregma, I have something like http://pastebin.ubuntu.com/5884664/ in mind
[16:00] <bregma> might want to epoll/signal in the wait to avoid a deadlock (does pipe() close if the writer exits without a shutdown()?)
[16:01] <tvoss_> bregma, should, feel free to adjust ... if you can take care of that sync mechanism in the acceptance tests, I willl look into the flakiness
[16:01] <tvoss_> I think it comes down to an unholy combination of buildd, kernel version, epoll and reactors
[16:01] <tvoss_> just triggered a rebuild
[16:02] <bregma> sure, but your rebuilds are still faster than mine
[16:02] <tvoss_> bregma, not sure :)
[16:54] <smspillaz> 1
[16:54] <smspillaz> :(
[16:55] <alan_g> smspillaz: ?
[16:56] <smspillaz> alan_g: older versions of byobu required you to select a screen session whenever you launched byobu
[16:56] <smspillaz> newer versions automatically resume your first
[16:56] <smspillaz> So I have a muscle-memory of byobu-1 which ends up in me saying "1"  a lot
[16:57] <alan_g> Yes I guessed that
[16:57] <alan_g> All change is bad
[17:33] <bregma> d'oh, fork() and RAII do not mix well
[18:47] <racarr> Hours of stress testing -> lunch
[19:00] <tvoss_> bregma, any more insight on your side?
[19:02] <racarr> Ah! I had one more idea and failed to leave for lunch...and then now I think I finally found it
[19:02] <racarr> (stress test)
[19:05] <racarr> well it finally makes sense why it crashes at least
[19:05] <racarr> NOW real lunch
[19:15] <kdub> rvalue fun
[19:46] <bregma> tvoss_, I'm fairly certain there's a race condition when the socket is destroyed by multiple child processes in the tests, but I'm still looking for concrete proof .. good news is I can repro locally now (after a 6 hour build)
[19:47] <bschaefer> bregma, are you getting a pure virtual function called? Causing it to crash? (I've ran into that when attempting to close the mir server before...)
[19:47] <bschaefer> or close a connection to the server
[19:48] <bregma> bschaefer, there is a deadlock where the test case is waiting for a signal but the child (signaller) has exited beforre the wait begins (qhich itself is a sequencing problem)
[19:48] <bschaefer> bregma, oo different problem then :)
[19:49] <bschaefer> bregma, children should learn to wait!
[19:49] <bregma> indeed
[19:52] <tvoss_> bregma, \o/
[19:52] <tvoss_> bregma, I will EOD now
[20:16] <thomi> morning
[20:17] <racarr> Morning
[20:27] <racarr> this stress-test race is a little deeper than just adding a mutex or something struggling a bit to find a solution even now that it's found
[20:29] <racarr> kdub: I feel like the general theme may interest you
[20:30] <racarr> msh::Surface is almost impossible to use safely outside of the scope of the Session that owns it
[20:31] <racarr> because, say, when a surface is closed, so we have to find a new surface to focus, so we find it and get a shared_ptr<msh::Surface>
[20:31] <racarr> and then call surface.anything()
[20:31] <racarr> and then another thread closes the surface
[20:32] <racarr> so your msh::Surface pointer is stlil valid but surface.anything()
[20:32] <racarr> throws...
[20:32] <racarr> because the ms::Surface is gone
[20:33] <racarr> I guess, you need session to act as a synchronization point so rather than like
[20:34] <racarr> bla = session.default_surface()
[20:34] <racarr> bla.take_input_focus(targeter)
[20:35] <racarr> you can do like session.take_input_focus_on_default_surface(targeter)
[20:35] <racarr> and the session will hold it's internal lock preventing a close_surface from being processed
[20:36] <racarr> but this feels unsatisfying and unscalable
[20:39] <racarr> The other immediate direction that comes to mind is exposing locks out of the session as API, i.e. msh::Session::Freeze f(session);, but this seems really error prone.
[20:40] <racarr> So maybe what you really want, is some way to promote a surface pointer, i.e. surface.no_really_block_any_thread_that_is_trying_to_destroy_this_surface_until_the_return_value_of_this_function_is_destroyed
[20:41] <racarr> so now I start to think that these are transactions
[20:41] <racarr> and wonder what Alan's thoughts so far are on the new scenegraph model ;)
[20:42] <racarr> because these sort of inconsistencies, are what the hypothetical group-mind scenegraph model is supposed to be able to solve
[20:43] <racarr> Another random API idea: session.transcation(std::function<void>())
[20:43] <racarr> which freees the session (with a recursive mutex)
[20:43] <racarr> and then invokes the callback
[20:43] <racarr> so this way you can write like
[20:44] <racarr> session.transaction([&](Session& s) { auto surface = s.default_surface(); surface.take_input_focus(); }
[20:44] <racarr> and anything calling i.e. Session::destroy_surface
[20:44] <racarr> will block until your transaction is complete
[20:45] <racarr> It's not really a transaction
[20:45] <racarr> because it's not reapplicable, what is it...
[20:47] <racarr> it's like an atomic operation. but it's not clear what session.atomically_do means (atomic with respect to what?)
[20:50] <robert_ancell> racarr, can you merge lp:~robertcarr/mir/simplify-depth-assignment with trunk?
[20:50] <racarr> robert_ancell: Yeah doing so now
[20:50] <robert_ancell> cool
[20:50] <racarr> robert_ancell: I finally found the stress race :)
[20:50] <racarr> in a way that explained the weirdness from yesterday and everything
[20:50] <racarr> so uite happy
[20:50] <robert_ancell> \o/ awesome!
[20:51] <robert_ancell> me too :)
[20:51] <racarr> but the solution is a little tricky
[20:51] <robert_ancell> and thomi too I expect
[20:51] <racarr>  /unclear
[20:51] <thomi> hmmm?
[20:51] <kgunn> robert_ancell: hope it clears some other stuff
[20:51] <kgunn> too
[20:51] <thomi> racarr: cool!
[20:52] <thomi> racarr: when you have a branch with the fix, let me know and I'll review your MP and test it here
[20:52] <thomi> I seem to be able to trigger these things more easily than most people
[20:52] <racarr> XD I get it like
[20:52] <racarr> ALWAYS
[20:52] <kgunn> hey, does anyone know any special fiddling required to run a system with both nvidia & intel gfx ?
[20:52] <racarr> within a second
[20:52] <thomi> apparently my CPU isn't just hyper-threaded, it's hyper-mega-awesome-threaded
[20:52] <kgunn> i know RAOF said his ran
[20:52] <thomi> racarr: awesome :)
[20:53] <kgunn> do you just load nouveau for nvidia and everything else should he "happy happy happy" ?
[20:53] <kgunn> oops/he/be
[20:54] <racarr> kgunn: When I had hybrid graphics the special fiddling was always disable one in the BIOS ;) not sure if you are hoping to do more than that
[20:54] <kgunn> nope....dandrader was trying xmir and having issues...i'll share tht
[20:55] <racarr> oh god. what an awful merge conflict
[20:56] <kgunn> racarr: thx for it
[20:56] <racarr> :)
[20:57] <kgunn> racarr: dandrader was looking for something fun...i told him he'd get a couple of beers from me if he solves the input lag
[20:57] <racarr> you mean the output lag!
[20:57] <racarr> or was that a dream
[20:57] <racarr> sometimes the team meeting is hard to remember
[20:57] <kgunn> racarr: right
[20:57] <kgunn> all depends....:)
[20:57] <kgunn> and i think most correctly...yet to be determined lag
[20:58] <kgunn> racarr: btw...i capture 2 other "please add api" tasks in the unity prep bp
[20:58] <kgunn> 1 for osk surfacetype
[20:58] <kgunn> and 1 for greeter
[20:59] <kgunn> i figure you know what they are....but if not....ping dandrader for osk & mterry for greeter
[20:59] <racarr> I think I do
[20:59] <racarr> simplify-depth-assignment is the first part of the greeter fix
[21:00] <racarr> buttttttttttttttttttttttttttttttttttttttttttttt the second part isn't clear to me yet
[21:00] <racarr> ill make sure I don't lose track of them :)
[21:05] <racarr> robert_ancell: Merging simplify-depth-assignemtn will take a while
[21:05] <racarr> something...strange landed
[21:05] <racarr> and I can't even understand how the tests pass in trunk
[21:05] <robert_ancell> racarr, np, was just checking you'd seen it
[21:05] <racarr> all the tests which are supposed to test depth ID
[21:05] <racarr> got replaced with default_depth
[21:06] <racarr> oh and then they pass because the expectations got reordered
[21:06] <racarr> to make them pass
[21:06] <racarr> -.-
[21:31] <racarr> -.-
[21:31] <racarr> all the surface stack ordering tests are broken
[21:31] <racarr> because they verify by comparing the reference to the rendering criteria and the buffer stream
[21:32] <racarr> but they all use stub buffers that share the same
[21:32] <racarr> rendering criteria and buffer stream
[21:32] <racarr> so by broken I mean they always pass
[22:27] <racarr> I think I have decided on (at least for a first proposal) this msh::Session::perform_transaction(std::function)
[22:27] <racarr> API.
[22:27] <racarr> The test is difficult to design though.
[22:28] <racarr> the, test should verify that during the body of the function argument to perform_transaction
[22:28] <racarr> calls to create/destroy surface block
[22:28] <racarr> it should also not be a racy test ;)
[22:36] <racarr> one interesting possibility, requiring some serious pthread nastiness
[22:36] <racarr> is first you have to pin your test thread to one core, and set pthread sched param to
[22:37] <racarr> SCHED_FIFO
[22:37] <racarr> then you create a session, and a surface and call perform_transaction
[22:37] <racarr> in your body, you start a new thread, which calls session.destroy_surface
[22:38] <racarr> oh and the new thread also needs to be pinned to the same core
[22:38] <racarr> so then after you strt the new thread, the test yields guaranteeing your surface destroying thread will run now
[22:39] <racarr> since they are both pinned to the same core, and scheduling mode is SCHED_FIFO
[22:39] <racarr> the thread is guaranteed to continue to run until it blocks or yields
[22:40] <racarr> so, in the test thread, right after you yield, you can check if the surface has been destroyed
[22:40] <racarr> if it has, then create_surface blocked (otherwise that thread would still be executing and will have finished destroying the surface)
[22:41] <racarr> err, if it hasn't*
[22:41] <racarr> if it has, then clearly create_surface succeeded
[22:41] <racarr> and you have deterministic test results, i.e. create_and_destroy_surface_block_during_body_of_transaction
[22:42] <thomi> robert_ancell: I notice that u-s-c has no license file!?
[22:43] <robert_ancell> thomi, I guess. It has license headers
[22:43] <robert_ancell> feel free to add one
[22:46] <racarr> I have the sick feeling that that test
[22:46] <racarr> would never land
[22:47] <thomi> robert_ancell: will do
[22:50] <thomi> robert_ancell: https://code.launchpad.net/~thomir/unity-system-compositor/add-license-file/+merge/175422
[22:51] <racarr> I dont think it's even possible to use SCHED_FIFO without root XD
[22:55] <racarr> I'm not sure this test is even possible as a normal user
[22:55] <racarr> because threads and processes are the same to the linux scheduler
[22:56] <racarr> so any program that can guarantee a thread executes
[22:56] <racarr> until it blocks
[22:56] <racarr> can bring down a single core system :p
[22:56] <racarr> but really I just want to guarantee, that another particular thread wont execute until that thread blocks
[22:57] <racarr> It's not actually a realtime requirement, I don't care if the kernel lets other processes run
[23:04] <thomi> robert_ancell: for this autopilot test, what's the best way of figuring out what hardware is running?
[23:29] <racarr> what I need is PTHREAD_SCOPE_PROCESS
[23:29] <racarr> but it's no tsupported on linux...
[23:29] <racarr> lol
[23:34] <RAOF> Really? That's odd.
[23:35] <racarr> RAOF: Actually linux pthread implementation seems to be roughly
[23:36] <racarr> the least expressive pthread implementation allowed by the specification
[23:36] <racarr> because of the lack of distinction between
[23:36] <racarr> threads and processes.
[23:36] <racarr> ahaha
[23:36] <racarr> I am not happy about pthreads atm if you can tell
[23:37] <RAOF> You could probably rube-golberg up the behaviour you want with an extra thread, right?
[23:38] <racarr> RAOF: I can't figure out a way...
[23:38] <RAOF> ie: a watchdog thread that monitors the thread you're interested in, and sets a flag when it's blocked.
[23:38] <racarr> can't
[23:38] <racarr> do that either in linux
[23:39] <racarr> i.e. tell if a thread is blocked
[23:39] <RAOF> What do we mean by “blocked” in this case?
[23:39] <racarr> RAOF: voluntarily yielded
[23:40] <racarr> RAOF: So the idea is, I am developing this API like session.do_transaction(std::function)
[23:40] <racarr> for solving...a series of other races, the stress test stuff
[23:40] <racarr> so, the semantics it needs to provide are
[23:40] <racarr> create_and_destroy_surface_block_during_body_of_transaction_function
[23:41] <racarr> so as far as I can see, the only way to deterministically test that is to
[23:41] <racarr> start a second thread from within your transaction callback, which tries to destroy a surface
[23:42] <racarr> and then guarantee that that thread runs until it blocks
[23:42] <racarr> i.e. isn't preempted by your original thread
[23:43] <racarr> because otherwise, all you can say is "that thread hasn't gotten to destroy surface yet..." (or rather, whatever instruction in the implementation of destroy surface the lock is actually held on)
[23:43] <RAOF> You should be able to parse /proc to assert that the thread isn't running?
[23:43] <racarr> but whatever code does that
[23:44] <racarr> might preempt the thread
[23:44] <racarr> and then it wont be running
[23:45] <racarr> i.e. the thread might exhaust it's timeslice and be stopped from running beore it actually blocks
[23:45] <racarr> so, an easy fix is to use
[23:45] <racarr> SCHED_FIFO
[23:45] <racarr> and pin both threads to the same core
[23:45] <racarr> but, because there is no PTHREAD_SCOPE_PROCESS
[23:46] <racarr> SCHED_FIFO requires root, and can bring down your entire system
[23:46] <racarr> lol
[23:46] <RAOF> Eh, it's a testsuite.
[23:46] <RAOF> They're pretty much allowed to bring down your system ☺
[23:46] <RAOF> piglit does all the time!
[23:46] <racarr> yeah but can they run as root?
[23:46] <racarr>  / with some weird RT capability flag
[23:47] <RAOF> Why can't they?
[23:47] <racarr> I dunno
[23:48] <racarr> I guess I just kind of assume someone would object and stop that from landing
[23:48] <racarr> I don't mean anyone in prticular, I just mean it sounds really
[23:48] <racarr> objectional
[23:48] <racarr> lol
[23:48] <racarr> BUG: Can't run tests as non root user!
[23:48] <racarr> haha, I guess it can just be a disabled test.
[23:48] <RAOF> We build the packages as root already, so setting the RT capability on the tests shouldn't be _too_ bad.
[23:49] <racarr> mm.
[23:49] <racarr> ok, those are all very good points.
[23:50] <racarr> XD, Thank you
[23:50] <racarr> I was kind of spinning from "Can't use SCHED_FIFO"
[23:50] <racarr> and just going deeper down that line
[23:50] <racarr> and reading very strange websites about freebsd
[23:50] <RAOF> Damn it takes *forever* to build an Ubuntu kernel.
[23:51] <RAOF> You try and add one piece of functionality to dma-buf, you're waiting hours for it to build!