/srv/irclogs.ubuntu.com/2013/08/02/#ubuntu-mir.txt

ricmmhi00:06
ricmmanyone around?00:06
RAOFricmm: Sure; best to actually ask your question, though.00:17
ricmmRAOF: seeing this with latest Mir in the phone image that runs unity-mir00:20
ricmmhttp://pastebin.ubuntu.com/5938197/00:20
ricmmcatching a SIGBUS there00:20
ricmmany ideas?00:20
ricmmexamples run fine00:20
RAOFHm. Nothing obviously springs to mind.00:24
RAOFExcept that SIGBUS is one of those fun errors that's only ever going to occur on armd00:24
kdub_oh hmm00:24
RAOFOh, hey, arm guy!00:25
kdub_ricmm, we moved that code between libraries recently, perhaps something isnt updated00:26
kdub_i'll try it, one minute00:26
ricmmthanks kevin00:27
ricmmkdub_: any clues?00:35
kdub_ricmm, i'm not seeing any problems with the example programs i have00:40
kdub_not set up for the unity-mir though on this device at the moment00:40
ricmmcan you think of any API changes that might've triggered this?00:42
kdub_no :/00:44
kdub_ricmm, actually, yes!00:44
ricmm:)00:45
kdub_we changed the way that the display size is handed out, perhaps there's something amiss there00:45
kdub_it should be backward-compatible though...00:45
kdub_but if something is wrong, mabye its trying to make a surface that's a nonsense size00:46
ricmmlemme catch the call to create_surface and see the params00:48
ricmmkdub_: http://pastebin.ubuntu.com/5938258/00:51
ricmmsize looks fine, it has been working like this before00:52
ricmmdepth 0 means anything?00:52
kdub_right, that looks fine00:52
kdub_depth 0 is just the stack ordering position, its ok00:54
ricmmwhat change with the size passing?00:57
kdub_that was a client side api change, this is an internal client, so what i mentioned probably won't affect anything00:58
dufluRAOF: ping05:20
RAOFduflu: pong05:20
RAOFWould you quite like to talk bypass?05:20
dufluRAOF: I've removed the explicit (and slightly hacky) workaround fix for the input lag bug... but suspect it might still be fixed by that branch. Can you retest?05:20
dufluRAOF: No bypass this week :(05:20
RAOFduflu: Still the "switch" branch?05:21
dufluRAOF: Yes.05:21
RAOFI'll give it a try. It may take me a little while to get to that.05:21
dufluRAOF: Actually, maybe wait. I might try to do an independent fix for that bug05:22
RAOFExcellent. The best kind of testing :)05:23
dufluRAOF: I just realized, even if my branch eliminates the cause of the bug under double buffering, it introduces triple buffering which is expected to cause the same bug. I think we need to fix the compositor...05:28
RAOFok05:29
RAOFOk. Who changed the mir_connection_get_display_info ABI on me?05:48
* duflu points to multimonitor guys05:52
RAOFAhem.06:01
RAOFYes, that commit did indeed break mir_connection_get_display_info06:01
RAOFGrr. I wonder what's easier. Fixing mir_connection_get_display_info, or switching to the new API.06:04
tvoss_good morning :)06:04
dufluRAOF: Robert was right when he said "everyone forgets to bump ABIs"06:04
dufluMorning tvoss_06:04
tvoss_duflu, good morning06:05
RAOFduflu: This isn't actually a deliberate ABI break. This is just a buggy implementation of the deprecated function.06:05
* RAOF 's symbol file branch wouldn't have helped here06:09
RAOFOk. Whoever wrote the mir_connection_get_display_info was too trusting :)06:16
RAOFOk. I'm going to go and collect something; back in 20 minutes or so. Then I'll fix this.06:17
tvoss_RAOF, see you :)06:19
tvoss_duflu, on the switch branch: Alf mentioned that it might break the mm use-case he is working on06:19
tvoss_did you have a chance to look into that?06:19
duflutvoss_: Yes I have a fix/workaround in mind.06:19
duflu... but still think we need a more robust solution later, as discussed with alf a while back06:20
tvoss_duflu, okay, what would be your proposal to move forward?06:20
duflutvoss_: I'll do a fix/workaround to work with the existing mm logic today, I hope06:21
dufluJust saying I think the MM assumptions are wrong/unsafe06:21
tvoss_duflu, existing as in what alf and kdub are landing right now?06:21
duflutvoss_: Yes I've discussed it with alf already06:22
tvoss_duflu, ack. I will grab some breakfast and be back after that06:22
alf__duflu: What's unsafe about the MM assumptions?06:22
duflualf__: The assumption that each monitor will compositor_acquire at roughly the same time. I think we need better guarantees that it only happens once per vsync06:24
dufluBut I will do a workaround in the switch branch, which should work in theory06:24
alf__duflu: the problem is that we don't have a single vsync, we have as many vsyncs as outputs06:25
duflualf__: Yes, I know. I can probably defer the discussion if I can workaround in switch before my EOD06:26
alf__duflu: ok, I would be interested in any sane alternatives, but I don't have any in mind06:27
dufluIt will be a blocker for bypass though. Which is why I've changed it...06:27
alf__duflu: I guess that indicates that it needs to be configurable. At this point it doesn't seem that we can have a one size fits all swapper.06:28
duflualf__: I've had a few ideas. But am too rushed to revisit today. I'll try and give you a workaround in the switch branch tho06:29
tvoss_duflu, alf__ we should tackle that together on Monday morning.06:29
duflualf__: The squashed render_surfaces issue seems to be triggered by my lazy allocation optimization. render_surfaces' RenderResourcesBufferInitializer is making the poor assumption about when it is executed, and interacting with the wrong GL context06:35
duflualf__: So I'm wondering if I should disable the optimization or leave the render_surfaces bug for fixing separately?06:41
alf__duflu: what resource are you allocating lazily?06:44
duflualf__: The buffers06:45
duflualf__: Aha! Never mind. I have a simple fix06:47
racarrStrange jenkins error on no-input-for-hidden-surfaces06:58
racarris what racarr would be wondering about if he were awake ;)06:58
dufluracarr, welcome to Friday07:00
RAOFalf__: Hey, so mir_connection_get_display_info is broken. What should I be fixing - the false assumption that config->displays[0] is always valid if num_displays > 1, or making that assumption true?07:02
alf__RAOF: the false assumption that config->displays[0] is always valid (if by valid you mean connected and used)07:07
RAOFalf__: Good, that's what I'm in the process of doing.07:07
alf__RAOF: hmm, config->displays should be config->outputs...07:09
RAOFQuite true.07:10
alf__RAOF: Do you want to wait a moment so I can fix that?07:10
RAOFOk07:11
alf__RAOF: so you don't have to make another change soon, but whatever is more convenient for you07:11
RAOFWell, this is blocking me now, and the update will be trivial.07:11
alf__RAOF: ok, then feel free to change it now and I will ping you for an update (perhaps we need to wait until Monday to push the s/display/output/ change so we don't break everything)07:14
RAOFIdeally we'd land this at the same time.07:14
RAOFActually, no.07:14
RAOFWe're breaking ABI, so your change bumps SONAME regardless.07:14
RAOFMonday is fine.07:14
alf__RAOF: if I push the change today will it break the packages?07:15
RAOFNot any more than the packages are currently broken.07:15
alf__RAOF: (I assume so, since you won't be able to update the mesa/x again until next week)07:16
alf__RAOF: ok, either Kevin or I will have an MP ready for you. When you feel like it next week approve it and make the Mesa/X changes at your convenience.07:19
RAOFIt actually doesn't change X or Mesa (at this point), so we kindof could get away with silently breaking ABI.07:19
alf__RAOF: ok, where is the breakage then?07:20
RAOFmir_connection_get_display_info segfaults07:20
RAOFBecause its implementation assumes that config->displays[0] is always valid.07:20
alf__RAOF: sorry, I misunderstood the whole discussion, looking07:21
alf__RAOF: ok, feel free to make the change and we can rename afterwards (hopefully later today)07:25
RAOFHm. We've got no tests for mir_connection_get_display_info.07:25
alf__RAOF: I am sure we had... I guess they were remove when introducing the new API07:26
RAOFIndeed.07:26
RAOFdidrocks: Good morning.07:27
RAOFHow goes IoM?07:27
didrockshey RAOF!07:28
didrocksRAOF: foggy? ;)07:28
didrockshow is the other side of the planet?07:28
RAOFDarkening!07:28
RAOFalf__: https://code.launchpad.net/~raof/mir/fix-mir_connection_get_display_info/+merge/178216 is there for your viewing pleasure.07:35
alf__RAOF: a more reliable test would be to check that (.used == 1 and .connected == 1 and .current_mode < .num_modes)07:38
didrocksRAOF: btw, any luck with testing xmir/xorg and upload that to distro?07:38
didrocks(or still building?)07:38
RAOFdidrocks: See conversation above. The libmirclient1 that landed this morning broke xmir.07:40
RAOF*Apart* from that, everything seems to be good to go.07:40
RAOF:)07:40
didrocksRAOF: ahah, ok, so once your MP merged, I need to repush mir to distro07:41
didrocksthen you push all the crack07:41
didrockswe promote07:41
didrocksand then u-s-c07:41
duflualf__: For future-proofing can we not test booleans against "1" ? :)07:49
duflu*"can we please not"07:49
alf__duflu: sure :)07:52
RAOFalf__: Thanks07:52
robert_ancellRAOF, hey, can you do a quick triage on bug 120674407:53
ubot5bug 1206744 in XMir "black screen on nvidia gt640 with system-compositor-testing ppa" [Critical,New] https://launchpad.net/bugs/120674407:53
RAOFBah! What's happened to radeon?07:53
alf__RAOF: hmm, test failure about uninitialized variable07:54
RAOFHm, quite true.07:55
RAOFWhy didn't that error locally?07:55
RAOFEvening Zoƫ time.08:04
=== alan_g|EOD is now known as alan_g
dufluBack in 20ish08:22
alan_ghikiko: you've not addressed https://code.launchpad.net/~hikiko/mir/mir.nested-mode-connection/+merge/178042/comments/401241 - should be a 5 minute job?08:33
hikikoI ve fixed i t already alan_g :)08:38
hikikopushing!08:38
hikikooh no08:38
alan_galf__: ^ - want to re-review?08:39
hikikoI was referring to another comment08:39
hikikosorry08:39
hikikoyou mean to replace MirConnection* with unique_ptr?08:39
hikikohttps://code.launchpad.net/~hikiko/mir/mir.nested-mode-connection/+merge/178042/comments/40176508:39
hikikoI am pushing this fix08:40
alan_ghikiko: it is better to resolve "Needs Fixing" comments than "Comment" comments.08:43
hikikoyes I pushed alex's changes except the MirConnection*08:44
hikikodo we really need this?08:44
hikiko(because we use it once)08:45
hikikoand never again08:45
alan_ghikiko: because we throw in the constructor the destructor never executes. So the connection is leaked.08:46
hikikooh08:46
hikikoi see08:47
alan_gunique_ptr isn't IMO the cleanest solution - I'd write an RAII class08:47
hikikosorry if I sound too naive but I don't know what a RAII class is08:47
hikikohttp://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization08:48
hikikois it this?^08:48
alf__hikiko: yes08:48
hikikocool :) I'll read it (I've never used it before)08:50
* duflu is not a fan of RAII. Most notably because it confuses object destruction for resource close. If you for example "delete my_file", that does not delete or destroy the file like destruction usually implies09:09
* alan_g Likes RAII - but thinks it should be called "use destructors for paired operations"09:14
tsdgeosguys09:20
tsdgeosi've come across09:20
tsdgeosclass ForwardingInternalSurface : public mg::InternalSurface09:20
tsdgeoswith the comment09:20
tsdgeos // TODO this ought to be provided by the library09:20
alan_gtsdgeos: ack I wrote that09:20
tsdgeosI agree, since i think i need something similar to make http://bazaar.launchpad.net/~phablet-team/platform-api/mir-packaging/ compile again09:20
tsdgeosso i copy that class in there or?09:21
alan_gtsdgeos: you could as a workaround. I'll be fixing that in a few days (sorry didn't know of your dependency)09:24
tsdgeosok09:24
tsdgeoswill do09:24
=== hikiko is now known as hikiko|afk|brb
=== hikiko|afk|brb is now known as hikiko
RAOFalf__: MP should be fixed; review at your leisure.09:53
alf__RAOF: great, thanks09:53
dufluRAOF: I proposed a new, different, fix for the lag bug, if you wish to continue hacking into the night :)10:00
* duflu -> dinner10:01
RAOFdidrocks: Hey, it's ok for me to upload the stack before that mir fix lands, isn't it? It'll be blocked in -proposed until everything works?10:17
didrocksRAOF: it will be blocked in -proposed until someone put mir in main10:18
didrocksRAOF: what can happen TBH during the week-end10:19
didrocks(low chance though)10:19
didrocksRAOF: can you bump the build-dep?10:19
didrocksthat way, we'll be sure that we'll need a new Mir version10:19
didrocks(even if it's artificial)10:19
didrockswdyt?10:19
RAOFI could do that, I guess?10:19
RAOFActually - unity-system-compositor *does* have auto tests, right?10:20
RAOFThe bug only occurs under u-s-c, and is highly likely to be caught by *any* u-s-c testing10:20
didrocksRAOF: those tests are integration tests10:21
didrocksRAOF: they can't run autopilot10:21
RAOFSo those tests aren't run before promotion from -proposed?10:22
didrocksRAOF: exactly10:22
RAOFOk; build-dep bump it is.10:24
RAOFFire in the hole!10:26
=== hikiko is now known as hikiko|lunch
arssonIs there still two cursors?10:51
RAOFNope.10:52
RAOFSo, now that everything's uploaded to proposed, time to disappear for the weekend.10:53
RAOFWhat could possibly go wrong!10:53
tvoss_RAOF, ping11:10
=== hikiko|lunch is now known as hikiko
=== om26er is now known as om26er|internet_
=== om26er|internet_ is now known as om26er
=== alan_g is now known as alan_g|lunch
robert_ancellalf__, you are working on a patch for alt+ctrl+backspace in the examples?12:55
alf__robert_ancell: yes12:56
robert_ancellalf__, ok, I was working on that too - I'll stop then12:56
alf__robert_ancell: basically, your branch adapted to mir::examples::ServerConfiguration12:56
robert_ancellalf__, ok12:57
robert_ancellalf__, I just rebased so it uses mir::examples::ServerConfiguration, but I didn't remove the duplication yet12:57
alf__robert_ancell: well, then you are farther ahead than I am :)12:58
robert_ancellI was stuck on std::initializer_list - how to have one build in filter in the config but also support other filters that the examples require12:58
robert_ancellbuilt in filter rather12:58
alf__robert_ancell: yes, we need to get rid of initializer_list and replace it with a mutable container (e.g. vector) or perhaps some other abstraction12:59
robert_ancellyes :)12:59
robert_ancellalf__, ok, should I stop and leave you to make the merge then?13:00
alf__robert_ancell: I am not sure now, since you are further ahead than I am. I just declared intention of doing it, haven't really started yet13:01
robert_ancellalf__, ok, I'll continue then - I'll be off on Monday after I fly back from IOM so feel free to finish it off if you have plans there13:01
alf__robert_ancell: ok, sounds good then13:02
thomiracarr: any progress with the stress test / thread race fix?13:17
=== alan_g|lunch is now known as alan_g
alan_ghikiko: how are you doing?14:23
hikikoalan_g,14:24
hikikoI did it14:24
hikikoit wasn't that simple14:25
hikikoI had to overload * as well14:25
hikikoto keep using the same methods14:25
hikikobut it seems to work :D14:25
hikikoI am testing and I will push in a moment14:25
alan_gCool, I have an automated test for it: lp:~alan-griffiths/mir/sketch-for-nested-mir-tests14:26
hikikothanks a lot! :D I will merge it14:27
alan_gyou merge that and run bin/acceptance-tests --gtest_filter=TestNestedMir*14:27
=== jono is now known as Guest51067
hikikoalan_g, I got some ok and passed14:44
hikikocan I push the merge?14:44
alan_ghikiko: please do14:44
=== alan_g is now known as alan_g|EOW
=== ogra_ is now known as _ogra_
=== _ogra_ is now known as ogra_
racarr:(  just merged trunk in to client focus notifications again and lots of test failures18:43
kdub_trunk looks ok to me (rev920), aside from the already known problem tests18:49
racarrkdub_: Yeah its just some weird interaction18:53
racarrprobably having to do ith some redone test fixture and stubs vs mocks and blabla bla still investigating18:53
racarrits kind of cryptical somehow18:53
racarrbroken pipe, connection refused, etc.18:53
racarrThe thing is ApplicationMediatorReport session_connect and session_create_surface fail19:01
racarrbut, session_disconnect19:01
racarrwhich contains session_create_surface as a literal textual subset19:01
racarrpasses19:01
racarrI think something funny is going on with test_protobuf_client19:01
racarrmaybe the event sink is trying to send events after the client has already destroyed it's surface19:07
racarri.e. done->Run(); client destroys surface quickly19:07
racarrerr19:07
racarrclient disconnects19:07
racarrthen the event sink is unclogged19:07
racarrand the socket is invalid19:07
racarrand I guess19:07
racarran exception isnt being handled19:07
racarrdue to some unrelated change19:07
racarrnah keeping the client alive doesnt fixit so its somethingelse19:13
racarrit may be happening when trying to send the focus lost message on close_session19:18
racarrneed to investigate the ownership of the MessageSender19:18
racarri.e. perhaps EventSender can not take a strong reference19:19
=== Cimi_ is now known as Cimi
racarrI see. It can only happen in the ~SessionMediator Session closed without disconnect code path19:25
racarrand even then only sometimes19:25
racarrso, it seems like the client process finishes succesfully19:30
racarrand dies without disconnect then the server gets sigterm by the testing process manager19:31
racarrand shuts down, ~SessionMediator is reached19:31
racarrwhich sees that disconnect was never called and calls SessionManager->close_session...19:31
racarrso, then SessionManager::close_session tries to clear the focus19:32
racarrthe client which is being closed now, never closed it's surface either19:32
racarrso, the focus mechanism sees that said surface last had focus19:32
racarrand delivers an unfocused event19:32
racarreventually ending in SocketMessenger throwing because of broken pipe19:33
racarrAlmost surely, event_sender taking a weak reference to the message sender will fix it19:33
racarrbut im concerned in that I do not understand why it didn't happen before19:33
racarrkdub_: Any ideas perhaps?19:33
kdub_hmm19:36
kdub_so a client is outliving the server?19:37
racarrkdub_: No, the client is shutting don, without calling disconnect or release_surface19:38
racarrso then the testing_process_manager kills the server19:38
racarrand in ~SessionMediator when close_session is called19:38
racarreventually the surface is unfocused19:38
racarrcausing things to try and send an event over the wire19:38
racarrand unhandled broken pipe exception19:38
kdub_i'd hope there's a better way handle that than a proxy19:42
kdub_havent thought too deply though how yet19:43
racarrkdub_: Mm. there are a bunch of ways to make the test pass but it feels like19:43
racarrsomething is wrong19:43
racarrkdub_: One thing is I think19:43
racarrEventSender can take std::weak_ptr<MessageSender> perhaps?19:44
kdub_i suppose19:46
racarrbut it seems19:46
kdub_that was the proxying though19:46
racarralso not correct XD19:46
racarryeah19:46
racarrkdub_: This is a total diversion but I saw a crazy idea yesterday from john carmack on handling mutable state in multithreaded C++ game logic19:48
racarrfirst, you use a seperate garbage collected heap for all your mutable data i.e. your non asset data.19:49
racarrand basically you write all your code, kind of in the style we are using for multithreading except with two crazy differences19:49
racarr1. Rather than any of your actors or whatever actually updating state, they return partially applied functions to do such, and then the main frame loop19:50
racarrsorts out how to apply such19:50
racarrbut then the also clever bit is19:50
racarrwell how do you actually enforce this, if you are handing out pointers still19:51
racarrso the objects can look at eachother19:51
racarrso the idea is during the garbage collection step (which you do every frame), you copy the entire mutable heap19:51
racarrand all your objects that have pointers to other objects19:51
racarryou update with a pointer to the heap from the last frame19:52
racarrwhich you then mprotect19:52
racarrso basically each of your actors, can have "real" enforced purity19:52
racarrand you have a small bit of monadic code that applies all these unctions they create19:52
racarr:p not really an architecture for mir but I thought it was really fascinating19:52
racarrBack from lunch, Ill produce a reduced test case. so this doesn't muddle client focus notifications20:54
racarri.e....events_sent_during_disconnect_do_not_crash_server20:55
racarrgot a reduced test but the ownership doesnt work like I thought it did so just weak_ptr isnt enough21:30
* kdub_ forgot to mention... if i go dark, its because the internet company cut me off early21:53
kdub_transferring my service over the weekend21:53
racarrthe connected sessions abstraction is making this hard to solve22:15
racarrsigh I tried having the EventSender used connected_sessions to verify that22:27
racarrthe session was still around22:27
racarrbut this whole process of disconnect happens during the22:27
racarrconnected_sessions.remove call22:28
racarrso of course that is a deadlock22:28
racarrpart of the reason this code is so difficult is socket session killing itself22:29
racarrby calling connected_sessions.remove22:29

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