/srv/irclogs.ubuntu.com/2013/11/20/#ubuntu-mir.txt

racarrkgunn: Wait so whattimeisitnow? Not sure ifitupdated in my calendar01:12
racarri.e. dont remember when it was last week01:12
kgunnracarr: hey...so...i forgot to make it a repeat anyway...so i had to just send a new invite01:13
kgunnracarr: so its, 3hr 15 min from now01:13
racarrkgunn: Ok01:17
racarrdepending on how my soon to start bus bound adventure goes I may be a little late.01:17
kgunnracarr: np01:17
duflukgunn: Make it earlier perhaps? As in 90 minutes?01:29
=== chihchun_afk is now known as chihchun
kdubduflu, good job on the resizing work :) all my devices seem to work with it03:10
duflukdub: Thanks, but it's still laggy without events03:13
duflukdub: BTW, even Nexus7? I've found Mir on N7 hasn't responded to touch properly (if at all) for some time03:14
duflu--> bug 123950103:15
ubot5bug 1239501 in Mir "Nexus 7 does not respond to touch" [High,Triaged] https://launchpad.net/bugs/123950103:15
dufluHmm, hanging the server with a broken client is bad, right?09:35
alan_gyep09:39
dufluArgh. So. Many. Deadlocks09:41
duflu.09:41
alan_gWant to talk about it?09:41
duflualan_g: If I had the words to describe them I would have logged bugs. But for now it's easy to blame myself, since they only happen on my branch09:43
dufluAlthough me finding deadlocks is different to me causing deadlocks :/09:44
alan_gso true09:44
dufluOne of the major problems I have encountered is our client event callbacks coming in on their own thread. That's quite a problem for simple single-threaded clients.09:45
alan_gHmm. We don't have control of the single tread to execute callbacks on it - so what would you do instead?09:47
duflualan_g: I presently have to use pthreads in the single threaded client to signal the primary rendering thread from the event thread. That's not ideal09:49
alan_gWhy does the simple single-threaded client need to use callbacks? Doesn't the ..._sync API cover it?09:50
duflualan_g: How else do you get immediate notification of resizing?09:51
duflu... or input etc09:51
dufluOr do you mean we need a mir_wait_for(mir_next_event(&e)) ? :)09:52
alan_gSo, you'd want to poll an event queue?09:52
* alan_g bad memories of the Windows event loop09:52
duflualan_g: Not poll. I'm happy to have everything event driven and sleeping nicely. But whatever it takes to get clients back to one thread would be excellent09:53
dufluor perhaps:  what = mir_wait_for_either(mir_sleep(n), mir_next_event(&e))09:54
alan_gmir_get_event_sync(...)?09:55
duflualan_g: You really need support for waiting on multiple handles simultaneously to do it properly. Like Win32's WaitForMultipleObjects09:56
duflumir_wait_for_any(a, b, c, NULL)09:57
alan_gPerhaps - but doesn't that go further than the "simple" single-threaded client case needs?09:59
alan_gBTW How does this hang the server?10:00
duflualan_g: I have the server hung in send() sending a trivial resize notification, while the client is somehow deadlocked.10:03
dufluI'll just avoid that path for now and if I can describe the problem in terms of existing logic, then log a bug10:03
alan_gduflu: that's clearly a server side bug - I can look at that later10:04
alan_gduflu: if the default event callback were to push events into a queue and we provided an optionally blocking  call to pull off the queue doesn't that cover the simple case?10:13
duflualan_g: Essentially yes. I would want to fuss over the client-side API we expose though. In the least you need to be able to wait for any-and-all Mir things that could be happening, including a timeout/sleep to animate the client10:15
dufluEven more weird... it's safe for an event callback to swap_buffers on motion events, but not on resize events which originated from motion events10:18
alan_gDoes "safe" mean guaranteed by a standard? Or just "doesn't break on my machine"?10:20
mlankhorstWhat if the standard is doesn't break on my machine? ;)10:20
duflualan_g: Doesn't *seem* to break and has worked for most of the year10:20
duflu(as in fingerpaint)10:21
alan_gAh10:21
duflualan_g: It appears my hanging send() contains a TODO :)  [mfd::SocketMessenger::send()]10:27
alan_gThat TODO is a typical comment - it disagrees with the code10:30
alan_gthe send_fds it refers to is now part of that function10:31
duflualan_g: I mean that I need it to be async. It's not.10:31
dufluWhat are the "fds" we're passing around all the time??10:32
alan_gduflu: It shouldn't block anyway - so being async would be at best an optimization10:32
duflualan_g: It seems a broken client can block it :)10:33
alan_gthe fds are handles from gbm or android10:33
duflualan_g: Why do we use them on every message? That's weird10:33
alan_gThey're optional on all messages. Only a few send them10:33
alan_gThe wire protocol is blob+optional fds10:34
duflualan_g: Oh, I see. Empty if not provided10:34
alan_gack10:34
alan_gSo you think we're writing bytes to a socket and get throttled because the client isn't reading the other end?10:37
=== chihchun is now known as chihchun_afk
duflualan_g: Yes, I think so. Another (probably different) problem I have now is that the surface events come in on a different thread to input events. Yet they share the same callback so it's very confusing10:51
dufluI suspect we'll need to solve this before resize events can be usefully demonstrated. Unless I instrument all the examples with pthread magic, but that's bad10:52
alan_g@"on a different thread" - that's weird. I though there was just the comms thread (and any threads the client code has)10:55
duflualan_g: Weird, but I just remembered I documented that when I discovered it -- http://unity.ubuntu.com/mir/group__mir__toolkit.html#ga171267b0c507a17b2d76a8e927f2d95910:56
duflu"and locking" should say "any locking"10:57
* duflu closes the can of worms and wanders off11:04
alan_galf_: How strong is your preference for references? gmock is throwing up a bunch of errors when I set expectations on a mock of fill_ipc_package(BufferIPCPacker& packer, Buffer const& buffer) - it can't check anything for equality and doesn't like incomplete types.11:41
* alan_g thinks pointers are fine anyway11:41
alf_alan_g: My preference is strong, but if references are causing problems I am OK with pointers.11:46
alan_gpointers it is then.11:57
alan_gtvoss_: when you have a moment: https://code.launchpad.net/~alan-griffiths/unity-system-compositor/dont-use-ApplicationSession/+merge/19307011:59
tvoss_alan_g, looking12:08
=== alan_g is now known as alan_g|afk
=== alan_g|afk is now known as alan_g
didrockskgunn: Mir in -proposed! (thanks to the restless Mirv)13:32
didrockslet me cry of joy for a minute :)13:32
Mirv:)13:36
tvoss_didrocks, :)13:37
greybackcould someone please check that Mir in daily-proposed works on the Nexus10? It's failing for me with http://pastebin.ubuntu.com/6448151/13:38
Mirvaddition to above, Mir almost in -release pocket as well (visible in LP that it's already accepted, waiting for publisher run)13:46
alan_gMust be time to try landing another batch of updates. ;)13:48
Mirv:) rmadison now tells it's in archives for real13:57
fgintherkgunn, are https://bugs.launchpad.net/ubuntu-ci-services-itself/+bug/1252933 and https://bugs.launchpad.net/ubuntu-ci-services-itself/+bug/1252857 duplicates?13:58
ubot5Ubuntu bug 1252933 in Ubuntu CI Services "Mir performance testing as a merge requirement" [Undecided,New]13:58
ubot5Ubuntu bug 1252857 in Ubuntu CI Services "mir performance baseline, tracking, & blocking" [Undecided,New]13:58
fgintherkgunn, I received 1252933 from thomi13:58
=== dandrader is now known as dandrader|afk
kgunnMirv: didrocks ...thanks both!14:03
* kgunn will be laughing all day imagining didrocks crying tears of joy14:03
kgunnfginther: lemme look14:03
didrockskgunn: rohhhh! you have no idea about the pain we endure ;)14:04
kgunnfginther: yes...those seem to be duplicates, i guess thomi thot mine sucked :)14:05
fgintherkgunn, I filed the second bug, didn't think to look for one first :-)14:05
kgunnfginther: np14:05
=== dandrader|afk is now known as dandradee
=== dandradee is now known as dandrader
alan_ggreyback: I don't have one to test - but I think you need -r 1228 of dev branch for N10. trunk is based on r119214:28
greybackalan_g: okay14:32
alan_ggreyback: and to use dev-branch we need to land https://code.launchpad.net/~alan-griffiths/unity-mir/dont-use-ApplicationSession/+merge/195242 (hint hint)14:33
greybackalan_g: sure. I'm trying to test it as I type, just bad luck I chose nexus10 to test it on14:34
greybackalan_g: I've added 2 little comments to that MR just now14:34
alan_ggreyback: fixing...14:36
alan_gtvoss_: when you have a moment: https://code.launchpad.net/~alan-griffiths/unity-system-compositor/dont-use-ApplicationSession/+merge/19307014:37
tvoss_alan_g, yup, still looking14:39
Mirvkgunn: you're welcome14:39
alan_ggreyback: ...pushd14:40
greybackalan_g: thanks14:40
=== alex-abreu|afk is now known as alex-abreu
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== alan_g is now known as alan_g|tea
greybackalan_g|tea: https://code.launchpad.net/~alan-griffiths/unity-mir/dont-use-ApplicationSession/+merge/195242? approved, top approve at your desire15:45
=== alan_g|tea is now known as alan_g
alan_ggreyback: top-approved. Thanks15:46
tvoss_alan_g, can I just use your branch of usc, latest Mir and whatever X drivers we have and give it a spin?16:18
alan_gtvoss_: I would hope so.16:20
=== dandrader is now known as dandrader|lunch
tvoss_alan_g, building right now, just wanted to check before I kill my local setup :)16:20
* alan_g assumes that the trunk usc is working (hasn't tried it yet)16:21
tvoss_alan_g, can you give it a spin, too?16:26
alan_gtvoss_: I'm not really set up for it right now. Too many versions in flight16:28
tvoss_alan_g, ack, I will give it a spin on two machines then. I'm hesitant to approve as usc has no no tests in place16:29
alan_gthat's something I'd like to get fixed. But only one set of hands16:29
tvoss_alan_g, sure, not saying it's your fault :) just explaining high latency for the review here16:35
alan_gtvoss_: I know.16:36
=== dandrader|lunch is now known as dandrader
=== dandrader is now known as dandrader|afk
=== RoddieKieley1 is now known as RoddieKieley
=== dandrader|afk is now known as dandrader
mterryHeyo!  Can someone help me with a nested-mir issue?  "Nested Mir failed to find an opaque surface format"19:37
mterryI can reproduce with just mir-demos19:37
racarrmterry: Oh this is the transparentstuff19:38
racarrmterry: https://code.launchpad.net/~robertcarr/mir/alpha-for-nested-servers/+merge/193162 will unblock you for nowbut it wont land19:39
mterryracarr, yeah.  I realized today I've been testing all this time with that branch in place19:39
mterryracarr, assumed it would have landed by now.  But I see that feedback is needed on that branch19:39
mterryracarr, what can I do to move that branch (or something like it) along?19:40
mterryracarr, at this point, it's not even what the greeter needs.  This error is just preventing nested Mir at all19:40
racarrI guess I need to redo it to expose an option or something19:41
racarroratleast pick a transparent format if there is an opaque one in plac19:41
racarreerr19:41
racarrif there is no opaque one19:41
mterryracarr, also...  is there not an automated test involving nested Mir?  I would have expected such a test to hit this, although maybe this is android specific19:44
racarrno automated testing on actual android devices19:44
mterryracarr, well, once we land nested, I guess it will get tested all the time19:46
mterryracarr, well, if this could get highish priority, I'd give you a hug19:47
mterryracarr, I'm *so* close to landing nested mode19:47
mterryracarr, so why can't a nested Mir find an opaque surface format anyway?  Why would that change in nested mode?19:51
racarrmterry: Oh it's just that nothing else insists on having an opaque surface.19:51
mterryracarr, oh19:52
mterryracarr, and android can't provide one?19:52
racarrmterry: Apparently not that seems like it must be abug though19:58
mterryracarr, OK, well if there's anything I can do to help, let me know19:59
racarrmterry: Ok thanks. I will get on it in like20:01
racarr30mins20:01
racarrI forgot about the underlying bug when the branch was abandoned because we dont need alpha anymore20:02
* kdub wades into composition options20:09
mterryracarr, me too  :)20:11
mterryracarr, and we do need alpha...  just not immediately20:11
mterryracarr, greeter will still want to be semi-transparent20:11
kdubi don't really know why we even have that error20:29
kdubmaybe gbm can't bypass buffers with alpha?20:30
racarrkdub: Ithink it was20:48
racarr"optimization"20:48
racarrand a weird strategy ;)20:48
rsalvetikdub: so, one more device, the emulator :-)21:26
rsalveti5 "android"-based devices21:26
kdubrsalveti, yeah21:27
kdubis that working with mir?21:27
rsalvetikdub: yup21:27
kduboh :) thats good news21:28
racarrJust had a fun idea...trying to figure out how to make the focus mechanism make sense,the idea of customizing behavior doesn't make so much sense anymore, but it's nice for testing the default shell/system compositor, i.e. EXPECT(focus_setter, set_focus), v. EXPECT(surface_controller,raise) EXPECT(input_targeter, target)21:53
racarrso I had the idea that maybe there is a 'FocusTracker' which handles the bit of defocusing the focused surface (i.e. updating the attribute) when we focus a new surface21:56
racarrbut rather than a 'FocusTracker' it could just be a callback21:56
racarri.e. mf::Shell::create_surface(Session, SurfaceParameters, std::function<void(FocusState)> track_focus)21:57
racarrthe more I type the less im sure :p21:57
racarrYou can test instead with an integration test by acting on the event sink...21:59
racarrand thats probably more clear21:59
racarrmterry: https://code.launchpad.net/~robertcarr/mir/nested-dont-require-opaque-surface/+merge/19602622:04
racarrshould have just dont that right away :p its tiny22:04
racarrsorry22:04
mterryracarr, heh.  why does nested mode want an opaque surface anyway?22:04
mterryracarr, the performance aspect?22:05
mterryracarr, oh, just noticed that you want me to review that branch.  I can test on my device, sure.  But should probably have an actual mir dev actually review22:15
* mterry goes to test22:15
mterryracarr, btw, I'm a little confused by the issues of performance around the alpha branch.   If the background is alpha, but opaque things cover that background (like would happen in unity8), why would there be a performance hit?  I figured that alpha bg would be optimized out22:37
kdubrsalveti, how does the emulator work?23:00
kdubkinda a vague question23:00
kdubbut is it using a software egl for the android platform?23:01
xnoxkdub: emulator is the same one as for android. there are egl libraries in android-container, which do pass-through to hypervisor, where a traslation from egl -> host gl is done, host's drivers are used to process gl, and it gets fed back into the emulator.23:26
kdubhmm, interesting23:28
kduband the host is X...23:29
kdubxnox, how about the display?23:29
xnoxkdub: there is no host X involved at all.23:30
xnoxkdub: it's a virtual machine, based on goldfish kernel. so there is goldfish framebuffer which is what mir paints on.23:30
xnoxto the user it is magically projected over vnc.23:30
xnoxand that's how humans look at it =)23:31
xnoxthe egl -> gl -> egl translator is very cunning.23:31
xnoxyou can run emulator head-less, as in without projecting the vnc window anywhere.23:32
kdubso the emulator does the translation from android platform egl to the host platform's egl?23:32
kduband the other curiosity is that mir only paints the fb via the android HAL surrounding the fb.... so there must be some goldfish friendly hwc somewhere23:33
kdubneat...23:39
* kdub pokes around android code in this area23:39
kdubokay, i see how this all works from a high level then.. very cool23:49

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