[07:25] Wow... I've got a client to keep running after a server dies [07:25] And keep reporting a (higher) framerate :) [07:29] That's awkward. [07:30] Heh. 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:32] Absolutely. Hack from top-to-bottom and then modularize when it becomes necessary. Then you'll end up with the simplest code [07:48] That'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.90Hz [07:48] I guess it's just a guide... [07:49] On the plus side, that's good for my Canon camera, which annoyingly records video at 59.94Hz [07:57] And with that, EOW. === Mirv_ is now known as Mirv === davmor2_ is now known as davmor2 [11:31] alan_g: ping [11:31] greyback: wotcha! [11:32] alan_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:34] greyback: 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:35] But the cleanup is pretty limited - tell the server to stop and zap the filesystem endpoint (if any) [11:36] alf_: ^^ you're working on changes around this stuff. Do you know? [11:37] greyback: I'm just off to lunch. I can take a look when I get back. === alan_g is now known as alan_g|lunch [11:47] alan_g|lunch: it's not major, am trying to fix crash bug on unity8 stop, and need to understand exactly what run_mir is doing [12:11] greyback: unless the inprocess client has set new signal handlers, fatal_signal_cleanup gets it first and then propagates to any previous handlers [12:11] greyback: unless the inprocess client has set new signal handlers, *after* run_mir is called, ... [12:13] alf_: if I set a signal handler before run_mir is called, does it get run before the one set by run_mir? [12:14] greyback: no, it runs after [12:15] greyback: I assume we are still talking about the auto const intercepted = { SIGQUIT, SIGABRT, SIGFPE, SIGSEGV, SIGBUS }; signals [12:15] greyback: i.e. the fatal signals [12:19] alf_: 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] http://bazaar.launchpad.net/~mir-team/unity-mir/trunk/view/head:/src/unity-mir/qmirserver.cpp is what we're doing [12:19] issue (2) is the one concerning me right now [12:20] the bug is if I hit Ctrl+C, the server.stop() on line 63 causes a crash [12:21] I 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 approach [12:22] greyback: ok, so ctrl+c (SIGINT) is another matter, it doesn't go through fatal_signal_cleanup [12:23] greyback: To stop the server you can call server_config.the_main_loop()->stop() [12:24] alf_: what is DisplayServer::stop for then? [12:24] greyback: or DisplayServer::stop() [12:24] greyback: it's the same [12:24] yep [12:25] can you see any problem with calling DisplayServer::stop after the client returns? [12:26] it works fine if client returns, and mir still running as usual [12:26] but it crashes there with SIGINT, presumably Mir is shutting down having received that signal [12:27] 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 ServerStatusListener [12:28] alf_: ok, will try those, thanks === pete-woods is now known as pete-woods-lunch [12:58] greyback: do you still need an answer? (I dropped off over lunch) [12:59] alan_g: I'm ok for now, alf helped me, thanks [12:59] :) === tedg` is now known as tedg [13:30] alf_: 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/218074 [13:32] alan_g: sure [13:36] dednick: 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] alf_: 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 hwcVsyncThread [13:36] alf_: random crash I should say, sometimes it is fine [13:38] also, after a few server crash & restarts, input appears to break completely [13:39] on the phone that is [13:40] alan_g: thanks haven't had a chance to have much of a look yet. i'll do it this afternoon. [13:40] greyback: can you please try if storing the_main_loop() before run_mir and using the stored variable makes a difference? [13:41] dednick: fine. I'll leave it "parked" until you get back to me. No rush. [13:43] alf_: no change [13:44] greyback: ok, we will need to talk to kdub or AlbertA because hwcVsyncThread seems to be in the Android system or drivers [13:47] 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 etc [13:47] alf_: ok. I'm failing to get even a useful stracktrace [13:48] alf_: why are we allowing the server to shut down before the client has? [13:48] greyback: who needs stacktraces when there is printf/std::cout ;) [13:49] alf_: also being devil for a minute: what do I loose by not using run_mir, but creating, starting & stopping the DisplayServer myself? [13:49] greyback: I am not sure about the details of our interaction with the internal clients will have to look [13:49] (that is what I'm doing in the QtCompositor code) [13:50] greyback: you lose convenience [13:50] alan_g: I gain the full control over Mir [13:51] 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] And with that power comes responsibility. ;) [13:51] Mir intercepting and acting upon signals, before anything higher up has a chance to, is hard for the higher up to deal with [13:51] I would prefer that Qt is always fully shut down, before Mir shuts down [13:53] greyback: there are serious limits to what can be done in a signal hander. But we can seek a "better way" together... [13:54] 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 not [13:54] alan_g: sure. I need the help :) But this is a problem point for me and Mir, I've always struggled with it to be reliable [13:56] greyback: please join stand-up today if possible and we can discuss a bit there [13:56] alf_: ok [13:57] greyback: 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:58] alan_g: it is the fact that Mir decides to shut down, without the client having any say in the matter, that bothers me [13:59] client = the in-process client, the user of libmirserver [13:59] it bothers me that a library instigates shutdown on the applicaiton that uses it [13:59] that sounds reasonable. [13:59] greyback: with mir the customer is never right ;) [14:00] :D [14:00] but the customer is demanding :) [14:00] alf_: in this industry we have "users" not "customers" [14:03] greyback: 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:04] greyback: alan_g: ... I was about the propose something like that ^^^ [14:04] alan_g: alf_: I think that would be good yes. [14:05] All problems in computer science can be solved by another level of indirection [14:05] "All problems in computer science can be solved by another level of indirection" [14:05] ... [14:05] David Wheeler [14:08] alf_: do you want to write & propose something? Or shall I? === dandrader is now known as dandrader|afk [14:09] alan_g: greyback: I can do it, unless it's urgently needed today, in which case you have more time until EOD [14:11] alf_: 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] bug 1315251 in unity-mir "unity8 7.86+14.10.20140429.2-0ubuntu1 crashes on recent utopic images" [High,In progress] https://launchpad.net/bugs/1315251 [14:11] I'll continue trying to work around it for now [14:12] greyback: ok, we will have an MP by Monday if not today [14:13] alf_: thank you [14:13] greyback: still, please join the stand up to ensure we have all the details right [14:13] will do === 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 [14:49] 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:50] alf_: yes - so the main point is the server -side wiring. The IPC call I introduced will probably morph into a trust related API. [15:48] the 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] but those parameters are never set. [15:50] which is probably because there is yet no method to set parameter in mo::Option [15:52] anpok: you can set them on the command line [15:53] (Or in the environment) [15:58] hm the latter seems to be simpler in that cae [15:58] *case [16:04] It is the same as any of the other options - the user gets to chose how to set it [16:06] alan_g: i mean, thats part of the tests .. mir_test_frameworks [16:06] anpok: I know [16:07] You can put options on the command line or in the environment when using the test framework [16:07] Including the two you mention [16:10] i just wonder where the best place for setting those options would be [16:12] the StubbedServerConfiguration is a base class for InputTestingServerConfiguration.. that one is used in tests that will only work when real input components are used [16:13] That sounds like a bad idea [16:13] yip [16:13] I mean why use a configuration that stubs something you want to use [16:13] ? [16:14] it only worked up to know because the InputTestingServerConfiguration overrides methods.. [16:14] s/know/now [16:15] alan_g: StubbedServerConfiguration, kind of stubs everything with regard to input and graphics.. as far as i can see [16:15] That's the point of it [16:15] The clue is in the name [16:15] InputTestingServer "un"-stubs the input part to some degree.. [16:15] :) [16:16] by overriding again.. [16:16] * alan_g thinks "bzr blame" might be useful [16:17] * alan_g resists the temptation [16:17] :) [16:17] So, don't use the Stubbed config if you don't need it [16:19] hm have to check which test also relies on that derived configuration [16:20] anpok: when something doesn't make sense it should be fixed. (Preferably in an MP that just fixes the error.) [16:31] 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] which branch ? i poked around but couldn't find [16:39] kgunn_: scene observe has landed [16:39] *observer [16:43] ack === alan_g is now known as alan_g|EOD === dandrader is now known as dandrader|lunch === dandrader|lunch is now known as dandrader [18:00] I'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/ === 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