IRC logs for #buildstream for Thursday, 2018-03-29

*** Loko has joined #buildstream01:44
*** Loko has left #buildstream01:46
*** Prince781 has joined #buildstream04:21
*** Prince781 has quit IRC05:13
*** tristan has joined #buildstream06:29
*** mohan43u has quit IRC07:06
*** mohan43u has joined #buildstream07:09
*** dominic has joined #buildstream07:27
*** bethw has joined #buildstream07:30
*** jennis has quit IRC08:04
*** mohan43u has quit IRC08:05
*** jennis has joined #buildstream08:06
*** dominic has quit IRC08:07
*** mohan43u has joined #buildstream08:09
*** bochecha has joined #buildstream08:17
bochechahi, I'm looking at the freedesktop flatpak sdk 1.8 (the future one, made with BuildStream), and I have a question about it: what's this /usr/lib/x86_64-linux-gnu dir?08:23
bochechawas it a decision to use Debian-style multiarch in the runtime or did I do something wrong?08:23
bochechaand is that %{libdir} in the context of this project? or do I access it with %{libdir}/%{gcc_triplet} in element definitions?08:24
tristanI suspect %{libdir} plays a part in this, but from what I recall; gcc upstream does not support any way to force configure the gcc libs into /usr/lib08:26
bochechathere's much more than just the gcc libs in this dir though, it contains most of the runtime08:27
tristanbochecha, I think ssssam[m] knows the most on this as he wrote the last iteration of that runtime bootstrapping, if one can catch his attention... but what I think is pretty safe to say, is that the runtime is going to have libs in /usr/lib, with the exception of gcc stuff08:27
tristanbochecha, ah, if that is the case; it may have more to do with some of valentind's work08:28
juergbiyes, it seems to use Debian-style multiarch08:28
tristanbochecha, I think there was an initiative to allow multiarch; and some things (was it steam ?) required this08:28
bochechaok08:29
* tristan has to do a review of all of this freedesktop-sdk work, and ensure it's inline with what Alex wants, and am swamped with other things this week :-(08:30
bochechabasically, I found some stuff that can be removed to make the platform quite smaller, and I'm wondering how to access those files in an element yaml08:30
tristanbochecha, https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/master/sdk/project.conf#L2308:31
tristanbochecha, saying that "lib" is "lib/%{gcc_triplet}", will mean that %{libdir} is automatically "%{prefix}/%{lib}"08:31
bochechasince the element is quite early in the pipeline, I don't really want to go trial-and-errors on this, I'd rather ask if someone knows what's the right variable ^_^08:32
bochechatristan: ah, so %{prefix}/%{lib} then :)08:32
bochechaoh, that's what libdir is defined to?08:32
tristanexactly, %{libdir} is automatically that08:32
bochechaI kind of want a `bst eval` command, which would just expand variables to their value in a given project08:32
tristanbochecha, `bst show --format "%{variables}"`08:32
tristanor %{vars}, forget which one08:32
bochechagrmbl08:33
tristanon an element basis of course, because this can vary per element depending on various overrides08:33
bochechaevery single time I want something out of buildstream, I'm told it's already thereā€¦ why don't you let me have good ideas first?!?! :P08:33
tristanhehehe08:33
bochechabst show --format "%{vars}" base/python2.bst08:34
bochechait was vars, not variables :)08:34
tristanyeah, it's in the help output, but we need to improve that, maybe move it to docs08:35
tristan(the formatting of that help output is a disaster when automatically rendered as html or man pages)08:35
jennismhmm tlater it looks like `ostree refs --delete` doesn't actually free up any disk space08:40
jennisDoes anyone know if/how ostree can be used for such a thing?08:41
bochechajennis: in my experience, it only deletes the refs, you need to also prune the repo08:41
bochecha`ostree --repo=... prune --refs-only08:42
bochechathat should remove the objects that were pointed to by the refs you just removed08:42
jennisAhh yes bochecha, it definitely seems that way: http://termbin.com/3omv08:45
jennisthank you08:45
jennisbochecha: that's worked thanks. However, what i'm trying to do, for now, is find ostree's equivalent of `rm -rf`, once this is done, i'll look into removing least-recently-used08:47
jennisDo you have any advice on this?08:48
tlaterjennis: You've already got all the ingredients for a LRU implementation, no?08:48
bochechawell, you don't `rm -fr` in ostree08:48
bochechajust like you wouldn't in git08:48
bochechayou remove a ref, then gc/prune the repo08:49
jennisahh makes sense08:49
jennistlater, yes, but i'd like to get both working so we could potentially implement an option08:50
* tlater doesn't think an "rm -rf" is particularly useful, and if it's going to be more difficult to implement, why spend the time?08:50
* juergbi agrees08:51
juergbiif a minimally better approach takes too long to implement, we could use rm -rf as stop gap, but I don't think that's necessary08:52
tlaterjennis: In either case, as a side note, I've just finished implementing "remove" and "list_refs" methods for our ostree helper module: https://gitlab.com/BuildStream/buildstream/blob/2e51376b69ba53648d68ffdd39b6b97712a9c3c4/buildstream/_ostree.py08:52
tlaterYou can probably reuse that quite nicely to implement cache expiry on a remote host08:53
tlaterAn "rm -rf" would be as simple as iterating over what list_refs() returns and remove()-ing all of it08:53
jennisright thanks tlater08:54
* tlater still has to think about how to do prune more efficiently, but we can sort that out a bit later08:54
tristanjust keep in mind that buildstream doesnt really use branches; one ref is a project-name, element name and cache key; meaning you essentially have only one commit per ostree ref08:59
*** dominic has joined #buildstream08:59
*** aday has joined #buildstream09:16
tlatertristan: About the local artifact cache expiry - for the quota specification I'm considering using this package: https://pypi.python.org/pypi/humanfriendly/4.909:23
tlaterIt seems like a bit of a pain to try and write our own implementation of a unit parser09:23
tlaterAnd that one seems really neat09:23
tristanEh ?09:29
tristantlater, I recall this was extremely easy to check with `df` in the flatpak-build-scripts shell scripts09:29
tristantlater, probably we want to use something pythonic and not call out to df... but...09:30
* tristan looks at that thingy09:30
tlatertristan: does `df` convert 20000 -> 20KB?09:30
tristanA variant of it does09:30
tlaterHuh, that's new to me, I need to read df's man at some point09:31
tristantlater, ah sorry, we use `stat`09:32
tlaterRight, I wonder if python can do that too09:32
tristansee: https://github.com/flatpak/flatpak-build-scripts/blob/master/include/build-source.sh#L7709:32
tlaterty, will try that first then :)09:32
tristanthen again, I think what we're doing there is different09:32
tristantlater, again, we probably want something pythonic and not to call out to the shell, that is preferable09:33
tlatertristan: Yeah, but python does have os.stat09:33
tlaterOr something like that09:33
tristanbut actually checking the volume should be doable with standard libs, the dep you want to add is about human parsable thingies09:33
tlaterAh, right, yeah09:34
tristantlater, one thing I think I should make clear... there is no such thing as a "quota for ~/.cache/buildstream"09:34
tlaterI'm talking about having something like "cache-size: 20GB" in userconf.yaml09:34
tristanyeah I understand that09:34
tristantlater, clarification on the above, BuildStream only has configurable directories where sources, artifacts, and builds are performed; and it is *recommended* that artifacts and build directories remain on the same disk09:35
tristanotherwise, things become reaaaaaly slow, but the same is not true for sources09:35
dominictristan, what is it exactly I'll be adding to --info-fd in bubblewrap to separate these errors? Looking at the code it just currently shows the child PID it gets from os.fork()09:46
tristanright, issue https://gitlab.com/BuildStream/buildstream/issues/28609:47
dominicyeah, sorry forgot to mention that :P09:47
tristandominic, you have looked at the upstream report here: https://github.com/projectatomic/bubblewrap/issues/257 ?09:47
dominicyeah09:47
tristanNotice Colin says "right now it just has the child PID, but we could easily extend it to include precise details like this."09:48
tristanWhich gives us some leeway to do it how we want, or, maybe we'll have a small back-and-forth depending09:48
tristandominic, The goal here is to distinguish between bwrap errors, and program errors09:49
tristanOne approach might be to encode both, but I think that encoding only the child exit code is reasonable09:49
tristanUmmm, maybe not09:49
tristanI was thinking maybe we could rely on bwrap's exit code to distinguish, but it will *still* report an indistinguishable failure either way09:50
tristandominic, First, have you deduced the format of the file it creates ?09:51
dominicthat's what I originally thought I would be doing before I realised09:51
tristanini style key values ?09:51
tristandominic, another thing to consider is; "Is it, or can it be possible, that bwrap ever fails by itself if child process is actually launched ?"09:52
tristanmaybe, maybe not09:53
dominicright09:53
tristandominic, if the format of the info fd thing is like, GKeyFile for instance...09:53
tristanthen we can just put the exit code there *if the child exited*09:53
tristandominic, I would suspect that also, the PID only gets into that file, *if the PID was ever created*09:54
tristanAs such, we can parse the result and easily deduce if the child exited with an error09:54
tristanif there was no exit code to be spoken for, then bwrap had a problem09:55
dominicOK, I'll have a look09:55
tristanSeems sensible, as it keeps the info-fd thing describing only information about the child process09:55
ssssam[m]bochecha_: there is a channel dedicated to the freedesktop SDK 1.8, it's #freedesktop-sdk in freenode09:55
ssssam[m]from what i understand, yeah it has debian-style multilib setup09:55
ssssam[m]multiarch even09:55
tristandominic, you might consider also, by seeing how bwrap handles the exit; encoding the SIGCHLD info instead; i.e. you might only get an exit code if the process exited09:56
tristandominic, you dont really get an exit code for a SIGSEGV or SIGKILL09:57
tristandominic, I suppose it makes sense to encode as much as possible about how a process terminated09:57
* dominic nods09:58
tristanthen again, if bwrap just blocks on the command and doesnt call waitpid(), it may makes sense to do something simpler and more inline with the bwrap codebase09:58
tristandominic, if you find that the format of the info-fd is not extensible (i.e. is only a number written to a file, and risks breaking other users if we change it), then please raise a flag immediately10:05
tristanand I'll try to sort out what to do about that10:05
dominicwill do, thanks tristan :)10:06
bochechassam2: thanks, I joined it and will continue there :)10:14
jjardon[m]Hi, can someone review these two trivial MR's: https://gitlab.com/BuildStream/buildstream/merge_requests/343 and https://gitlab.com/BuildStream/buildstream/merge_requests/34410:31
jmacjjardon[m]: I've given both a thumbs-up10:35
jjardon[m]thanks!10:36
*** bethw has quit IRC10:59
*** aday has quit IRC11:30
*** aday has joined #buildstream11:31
*** tristan has quit IRC11:46
*** tristan has joined #buildstream11:53
tlaterAnother weird ostree case... I have deleted a ref, its object and pruned the full cache.13:26
tlaterYet the space doesn't appear to be freed up13:26
tlaterThe ref does not show up in the listed artifacts anymore13:26
tlaterfsck doesn't show anything useful, either :|13:26
tlaterHm, even when manually deleting all other commits and pruning it doesn't free up any further13:37
tlaterAnd I can see objects left in the objects/ dir13:37
tlaterAll empty directories though...13:37
juergbitlater: do you still have the files in extract/ or build/?13:49
juergbi(as hardlinks)13:49
tlaterjuergbi: Would those still be picked up if I used du -hb in the ostree directory?13:49
juergbino, if you only check the ostree directory13:50
tlater:|13:50
juergbitlater: with du it should be easy to track down where the space is being used, though13:50
juergbidrill down into subdirectories?13:50
tlaterIt appears to be taken up entirely by empty directories13:50
juergbihow much space are we talking about?13:51
tlaterI'm only working with 200KB of data, so I guess those might affect my measurements13:51
tlaterIt's ~100KB of directories13:51
juergbidirectories could take that much space13:51
juergbidepends on the filesystem13:51
juergbiin any case, should not be an issue13:51
tlaterI wonder if we should ignore directories in the disk size measurements13:51
tlaterThe issue is that it's a bit hard to tell what's just leftover directories and what's actually a file13:52
juergbican you try du --apparent-size13:52
* tlater thinks -b implies that?13:52
juergbiah right13:52
juergbifor real world quota, the empty directory disk usage shouldn't be relevant13:53
juergbiso I don't think anything special needs to be done here13:54
juergbior do you have a specific concern with real world quota?13:54
tlaterNot really, no13:54
tlaterIt just screws with my tests x)13:54
tlaterMayhap I should go bigger with the files I'm testing on13:54
tlaterjuergbi: Yeah, if I set my file sizes to a few MB everything works fine14:04
* tlater is sufficiently annoyed by the inaccuracy of his size measurements14:04
*** ernestask has joined #buildstream14:07
tlaterHmm, maybe the fact that I'm creating perfectly compressible artifacts has something to do with this14:15
tlaterYeah, that makes a lot more sense14:17
* tlater stops writing files that consist only of '0'14:17
*** bethw has joined #buildstream14:22
tristantlater, deduplication of identical files !14:48
tristandoh!14:48
tlatertristan: Oh, heh, I didn't even think that far o\14:57
jmacI'm trying to set up my own artifact cache server. bst build reports "WARNING Failed to fetch remote refs from ssh://artifacts@selectron.dyn.ducie.codethink.co.uk/artifacts: Could not connect: Connection refused". But I can ssh to artifacts@selectron.dyn.ducie.codethink.co.uk without any problems.15:32
jmacAny idea what I should do next to debug it?15:33
juergbijmac: hm, maybe add -v to the ssh_commandline in pushreceive.py?15:39
jmacGood plan15:41
juergbiwe have a timeout of 3 seconds. probably not the issue15:41
juergbifyi: it's initialize_push_connection() that fails15:43
jmacRight, I think it's the pull-url returned by ssh that's failing, not the ssh connection15:52
jmacFixed now, might have a look into improving that error message15:56
tlaterIs there a case in which we don't extract() a dependency element's artifact before we build?15:59
* tlater thought this always had to happen16:00
juergbitlater: I can't think of a case where we don't need it16:05
juergbianything that is staged needs to be extracted16:05
tlaterHm, odd, a raise Exception() in ostreecache.extract doesn't interrupt my build, even though I do have an element with a dependency in the pipeline16:06
* tlater is trying to assert the order in which artifacts are expired16:06
juergbitlater: you raise it before the early returns, I assume?16:07
tlaterFirst thing in the method16:07
tlaterHm16:07
tlaterAh, wait16:07
tlaterImport elements probably don't call that16:08
tlatero\16:08
juergbiimport elements normally have no dependencies, so no16:08
*** noisecell has quit IRC16:25
*** dominic has quit IRC16:48
*** tristan has quit IRC17:01
*** mohan43u has quit IRC17:05
*** mohan43u has joined #buildstream17:08
*** mohan43u has quit IRC17:11
*** mohan43u has joined #buildstream17:15
*** bethw has quit IRC17:20
*** mohan43u has quit IRC18:06
*** mohan43u has joined #buildstream18:09
*** Prince781 has joined #buildstream18:32
*** Prince781 has quit IRC19:00
*** mohan43u has quit IRC19:06
*** mohan43u has joined #buildstream19:10
*** ernestask has quit IRC19:52
*** mohan43u has quit IRC20:59
*** mohan43u has joined #buildstream21:02
*** aday has quit IRC21:20
*** Prince781 has joined #buildstream21:48
*** mohan43u has quit IRC21:49
*** mohan43u has joined #buildstream21:53
*** mohan43u has quit IRC21:59
*** mohan43u has joined #buildstream22:02
*** Prince781 has quit IRC22:04
*** Prince781 has joined #buildstream22:42
*** Prince781 has quit IRC23:35

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