/srv/irclogs.ubuntu.com/2014/05/02/#ubuntu-mir.txt

dufluWow... I've got a client to keep running after a server dies07:25
dufluAnd keep reporting a (higher) framerate :)07:25
RAOFThat's awkward.07:29
RAOFHeh. Turns out that rather than making a general interface that's hard to implement making an interface that does just what we need is much easier. :)07:30
dufluAbsolutely. Hack from top-to-bottom and then modularize when it becomes necessary. Then you'll end up with the simplest code07:32
dufluThat's also fun. DRM reports my refresh rates are 59.95-60Hz. Yet when I measure the actual frame interval it's just below 59.90Hz07:48
dufluI guess it's just a guide...07:48
dufluOn the plus side, that's good for my Canon camera, which annoyingly records video at 59.94Hz07:49
RAOFAnd with that, EOW.07:57
=== Mirv_ is now known as Mirv
=== davmor2_ is now known as davmor2
greybackalan_g: ping11:31
alan_ggreyback: wotcha!11:31
greybackalan_g: heya :) I've question about run_mir. I see of code in that file dealing with signal handling, am I right that Mir intercepts the signal first, then propagates it to the inprocess client? (fatal_signal_cleanup)11:32
alan_ggreyback: it has been a while since I looked at that code. IIRC it does some cleanup and then propagates the signal to the previous handler.11:34
alan_gBut the cleanup is pretty limited - tell the server to stop and zap the filesystem endpoint (if any)11:35
alan_galf_: ^^ you're working on changes around this stuff. Do you know?11:36
alan_ggreyback: I'm just off to lunch. I can take a look when I get back.11:37
=== alan_g is now known as alan_g|lunch
greybackalan_g|lunch: it's not major, am trying to fix crash bug on unity8 stop, and need to understand exactly what run_mir is doing11:47
alf_greyback: unless the inprocess client has set new signal handlers, fatal_signal_cleanup gets it first and then propagates to any previous handlers12:11
alf_greyback: unless the inprocess client has set new signal handlers, *after* run_mir is called, ...12:11
greybackalf_: if I set a signal handler before run_mir is called, does it get run before the one set by run_mir?12:13
alf_greyback: no, it runs after12:14
alf_greyback: I assume we are still talking about the auto const intercepted = { SIGQUIT, SIGABRT, SIGFPE, SIGSEGV, SIGBUS }; signals12:15
alf_greyback: i.e. the fatal signals12:15
greybackalf_: I have 2 issues: (1) when Ctrl+C hit, mir server shuts down, but Qt doesn't realise it. I've worked around it, but it's not great. (2) if Qt (the in process client) quits, I want to stop Mir safely.12:19
greybackhttp://bazaar.launchpad.net/~mir-team/unity-mir/trunk/view/head:/src/unity-mir/qmirserver.cpp is what we're doing12:19
greybackissue (2) is the one concerning me right now12:19
greybackthe bug is if I hit Ctrl+C, the server.stop() on line 63 causes a crash12:20
greybackI suspect it is due to calling stop() on a deleted server, but am not really sure. But this code is getting messier & messier, so want a better approach12:21
alf_greyback: ok, so ctrl+c (SIGINT) is another matter, it doesn't go through fatal_signal_cleanup12:22
alf_greyback: To stop the server you can call server_config.the_main_loop()->stop()12:23
greybackalf_: what is DisplayServer::stop for then?12:24
alf_greyback: or DisplayServer::stop()12:24
alf_greyback: it's the same12:24
greybackyep12:24
greybackcan you see any problem with calling DisplayServer::stop after the client returns?12:25
greybackit works fine if client returns, and mir still running as usual12:26
greybackbut it crashes there with SIGINT, presumably Mir is shutting down having received that signal12:26
alf_greyback: right, so by then the DisplayServer may have been destroyed, so 1. you can call server_config.the_main_loop()->stop() which in the worst case will recreate a main loop and have no effect 2. track server lifecycle with the ServerStatusListener12:27
greybackalf_: ok, will try those, thanks12:28
=== pete-woods is now known as pete-woods-lunch
alan_ggreyback: do you still need an answer? (I dropped off over lunch)12:58
greybackalan_g: I'm ok for now, alf helped me, thanks12:59
alan_g:)12:59
=== tedg` is now known as tedg
alan_galf_: I don't plan to land it in this form (hence it is WIP) but could you review this for me please? https://code.launchpad.net/~alan-griffiths/mir/spike-passing-out-client-fds/+merge/21807413:30
alf_alan_g: sure13:32
alan_gdednick: I've cleaned up the client-fd spike a bit since yesterday. Have you had a chance to look at it? Should we look at combining it with the stuff you've been doing?13:36
greybackalf_: hey, using server_config.the_main_loop()->stop()  does appear to improve things, but might be exposing a Mir bug, as I now get a crash in hwcVsyncThread13:36
greybackalf_: random crash I should say, sometimes it is fine13:36
greybackalso, after a few server crash & restarts, input appears to break completely13:38
greybackon the phone that is13:39
dednickalan_g: thanks haven't had a chance to have much of a look yet. i'll do it this afternoon.13:40
alf_greyback: can you please try if storing the_main_loop() before run_mir and using the stored variable makes a difference?13:40
alan_gdednick: fine. I'll leave it "parked" until you get back to me. No rush.13:41
greybackalf_: no change13:43
alf_greyback: ok, we will need to talk to kdub or AlbertA because hwcVsyncThread seems to be in the Android system or drivers13:44
alf_greyback: It would be helpful if we could figure out the circumstances (esp. timing) under which this happens, e.g., if it happens when the client finishes first and then the server or vice versa etc13:47
greybackalf_: ok. I'm failing to get even a useful stracktrace13:47
greybackalf_: why are we allowing the server to shut down before the client has?13:48
alf_greyback: who needs stacktraces when there is printf/std::cout ;)13:48
greybackalf_: also being devil for a minute: what do I loose by not using run_mir, but creating, starting & stopping the DisplayServer myself?13:49
alf_greyback: I am not sure about the details of our interaction with the internal clients will have to look13:49
greyback(that is what I'm doing in the QtCompositor code)13:49
alan_ggreyback: you lose convenience13:50
greybackalan_g: I gain the full control over Mir13:50
alf_greyback: you also lose proper mir shutdown under most circumstances (which is related to convenience, since you can reimplement this yourself of course)13:51
alan_gAnd with that power comes responsibility. ;)13:51
greybackMir intercepting and acting upon signals, before anything higher up has a chance to, is hard for the higher up to deal with13:51
greybackI would prefer that Qt is always fully shut down, before Mir shuts down13:51
alan_ggreyback: there are serious limits to what can be done in a signal hander. But we can seek a "better way" together...13:53
alf_greyback: alan_g: perhaps we should extend the ServerStatusListener with a stopping() method, to allow users to act before Mir components actually shut down, but it depends on the particular situation whether this would be helpful or not13:54
greybackalan_g: sure. I need the help :) But this is a problem point for me and Mir, I've always struggled with it to be reliable13:54
alf_greyback: please join stand-up today if possible and we can discuss a bit there13:56
greybackalf_: ok13:56
alan_ggreyback: I missed part of the conversation. But it seems to me that you really want to know Mir intends to shut down - not that a signal has been received.13:57
greybackalan_g: it is the fact that Mir decides to shut down, without the client having any say in the matter, that bothers me13:58
greybackclient = the in-process client, the user of libmirserver13:59
greybackit bothers me that a library instigates shutdown on the applicaiton that uses it13:59
alan_gthat sounds reasonable.13:59
alf_greyback: with mir the customer is never right ;)13:59
greyback:D14:00
greybackbut the customer is demanding :)14:00
alan_galf_: in this industry we have "users" not "customers"14:00
alan_ggreyback: so, if there were a layer of indirection between run_mir() installing signal handlers and what those handlers do, and you could change and/or wrap the defaults would you be a happy user?14:03
alf_greyback: alan_g: ... I was about the propose something like that ^^^14:04
greybackalan_g: alf_: I think that would be good yes.14:04
alan_gAll problems in computer science can be solved by another level of indirection14:05
alan_g"All problems in computer science can be solved by another level of indirection"14:05
alan_g...14:05
alan_gDavid Wheeler14:05
alan_galf_: do you want to write & propose something? Or shall I?14:08
=== dandrader is now known as dandrader|afk
alf_alan_g: greyback: I can do it, unless it's urgently needed today, in which case you have more time until EOD14:09
greybackalf_: my bug is bug 1315251. I wouldn't classify it as a Critical as it's not effecting users, but it's getting in the way of tests.14:11
ubot5bug 1315251 in unity-mir "unity8 7.86+14.10.20140429.2-0ubuntu1 crashes on recent utopic images" [High,In progress] https://launchpad.net/bugs/131525114:11
greybackI'll continue trying to work around it for now14:11
alf_greyback: ok, we will have an MP by Monday if not today14:12
greybackalf_: thank you14:13
alf_greyback: still, please join the stand up to ensure we have all the details right14:13
greybackwill do14:13
=== pete-woods-lunch is now known as pete-woods
=== alan_g is now known as alan_g|tea
=== dandrader|afk is now known as dandrader
=== alan_g|tea is now known as alan_g
alf_alan_g: trying to understand spike-passing-out-client-fds. So, is the point to allow a client (I guess trusted server?) to request a new connection endpoint and get back an fd for that connection that it will then pass to another client?14:49
alan_galf_: yes - so the main point is the server -side wiring. The IPC call I introduced will probably morph into a trust related API.14:50
anpokthe StubbedServerConfiguration adds two options 'tests-user-real-input' and 'tests-use-real-graphics' .. so that when real-input is not set stubs are used..15:48
anpokbut those parameters are never set.15:48
anpokwhich is probably because there is yet no method to set parameter in mo::Option15:50
alan_ganpok: you can set them on the command line15:52
alan_g(Or in the environment)15:53
anpokhm the latter seems to be simpler in that cae15:58
anpok*case15:58
alan_gIt is the same as any of the other options - the user gets to chose how to set it16:04
anpokalan_g: i mean, thats part of the tests .. mir_test_frameworks16:06
alan_ganpok: I know16:06
alan_gYou can put options on the command line or in the environment when using the test framework16:07
alan_gIncluding the two you mention16:07
anpoki just wonder where the best place for setting those options would be16:10
anpokthe StubbedServerConfiguration is a base class for InputTestingServerConfiguration.. that one is used in tests that will only work when real input components are used16:12
alan_gThat sounds like a bad idea16:13
anpokyip16:13
alan_gI mean why use a configuration that stubs something you want to use16:13
alan_g?16:13
anpokit only worked up to know because the InputTestingServerConfiguration overrides methods..16:14
anpoks/know/now16:14
anpokalan_g: StubbedServerConfiguration, kind of stubs everything with regard to input and graphics.. as far as i can see16:15
alan_gThat's the point of it16:15
alan_gThe clue is in the name16:15
anpokInputTestingServer "un"-stubs the input part to some degree..16:15
anpok:)16:15
anpokby overriding again..16:16
* alan_g thinks "bzr blame" might be useful16:16
* alan_g resists the temptation16:17
anpok:)16:17
alan_gSo, don't use the Stubbed config if you don't need it16:17
anpokhm have to check which test also relies on that derived configuration16:19
alan_ganpok: when something doesn't make sense it should be fixed. (Preferably in an MP that just fixes the error.)16:20
kgunn_anpok: sorry to pester, but you said you couldn't mp b/c of prereq branch had "needs fixing"...racarr's scene observer stuff....16:31
kgunn_which branch ? i poked around but couldn't find16:31
alan_gkgunn_: scene observe has landed16:39
alan_g*observer16:39
kgunn_ack16:43
=== alan_g is now known as alan_g|EOD
=== dandrader is now known as dandrader|lunch
=== dandrader|lunch is now known as dandrader
josharensonI'm trying to use InProcessServer, but it crashes. I think the problem is how I'm setting up the serverConfigration. Is this a valid way to create a server configuration? http://pastebin.ubuntu.com/7381079/18:00
=== chihchun is now known as chihchun_afk
=== csslayer_ is now known as csslayer
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader

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