/srv/irclogs.ubuntu.com/2014/11/12/#ubuntu-mir.txt

RAOFduflu_: https://code.launchpad.net/~raof/mir/dont-ask-downstreams-to-link-against-private-libraries/+merge/241475 is available for your FTBFS-fixing pleasure!02:02
duflu_RAOF: Ah cool02:02
=== duflu_ is now known as duflu
RAOFduflu: I think you must have a libmirprotobuf.so symlink lying around somewhere on your filesystem.02:36
dufluRAOF: Yes, it was without deb packaging having deleted it02:36
dufluRAOF: I'll manually test your branch. If it works still then awesome02:36
RAOFFeel free to verify!02:37
duflu... and that means something else fixed the bug02:37
RAOFQuite possibly.02:37
RAOFOr, alternatively, the bug is not actually actually a bug but was a local configuration error.02:38
dufluRAOF: Doubt it. So far my methodology has raised build faults we otherwise don't discover till silos. I have documented it for Alan and Cemil. Maybe I should share wider02:40
RAOFPossibly.02:41
RAOFIt's also clearly introduced build faults, so maybe we could improve it :)02:41
RAOFs/introduced/failed to detect/02:41
dufluRAOF: Although yes, I didn't expect our packaging scripts to delete libraries02:41
dufluMy environment did not replicate that fact02:41
RAOFThey don't delete libraries on the filesystem.02:42
RAOFEven if you remove the rm from debian/rules your change would still be incorrect, because we didn't *install* libmirprotobuf.so anywhere.02:42
RAOF(Although once you remove the rm you'd then fail the build because dh_install would tell you that you haven't installed libmirprotobuf.so anywhere, but we deliberately *don't* want to install libmirprotobuf.so)02:43
dufluRAOF: Yep, I know. The question is why does it suddenly work going back to zero diff? I need to test02:43
* RAOF 's money is on the bug not actually being a bug :)02:43
dufluThe "completed separation of mirprotobuf" might be related02:43
RAOFIndeed it could.02:44
RAOFOh, right.02:44
RAOFThat's probably it, actually.02:44
RAOFOh, no.02:44
RAOFMaybe.02:44
RAOFIt's plausible :)02:44
dufluRAOF: Well, my methodology is more plain. If it works only because of something in the deb packaging then that's a bug for other distros02:47
* duflu is testing02:47
RAOFIt's not that it only works because of something in the deb packaging, it's that it only works because you've got some detritus lying around in your build environment. That's a bug for everyone that's not you :)02:47
RAOFOoooh, right.02:48
RAOFNo, I see.02:48
dufluRAOF: Unlikely. I'm very clean (always delete and start from fresh) with builds02:48
RAOFAh, right.02:48
RAOFYou install your build system-wide?02:48
dufluRAOF: No, local installs02:49
RAOFAh. So you're never going to pick up problems with the packaging. Fair chop.02:49
dufluRAOF: No, I'm intentionally avoiding the slow packaging :)02:49
RAOFHm.02:50
RAOFWe could probably make the packaging much faster by supporting nodoc...02:50
dufluRAOF: Yep, basic library lookup failure. I am now fixing my method :)02:55
RAOFDid you fail to set LD_LIBRARY_PATH=$HOME/.local/lib/x86_64-linux-gnu? :)02:55
dufluRAOF: Apparently so. And the symbols in our libraries changed dramatically (no versioning to MIRCOMMON now)02:57
dufluAlways forget that implicit indirect symbol lookup step02:59
dufluRAOF: BTW the x86_64-linux-gnu part vanished some time recently. That's nice, but intentional?03:00
RAOFNoL03:00
RAOFThat would be a bug.03:01
RAOFOh.03:01
RAOFNo.03:01
dufluRAOF: See: make install03:01
RAOFThat would be an artefact of the way you're building mir :)03:01
dufluRAOF: OK, fair point. We could make that the job of packaging03:01
dufluWhich makes more sense03:01
* duflu still likes being able to build Mir and all downstream projects in 10 minutes03:05
dufluIf only CI could do the same03:05
RAOFI think with a little tweaking you'll still be able to do that *and* do so in a clean sbuild environment.03:05
dufluYeah maybe. I like purity though. Meaning minimal dependency on tools. Helps to understand how everything works (or doesn't)03:07
RAOFduflu: https://code.launchpad.net/~raof/mir/moar-timeouts/+merge/241499 addresses the CI failure, too.04:54
RAOFBecause reliably fast CI infrastructure is for suckers!04:55
RAOFHm. There doesn't seem to be any reason to not require setting a pixel format for a surface.05:47
RAOFThere's no codepath where you're like “yeah, I don't care what BPP my surface is, whether it's got an alpha channel or not, and what order the pixels are in”...05:47
dufluRAOF: It's a weird use case (e.g. changing video streams while keeping a single surface open), but on the other hand our logic supports switching on the fly perfectly, so why impose limitations?05:59
dufluImposing limitations actually makes it more complex05:59
RAOFNo, that's not what I mean.05:59
dufluSounds familiar :)05:59
RAOFEven in that case you don't *not care* what the pixel format is.06:00
RAOFYou just want to be able to change the pixel format from the first format you cared about to the second format you care about.06:00
* RAOF is perfectly happy to allow changing pixel formats.06:00
RAOFBut you never create a surface going ‘I don't care at all what pixel format this surface has’. Because you're always going to render to it at least once :)06:02
RAOFHeh. Or maybe we should make the default pixel format 1bpp. That'd show em'!06:02
dufluRAOF: Actually that is a use case: Configure a GL window with rough requirements... and then let the system tell you what the chosen pixel format is06:02
RAOFExcept GL doesn't allow that.06:03
dufluEGL even. Still... it's in the realm of possibility. And there's more likely a future use for it than a good reason to impose limitations needlessly06:04
dufluyet06:04
RAOFHm. I guess our EGL layer _might_ be able to do that eventually.06:05
RAOFI'm not entirely sure that's spec-compliant, though.06:05
dufluRAOF: We're in charge of the /Mir/ spec. The only requirement is that it should support everyone else's specs too06:05
dufluSomehow and eventually06:05
RAOFRight, but you're use-case for ‘maybe we don't need to specify a pixel format’ is ‘it could be helpful for EGL’ and that behaviour is disallowed by the EGL spec, then it doesn't really seem like a reasonable use-case :)06:06
dufluTo say there will never be a toolkit/app that needs to do something is naive. Better to not close the door on future features until you need to06:06
dufluBecause it's worse to have to remove a limitation later, and admit the limitation was imposed without good reason in the first place06:07
RAOFBut on the other hand you *cannot* impose a new limitation in future without breaking clients.06:08
RAOFIt's much much less costly to loosen limitations that were initially too stringent than to tighten requirements that were originally too loose.06:08
dufluRAOF: Sounds like the lazy man's way of saving and receiving free karma in future. But I think better if the API just works from day one06:09
dufluNobody thanks you when things *just work*. But it's still better that way06:09
RAOFJust like it's naive to say that there will never be a toolkit/app that needs to do something it's equally naive to say that a shell will never need to enforce some behaviour.06:11
RAOFAnd people thank you even less when you break their stuff :)06:11
RAOFAnd ‘but the shell can just disallow that behaviour’ is not a response. That means that the shell will not work with existing clients.06:14
dufluRAOF: Yeah you can easily argue arbitrary limitations help for future platforms/drivers to fully implement the spec. But there still may never be a reason for the limitation to exist. You never know06:16
RAOFYes, that's true.06:17
RAOFBut the consequences for ‘oops, we restricted something too tightly’ are much better than the consequences for ‘oops, we allowed something that we shouldn't have’.06:17
RAOFMy philosophy is conservative in that way: given that we can only think of marginal, niche uses for a feature that will be easy to add later but that will be very expensive to remove if it turns out to be difficult, we should choose the easy to fix problem.06:19
dufluRAOF: I would err on the side of effort -- Do you have to write any additional code to limit the functionality in question? If you can't immediately justify why you're doing it then ideally don't06:23
RAOFThat's certainly a reasonable input to the decision, but I (obviously) think it's insufficient.06:23
dufluRAOF: You also confuse future maintainers who then ask why the limitation (and test thereof) exists.06:24
RAOFNot if that's a consistent pattern throughout the code.06:24
dufluThe presence of a test suggests reason. So I guess if you do have the limitation, at least don't enforce it by test06:24
RAOFThe reason is “we can't think of any reason someone would want to do this, and it might impose significant costs down the line if we allow it”.06:25
dufluThen the limitation can be lifted and everything still passes unquestionably06:25
dufluRAOF: Sure, just outline why the significant cost might exist06:26
dufluI don't think there's much precedent for people wanting to make code less capable after it matures. Such things do happen, but usually only by accident06:26
RAOFI think there's *lots* of precedent for wishing you didn't let users do things.06:27
dufluRAOF: On another issue, if Jenkins fails again I will land your branch by hand06:27
RAOFOh, has it died again on the .pc thing?06:28
RAOFOh, not yet :)06:28
dufluRAOF: OTOH I'm a fan of limited sized arrays to make APIs simple and then worry about expanding them later as required :)06:29
* RAOF was hoping to be lazy, let that land, and then his other MPs no longer have extraneous diff :)06:29
dufluThere's more to debate if the limitation makes things less simple06:29
RAOFI think we also differ about what makes an API simple :)06:30
dufluRAOF: It's mathematically unambiguous. Or so I thought. Then I met Sam who proposed his 100-character long function names made things easier to understand06:31
RAOF100 character function names suggest that a refactoring might be necessary :)06:32
dufluRAOF: That was a refactoring :S06:32
RAOFA conceptual refactoring.06:32
RAOFOn the other hand, modern tooling makes the cost of 100 character function names much less. It's possible they're justified in some strange cases :)06:33
dufluI think there's a definite difference between horizontal and vertical code-readers. Not sure if there's much literature on the subject. I prefer the mathematical approach of use all the symbols and then invent new ones06:34
RAOFThat makes for a really hard codebase to dip into, obviously.06:34
dufluYeah, actually I prefer a compromise06:34
dufluJust not function names that are longer than the width of the window06:35
dufluMakes you laugh and cry all at once06:35
sgx1hi, the Mir Spec wiki page is outdated, e.g. QMir is deprecated. can you update the page to include all the projects associated with mir and give us a picture of the current Mir stack?06:43
duflusgx1: That was bound to happen... We have so far avoided mentioning much about downstream projects but the best place would be to document things in the source code, which then gets mirrored on the web automagically: http://unity.ubuntu.com/mir/06:45
RAOFThat page is correct, except QMir is actually QtMir06:45
RAOFduflu: CI success!06:49
dufluRAOF: Are you sure about QtMir? I thought that was the server/shell only in there06:50
dufluThe docs refer to the client port06:50
dufluI think?06:51
RAOFwiki.ubuntu.com/Mir/Spec refers to both client and server side stacks.06:51
RAOFAnd just as soon as the wiki lets me login I'll be updating that bit.06:51
RAOFYou know what? It'd be nice if Launchpad updated the MP diff when the merge-into branch changed.06:54
dufluRAOF: Yes, but doesn't scale. Our infrastructure can't keep up already07:06
dufluWoo, a profiler that *works*08:24
duflu(sudo apt-get install google-perftools)08:25
* duflu is still amazed there's no adequate open source solution...08:25
dufluArgh. OK, so Google's profiler is excellent. However it doesn't understand std::function (since Google doesn't allow such things in their code they don't care) :P And most of Mir's time is in std::function::operator10:34
dufluSo the best profiler is still only partially useful10:35
alan_gCan you fix it?10:35
duflualan_g: I can only think of replacing suspicious functors with named functions10:36
dufluBut that's effort and it's already eating into dinner time10:36
alan_gis it really std::function (not lamdas) it doesn't understand?10:37
duflualan_g: More to the point it seems to lose caller info for them. Then it wouldn't matter10:38
dufluAre we omitting frame pointers?10:38
alan_gThat sounds like it ought to be a compiler option10:39
dufluYeah but we're not optimizing so they should be present10:40
* duflu forces it to be sure10:40
dufluGoogle profiler is *useful* simply because it reports real time spent. Not CPU time used.10:41
duflu... or so some results indicate. If you take that literally then some functions that should be present are absent10:45
dufluAh yes, 69% in sleep_for()10:48
duflualan_g: Fun fact: The one consistently worrying result I get each time is that the compositing thread always spends around 30% of Mir's time destroying (releasing and replying about) TemporaryCompositorBuffer. I can get an instant improvement moving that to a new thread, but it's ugly10:53
duflu20% is the responding with buffers to the client, 10% is wasted by high lock contention in the same code10:54
alan_gThe client calls are typically blocking and completing on the composit thread? Interesting.10:55
alan_gWe can likely come up with a better design if we're sure that's a bottleneck.10:56
duflualan_g: Unexpected but that's correct. The last ref is released and the callback happens in the compositing thread, for each client10:56
alan_g69% in sleep_for() seems rather low10:56
duflualan_g: Other functions sleep also10:56
alan_gSure10:56
duflualan_g: The issue right now is, try to be even a little bit clever (like moving the response code into the thread pool) and the additional locking/context switching negates the benefit10:57
dufluIt's still slow10:57
alan_gI guessed that. We *could* put the responses into a lock-free queue and have a thread servicing that.10:58
dufluYeah. Only a quick and dirty std::move of the render list into a thread without locking is working. And that's terrible to start a new thread each frame11:00
alan_gBIAB11:00
=== alan_g is now known as alan_g|afk
=== alan_g|afk is now known as alan_g
greybackalan_g: hey, I was digging into unity8 doing proper stack unwinding/emergency cleanup last night, and recalled a notion that you were reworking things to get rid of run_mir and just have server::run/stop. Is that still the case?11:24
alan_ggreyback: yes. I have a spike here: https://code.launchpad.net/~alan-griffiths/qtmir/migrate-to-mir-Server-API/+merge/24045111:25
alan_gWhat you want is shown here: tests/acceptance-tests/server_signal_handling.cpp11:26
greybackalan_g: ah nice11:26
alan_g(That's mir trunk)11:27
greybackalan_g: yep, that's what I need, thanks11:28
alan_gyw11:28
greybackalan_g: lp:mir is now the development branch?11:28
alan_gIt is (at last)11:29
greybackgreat11:29
* greyback deletes11:29
ad-n770good morning12:08
ad-n770I'm trying to figure out the reason for a regression/crash I've got in Ubuntu 14.10 with one of our products12:09
ad-n770the backtrace is like this http://pastebin.com/EqJA0Dy412:09
ad-n770which is triggered from dl = dlopen ("libclutter-glx-1.0.so", RTLD_LAZY);12:10
ad-n770this is comming from a GStreamer plugin which and .so file also opened via dlopen12:10
ad-n770I've tried to reproduce it with no luck from a regular executable12:11
ad-n770it seems similar to https://bugs.launchpad.net/mir/+bug/135869812:13
ubot5Ubuntu bug 1358698 in mir (Ubuntu) "[regression] Test failure holding up all merge proposals: "File already exists in database: mir_protobuf_wire.proto"" [Critical,Fix released]12:13
ad-n770and the issue isn't reproducible in Ubuntu 14.0412:13
alan_gad-n770: you're on a channel for Mir (see topic). Why do you think your problem is related to Mir? It doesn't appear in your backtrace.12:13
ad-n770/usr/lib/x86_64-linux-gnu/libmircommon.so.212:14
ad-n770from frame #512:14
alan_gad-n770: sorry, missed that12:14
ad-n770do you know any trick to get debugging info for libmircommon and protobuf ?12:16
ad-n770I'm here for suggestions on how to dig further on the issue12:18
ad-n770mmm, I've to leave for a while now. I'll come back later on this12:20
alan_gad-n770: are you intentionally using mir? It isn't the default12:20
alan_gad-n770: the problem is happening in the protobuf support library and looks different to the bug you referenced. The latter was caused because protobuf errors if the same description is initialized twice - it doesn't segfault as your backtrace shows. But I don't know why clutter loads libmircommon (I know gtk has some /optional/ support for mir, but I don't know any details without digging)12:38
=== Trevinho_ is now known as Trevinho
=== dandrader is now known as dandrader|afk
ad-n770I'm not using mir intentionally12:54
ad-n770the GStreamer plugin is Fluendo's VA decoder12:55
ad-n770this is a plugin that does HW accelerated video decoding via  XvBA/VDPAU/VAAPI12:56
ad-n770it also provides beside decoding GStreamer features for rendering on an XWindow or into a Clutter Actor12:56
ad-n770the plugin uses dlopen in order to enable the features at runtime accordingly to the system capabilites12:57
ad-n770the actual crash comes from this very early discovery when it tries to discover if clutter is available in the system12:58
ad-n770the worst is that it causes nautilus crashes as per a customer report when it tries to generate thumbnails12:59
=== alan_g is now known as alan_g|lunch
ad-n770alan_g|lunch:  let's talk about it when you'll back13:02
=== dandrader|afk is now known as dandrader
=== alan_g|lunch is now known as alan_g
ad-n770alan_g: I'm back14:15
alan_gad-n770: I don't have much for you really. Does uninstalling Mir help? (I'm not suggesting it as a solution, just for adding a data point.)14:16
ad-n770the think is that I haven't installed mir14:17
ad-n770it's a freshly installed ubuntu 14.10 system14:17
ad-n770an nothing installed on top of it a part of nvidia drivers14:18
alan_gMir is installed - although I don't know why. I don't have a fresh 14.10 installation to figure why, but it shouldn't be needed by the default stack14:19
alf_ad-n770: alan_g: Could it be that what you are seeing comes from trying to load EGL drivers?14:23
ad-n770maybe, I couldn't track yet the reason for clutter going into mir14:24
ad-n770if I try to sudo apt-get remove libmircommon2 a lot of packages are going to be removed14:25
alan_gad-n770: For the debug packages https://wiki.ubuntu.com/DebuggingProgramCrash#Debug_Symbol_Packages14:28
* alan_g is curious which packages are installed by default with a dependency on libmircommon214:29
ad-n770ok, going to try get debug symbols and a better backtrace14:30
alf_ad-n770: my bet is on EGL loading drivers to check what it can use, but let's see14:34
kgunnad-n770: curious, did you happen to install unity8-desktop-session ??14:39
* kgunn missed some of the backscroll14:39
alf_ad-n770: hmm, I was wrong, ldd shows that libclutter-glx-1.0.so.0 brings in libmirclient/common14:40
ad-n770kgunn: http://pastebin.com/2ZSZ34EF14:40
alf_ad-n770: not directly, though14:41
ad-n770new backtrace with debug info http://pastebin.com/f8uWFJ3d14:41
ad-n770frame 5 is suspicious14:41
ad-n770this=0x014:41
alan_gthis=0x0 is always suspicious14:43
alf_ad-n770: alan_g: so, libclutter-glx-1.0.so.0 depends on libgdk which depends on libmirclient, at least now we know why we load libmircommon14:44
alf_ad-n770: alan_g: tells us nothing about the failure, though14:45
ad-n770well I've debug symbols and source code on gdb now14:46
ad-n770mmm, mir_protobuf_wire.pb.cc is generated14:48
ad-n770I don't have source code for this one14:48
ad-n770there's any way to get /build/buildd/mir-0.8.0+14.10.20141010/obj-x86_64-linux-gnu/src/common/protobuf/mir_protobuf_wire.pb.cc ?14:49
ad-n770running  sudo apt-get build-dep libmircommon2 now14:50
ad-n770if those help generated_database_->Add(encoded_file_descriptor, size)14:52
ad-n770generated_database is NULL14:52
alf_ad-n770: That's all deep in protobuf code. It seems that InitGeneratedPool() (through InitGeneratedPoolOnce()) doesn't run, which implies that perhaps protobuf has been setup and torn down in the same process before? Not sure...14:57
alf_ad-n770: Is there an easy way to reproduce this locally?14:58
=== dandrader is now known as dandrader|lunch
kgunndesrt: hey there, so we were talking about the concept of reparenting windows, understand that gtk supports this...but does anyone actually use ?15:48
seb128kgunn, desrt is on vac this week15:50
seb128just as a fyi15:50
kgunnah15:55
greybackkgunn: https://searchcode.com/?q=gtk_window_set_transient_for&loc=0&loc2=10000&lan=28&lan=16&lan=1516:01
greybackwhether those calls are all necessary or not, I don't know16:01
kgunnright16:02
=== chihchun is now known as chihchun_afk
alf_AD-N770: I've managed to reproduce the crash on my intel machine16:33
AD-N770good16:33
alf_AD-N770: I will take a deeper look tomorrow16:34
AD-N770ok, thanks16:34
AD-N770in any case I will write a test case too16:34
alf_AD-N770: that would be great16:34
mlankhorstbleh :P16:36
mlankhorstXmir standalone thingy working16:36
alan_gkdub: you're not working on lp:1391923? (I need to fix that anyway)16:38
kdubalan_g, I took a quick look, but have stopped16:39
kdubso no16:39
* alan_g grabs it16:39
kdubcool16:40
* alan_g wishes that C++ didn't think char const* -> bool is a better conversion than char const* -> std::string.16:46
alan_gWhich ultimately, is because string should be a builtin type, not a UTD.16:47
greyback+10016:48
=== dandrader|lunch is now known as dandrader
=== chihchun_afk is now known as chihchun
alan_gkdub: fixed - https://code.launchpad.net/~alan-griffiths/mir/fix-1391923/+merge/24158517:09
AD-N770alan_g, alf_: the issue is reproducible with http://pastebin.com/qzfHa54717:27
AD-N770at the end it seems that our product is doing dlopen twice17:27
AD-N770I will refactor our code to avoid it17:27
alf_AD-N770: Your example code also fails when trying to load only libmircommon.so.1 , so it's certainly something wrong there, either because we are not using protobuf right, or because protobuf has a bug.17:27
alf_AD-N770: thanks!17:27
alan_gAD-N770: thanks17:29
alf_alan_g: AD-N770: https://bugs.launchpad.net/mir/+bug/139197617:34
ubot5Ubuntu bug 1391976 in Mir "Loading libmircommon.so twice leads to a segfault in protobuf code" [Undecided,New]17:34
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== 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!