IRC logs for #buildstream for Thursday, 2019-11-07

*** narispo has quit IRC00:23
*** narispo has joined #buildstream00:24
*** narispo has quit IRC00:27
*** dylan-m_ has quit IRC00:28
*** narispo has joined #buildstream00:30
*** dylan-m_ has joined #buildstream00:43
*** narispo has quit IRC00:45
*** narispo has joined #buildstream00:47
*** rdale has quit IRC00:57
*** narispo has quit IRC01:00
*** narispo has joined #buildstream01:00
*** narispo has quit IRC01:21
*** narispo has joined #buildstream01:23
*** narispo has quit IRC01:45
*** narispo has joined #buildstream01:45
*** paulsherwood has joined #buildstream02:08
*** dylan-m_ has quit IRC02:51
*** paulsherwood has quit IRC02:56
*** paulsherwood has joined #buildstream02:56
*** traveltissues has joined #buildstream08:12
*** juanalday has joined #buildstream08:33
*** rdale has joined #buildstream09:04
*** tiagogomes has joined #buildstream09:42
*** santi has joined #buildstream09:50
*** phildawson_ has joined #buildstream10:05
*** rdale has quit IRC10:22
*** jonathanmaw has joined #buildstream10:25
*** lachlan has joined #buildstream10:32
*** lachlan has quit IRC11:01
gitlab-br-bottraveltissues opened issue #1193 (Split `Stream._load` for target types) on buildstream https://gitlab.com/BuildStream/buildstream/issues/119311:06
*** lachlan has joined #buildstream11:09
*** lachlan has quit IRC11:20
*** lachlan has joined #buildstream11:21
*** lachlan has quit IRC11:31
*** bochecha has joined #buildstream11:35
*** lachlan has joined #buildstream11:51
*** phildawson_ has quit IRC12:08
*** phildawson_ has joined #buildstream12:09
*** juanalday has quit IRC12:10
*** akvilebirgelyte has joined #buildstream12:12
*** lachlan has quit IRC12:19
*** lachlan has joined #buildstream12:32
*** lachlan has quit IRC12:41
gitlab-br-bottraveltissues opened issue #1194 (Remove `Element.__tracking_scheduled`) on buildstream https://gitlab.com/BuildStream/buildstream/issues/119412:46
gitlab-br-bottraveltissues opened (was WIP) MR !1689 (traveltissues/1186-3->master: skip tracking elements without trackable sources) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/168913:04
gitlab-br-bottraveltissues opened issue #1195 (Resolve FIXME from "skip tracking elements without trackable sources") on buildstream https://gitlab.com/BuildStream/buildstream/issues/119513:08
tlater[m]juergbi: The only files left in my test env that don't have g+r are artifact protos - I don't think they are ever touched by buildbox-casd, yet I still get permission denied errors; albeit on the client side now.13:15
juergbitlater[m]: I assume they are owned by the buildstream user?13:16
juergbiseems odd13:16
juergbiand they should indeed never be accessed by casd13:16
juergbionly bst client and bst-artifact-server (for server repo)13:17
* tlater[m] tries to get his logs for this13:17
tlater[m]juergbi: https://hastebin.com/roxonujiyu.makefile13:18
* tlater[m] doesn't know where to debug from here, since nothing shows up in the artifact server logs13:18
tlater[m]And I can't track down exactly which permission is being denied13:19
tlater[m]Since artifacts aren't handled by buildbox-casd, and casserver.py still has no logging in the commit, I suspect it's the artifact servicer, but it's difficult to get any reasonable output to confirm that :>13:19
tlater[m]s/>|/13:20
tlater[m]Any ideas?13:20
tlater[m]Oh, maybe I can print to sys.stderr13:22
*** juanalday has joined #buildstream13:22
juergbitlater[m]: so casd from the bst client fails to download from bst-artifact-server13:26
juergbiI don't see how this can be related to artifact protos13:27
tlater[m]Neither do I tbh13:27
tlater[m]Everything else is at least g+r, though13:27
juergbitlater[m]: is this with your bst-artifact-server changes merged in?13:28
juergbiit could also be a permission denied due to utime13:29
juergbiwhich requires write access13:29
tlater[m]No13:29
tlater[m]I have an early return before those13:30
tlater[m]Unles...13:30
tlater[m]Hm, I suppoe we might be calling that more often13:30
tlater[m]"Files specified but no files found", hm, well, at least it's progress13:34
tlater[m]I guess that means the pull succeeded13:35
tlater[m]Oh, no, it just fails earlier13:35
* tlater[m] probably broke something13:35
*** santi has quit IRC13:43
*** santi has joined #buildstream13:56
*** traveltissues has quit IRC14:00
*** traveltissues has joined #buildstream14:03
benschubertjuergbi, tlater[m] : Does one of you know of any case where the main process we have would receive a SIGTERM if it wasn't sent by outside? Or why the event loop we run would suddenly call the SIGTERM handler? (Or anybody else?)14:21
juergbibenschubert: for the main process? hm, no, can't think of a reason14:21
juergbibenschubert: I've looked into an issue where a SIGTERM was processed with a delay, though, due to the way asyncio works14:22
juergbiand this actually resulted in double processing of SIGTERM, once by regular Python handle and once by asyncio14:22
*** lachlan has joined #buildstream14:25
gitlab-br-botfrazerleslieclews opened issue #1196 (flake8) on buildstream https://gitlab.com/BuildStream/buildstream/issues/119614:26
tlater[m]benschubert: I don't know of any cases besides that either14:26
juergbibenschubert: to elaborate, asyncio uses Python's wakeup_fd signal handler, which writes the signal number into an asyncio socket. Scheduler._disconnect_signals() will not disable that (because the child watcher is still active and needs it), which means that signals received while the loop is suspended between _disconnect_signals() and _connect_signals() will be passed to the handlers registered in _connect_signals()14:29
juergbiindependent of whether any other regular python signal handlers are active while the loop is suspended or not14:29
gitlab-br-bottlater closed issue #1196 (flake8) on buildstream https://gitlab.com/BuildStream/buildstream/issues/119614:35
*** lachlan has quit IRC14:36
benschubertjuergbi: ok my problem is that when I do CTRL-C twice, I end up with having roughly every .5s the event loop calling the SIGTERM handler, but I really can't find why we would. Tracing the process under strace -tt -f doesn't show any sigterm received on the main process either14:39
*** traveltissues has quit IRC14:39
juergbihm, every .5s, that's really odd14:41
juergbiyou could check strace output for the signal number being written to the socket by the wakeup_fd handler14:41
juergbii.e., is this happening multiple times as well or not14:41
juergbimaybe somehow child processes write to the socket that belongs to the parent's asyncio loop14:42
benschubertoh interesting let me try that14:45
*** lachlan has joined #buildstream15:07
benschubertjuergbi: write(12<socket:[24613]>, "\17", 1) = 1  I get quite a lot of things like that and not 100% sure how to interpret the "\17"15:08
juergbibenschubert: that's 0o17 = 15 = SIGTERM15:08
benschubertoh -_-'15:08
juergbiso that would likely be Python's wakeup_fd signal handler15:08
benschubertso by forking we keep it15:09
benschubertinteresting15:09
juergbido you see these writes from multiple processes?15:09
benschubertI was seeing this from one of the child process15:09
benschubertlet me check if I can see similar reads on the main one15:09
juergbibenschubert: you could try signal.set_wakeup_fd(-1) early on in the child process15:09
juergbias workaround15:09
benschubertyup I can see similar reads15:11
benschubertI'm really surprised by this15:13
benschubertdoes that mean our main process will actually be reading every signal sent to the children?15:13
benschubertok, set_wakeup_fd(-1) does remove this problem15:14
benschubertjuergbi: do you see any problems that could happen if we disable the child process wakeup_fd?15:14
juergbibenschubert: no, they should really not write to that socket15:16
benschubertok! I'll fix this and cleanup my PR15:16
juergbiI'm just wondering whether there is a more elegant way to essentially tell asyncio it should clean up on fork15:16
benschubertgood point15:16
benschubertlet me check :)15:16
juergbiit should ideally close the socket, not just not write to it15:16
*** lachlan has quit IRC15:16
benschuberthttps://bugs.python.org/issue2199815:16
juergbimaybe there is some kind of asyncio shutdown function?15:17
benschuberthttps://bugs.python.org/issue21998#msg325820 that's bad15:19
benschuberttldr: fork is not supported when you have an event loop15:23
coldtomhi, has anyone else experienced a *lot* of GRPC errors while using master?15:26
tpollardbenschubert: .....15:27
benschuberttpollard: yes... I'm not joking15:27
benschubertI think I can get around it15:27
benschubertbut gosh -_-'15:27
*** lachlan has joined #buildstream15:30
benschubertjuergbi, tpollard: I think we have two choices:15:43
benschubert1) set wakeup_fd to -1, which means we will have a copy of the master event loop still running in each children, this is error prone and if someone uses an aioloop without creating one explicitely will actually be running things from the master process (potentially)15:43
benschubert2) Reimplement an event loop/Process that cleanly shuts off the event loop as we fork, which will add overhead to each call but is the cleanest15:43
benschubertI tend to prefer 2 even though that's more work. Do you have any preference?15:43
juergbibenschubert: reimplement as in not using asyncio at all? or what exactly would we reimplement?15:58
benschubertah, implement another event loop that handles this nicely (probably just helper methods called as soon as the new process is called)15:59
benschubertso closing the necessary fds and cleaning up the memory16:00
benschubertI think 2 is much cleaner in the end, we'll need to benchmark it however16:00
juergbibenschubert: but still using some asyncio infrastructure, right?16:00
benschubertah yeah16:01
benschubertI don't want to give up on that :)16:01
juergbi:)16:01
juergbiif that's achievable with reasonable effort, that sounds good to me16:01
benschubertok! I'll see what I can do16:01
benschubertthanks a lot for the debugging help16:01
juergbibenschubert: maybe a custom policy like https://bugs.python.org/issue21998#msg313196 plus a fork handler would suffice16:02
benschubertyep16:03
tpollardis 2 compatible with forking the 'backend' into a subprocess?16:04
tlater[m]juergbi: buildbox-casd tells me it's created a socket and is listening on it but buildstream tells me it times out waiting for the socket :(16:11
tlater[m]The socket definitely doesn't come into existence16:11
tlater[m]Have you seen anything like that?16:11
juergbitlater[m]: is it possible this is happening due to the symlink approach leading to two different temp directories pointing to the same cas directory in a test?16:11
benschuberttpollard: the backend would have the loop so that should be transparent16:11
tlater[m]juergbi: I wouldn't see how, but perhaps if I revert that change for a minute...16:13
*** lachlan has quit IRC16:17
tlater[m]Yup, that fixes the problem16:19
tlater[m]I suppose a solution here would be to randomize the socket name?16:20
juergbitlater[m]: yes, that would retain the current behavior when running multiple bst sessions with the same cache directory16:24
juergbiwe don't really support it, however, making sure that each bst process talks to its own casd process is still much better than having it talk to a random casd process16:24
juergbi(whose lifetime may be very limited)16:24
juergbiand it fixes tests ;)16:24
*** dylan-m_ has joined #buildstream16:30
*** santi has quit IRC16:44
*** lachlan has joined #buildstream16:49
*** narispo has quit IRC16:59
*** santi has joined #buildstream17:03
*** narispo has joined #buildstream17:03
*** lachlan has quit IRC17:11
*** narispo has quit IRC17:14
*** narispo has joined #buildstream17:15
*** jonathanmaw has quit IRC17:21
*** tpollard has quit IRC17:29
*** dtf has joined #buildstream17:33
*** dylan-m_ is now known as dylanm17:35
*** dylanm has quit IRC17:35
*** dylan-m_ has joined #buildstream17:36
*** juanalday has quit IRC17:36
*** lachlan has joined #buildstream17:49
*** tiagogomes has quit IRC17:49
*** lachlan has quit IRC17:53
*** narispo has quit IRC17:58
*** narispo has joined #buildstream17:58
*** santi has quit IRC18:01
*** santi has joined #buildstream18:01
*** santi has quit IRC18:04
*** slaf_ has joined #buildstream18:28
*** slaf_ has joined #buildstream18:28
*** slaf_ has joined #buildstream18:29
*** slaf_ has joined #buildstream18:29
*** slaf has quit IRC18:30
*** slaf_ is now known as slaf18:30
*** dylan-m_ has quit IRC18:33
*** narispo has quit IRC19:02
*** narispo has joined #buildstream19:04
*** dylan-m_ has joined #buildstream20:13
*** dylan-m_ has quit IRC20:20
*** benschubert has quit IRC21:19
*** dylan-m_ has joined #buildstream21:47
*** dylan-m__ has joined #buildstream23:25
*** dylan-m_ has quit IRC23:25

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