IRC logs for #buildstream for Monday, 2019-05-20

*** nimish2711 has joined #buildstream02:08
*** tristan has quit IRC04:07
*** tristan has joined #buildstream05:40
*** tristan has quit IRC06:48
*** tristan has joined #buildstream07:18
*** ChanServ sets mode: +o tristan07:34
*** tristan changes topic to "BuildStream 1.2.7 is out ! | https://gitlab.com/BuildStream/buildstream | Docs: https://docs.buildstream.build/ | IRC logs: https://irclogs.baserock.org/buildstream | Mailing List: https://mail.gnome.org/mailman/listinfo/buildstream-list | Roadmap: https://wiki.gnome.org/Projects/BuildStream/Roadmaps"07:34
*** benschubert has joined #buildstream07:51
*** raoul has joined #buildstream08:36
*** bochecha has joined #buildstream08:48
*** rdale has joined #buildstream08:49
*** tpollard has joined #buildstream08:52
*** nimish2711 has quit IRC09:08
*** nimish2711 has joined #buildstream09:14
*** nimish2711 has quit IRC09:24
*** lachlan has joined #buildstream09:30
*** lachlan has quit IRC09:39
*** lachlan has joined #buildstream09:45
*** toscalix has joined #buildstream09:48
*** lachlan has quit IRC09:51
*** bochecha has quit IRC09:53
*** lachlan has joined #buildstream09:56
*** bochecha has joined #buildstream09:59
*** lachlan has quit IRC09:59
*** tristan has quit IRC10:00
*** tristan has joined #buildstream10:09
tpollardtristan: re the ui as a subprocess thread, afaik the pulling of buildtree for bst shell/push does go through the scheduler10:15
*** ChanServ sets mode: +o tristan10:18
tristantpollard, I wasn't being pedantic :)10:18
tristanindeed it seems that it is done properly with `bst shell`10:18
tristantpollard, however I don't think it is done with workspace related fetch + track10:18
tristantpollard, neither is it done for the automatic fetching of junctions at load time10:19
* tpollard nods 10:19
tpollardDidn't think you were being pedantic either :)10:19
tristantpollard, obviously splitting up processes is going to be a big architectural change... thinking back on that email, I think that maybe it is a good idea to consider precise synchronicity of state in messages to be a separate problem... by that I mean "the state reflected in a given log line might not be the state of the data model at the time the log line was initially issued"10:24
tristantpollard, we might consider an overhaul of messaging, such that messages carry all state, as a completely separate detail10:25
*** lachlan has joined #buildstream10:25
tristanalthough, I think it is still an important detail10:25
benschuberttristan: I liked the idea in your email of having the message give all the necessary information, it might be a simpler way if it's not slowing down too much the execution :)10:25
tristanreliable logging is pretty paramount to a build tool10:25
tristanbenschubert, indeed, I hope it is not too much, but we can keep the Message object with a minimal amount of fields, leaving the rendering details to the frontend10:26
* phildawson is also quite keen on that.10:27
KinnisonTo keep the message size down requires that the state changes be communicated efficiently also10:27
tristanbenschubert, performance should be helped by having the Job processes send messages directly to the frontend... and hopefully with non blocking writes10:27
KinnisonI think aevri was looking at ways to do that10:27
*** lachlan has quit IRC10:28
benschuberttristan: agreed!10:28
phildawsonI don't know enough about the build shell to understand how big the issues there would be though.10:29
gitlab-br-botBenjaminSchubert approved MR !1346 (danielsilverstone-ct/classmethod-inits->master: Make various Element/Source init helpers @classmethod to clarify data flow) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/134610:29
tristanNow of course the crux of it is... if we put *all* state management into the subprocess, and have the entire function bodies of main Stream() entry points run in a single process (possibly running the scheduler multiple times)... and if we *dont* syncrhonize state back to the frontend, then the build shell is wildly tricky :-/10:30
tristanphildawson, incidentally that's what I was just talking about10:30
* phildawson reads backscroll :)10:30
tristanphildawson, If we do syncrhonize all state back to the frontend, then it becomes a non-issue, but it would indeed be interesting to not need to10:31
tristanphildawson, just the last message :)10:31
tristan"now the crux of it..."10:31
phildawsonAh right10:31
tristanessentially you need the state of elements and their cache keys in order to launch a shell10:32
*** lachlan has joined #buildstream10:32
benschuberttristan: could the subprocess launch the shell?10:32
tristanand then, there is always a funky possibility of shelling in *through* the subprocess10:32
tristanbut that is a whole separate can of worms I think10:32
tristanlike, you need a real terminal10:33
tristancan you give control of the terminal to the subprocess ? I think that will be tricky, but maybe I'm wrong ?10:33
benschubert^ I'm not sure I follow about the "real terminal"10:33
tristanPerhaps I'm imagining a difficulty where there is none ?10:34
tristanbenschubert, is the subprocess inherently connected to the terminal if the master process is ?10:34
tristanMaybe10:34
benschubertI think so10:34
tristanBut then, the current mechanics of the main process and Job processes does some things which cause it not to be true for jobs10:34
tristanand it is important for frontend signal handling10:35
*** bilelmoussaoui has joined #buildstream10:35
tristani.e. you need at least the subprocess to be setsid() I believe, so that you are sure that you catch SIGTSTP and such *only* in the frontend10:35
tristanAnd instruct the subprocess to do things like pause jobs10:35
*** lachlan has quit IRC10:36
tristanIn any case, job control is certainly tricky at least on linux - we certainly want the frontend to be the only place interacting with the OS, have the frontend reliably shut everything down and sync the logs on SIGTERM, handle ^C and ^Z properly etc10:40
tristanI think that whether we can do that and still easily launch a shell in the subprocess that is connected with the parent process's terminal is something we need to check10:40
benschubertagreed10:41
benschubertI should probably look at how to handle ^C correctly one day too10:41
*** lachlan has joined #buildstream10:41
phildawsonTristan, what you're saying makes sense. I think I'm going to need to do some reading to properly understand the problem here.10:42
*** tristan has quit IRC10:43
*** tristan has joined #buildstream10:44
*** ChanServ sets mode: +o tristan10:44
tristanIt seems that my thinkpad doesnt like to have most of it's cpus running at 100% 24/7 for weeks on end :'(10:45
tristanSo SIGINT (^C) is not particularly tough, however as I recall without setsid() in the child forked process, signals get sent to the group, and as such they get handled in all forked processes10:47
*** lachlan has quit IRC10:47
tristanit's been over a year since I looked at job control, but I believe that's how it was working, and different signals have different contracts10:47
tpollardI think there's been some improvements in multiprocessing around this but only since 3.710:48
tristanfor SIGTSTP, we get one and use it to send SIGTSTP to the child jobs - this is a bit tricky, because the child jobs have no way of handling an IPC message (they are basically blocking workloads with no mainloop)10:49
tristanSo in the child jobs we use the context managers in _signals.py10:49
tristanTo react to signals... when a child gets SIGTSTP, it puts it's process tree to sleep, and then wakes up when it resumes10:49
tristanI think we then send SIGSTOP to ourself in the child job (which cannot be handled), and then wake up child jobs on the following line of code (because after sending ourself the signal, we only reach the next line of code by waking up)10:51
tristantpollard, I highly doubt the python standard library is going to help us with job control, but interested to hear specifically what you are talking about :)10:51
tristanAnyway, what I was mostly getting at, is that we can have a much cleaner SIGTSTP handling in the frontend <--> scheduling process10:52
tristansince the scheduler does run a main loop, we can (A) Handle SIGTSTP in the frontend... (B) Send a *message* to the scheduling process and inform it that it needs to go to sleep... (C) Have the scheduling process put the jobs to sleep in the way it currently does10:53
tristanAnd basically the same thing is used when the frontend receives the first ^C (SIGINT) and we explicitly put the scheduler and jobs to sleep10:53
tpollardtristan: kill & close got added to the api in 3.7, I don't know the specifics though :)10:54
tristantpollard, sounds like some prettyness, we do have os.kill()10:55
tristantpollard, i.e. basically it sounds like process.kill() would just be shorthand for os.kill(process.pid, ...)10:55
phildawsonThanks for the description of how we're doing signal handling now, that was rather helpful :)10:56
tristanOf course, it's delicate and we all want it to work well :)10:57
benschubertYep, the problem I had with ^C, is that we mask signals when spawning a new process, meaning I can never ^C if I have too many job spawned :'D10:58
tristanEssentially the gist of it is... when considering a frontend <--> scheduler separation, we can avoid some mess/tricks in the interactions with the scheduler <--> jobs10:58
benschubertbut that's only a problem with RE/big machines10:58
tristanThe scheduler <--> jobs relationship is more complicated because jobs are blocking, and we cannot send them instructions to handle in an event loop10:58
WSalmonI have messed up emailing this list again, this time i did mean to send the email to the list but i forgot to change the subject so it looks like it was a mistake when it was not, apologies. https://mail.gnome.org/archives/buildstream-list/2019-May/msg00018.html10:59
tristanbenschubert, interesting, that is a bug which can theoretically be fixed I think10:59
tristanbenschubert, I.e. we need to (A) Mask sigint so that it's not inherited... (B) Fork the subprocess... (C)... unmask and handle the signals which arrived while forking...  ... and to top it off, we need to let the scheduler process breathe a bit if it is in the middle of spawning many jobs at the same time11:00
tristanbenschubert, because the scheduler has it's main loop... we will only actually *handle* the SIGINT once we're done our current work and return to the loop11:01
tristanOf course, with a rework, we can replace "handling of SIGINT" here with "processing an explicit message from the frontend"11:02
*** lachlan has joined #buildstream11:03
benschuberttristan: agreed. Let's wait for the split before it, doesn't seem like many people had trouble with it11:04
tpollardWSalmon: nice email re buildbox support11:08
WSalmonThanks tpollard11:10
*** lachlan has quit IRC11:18
*** bilelmoussaoui_ has joined #buildstream11:22
*** bilelmoussaoui has quit IRC11:22
*** bilelmoussaoui_ is now known as bilelmoussaoui11:22
*** lachlan has joined #buildstream11:28
tpollardWSalmon: also 100% for buildbox selection being a user option, not a project one11:33
*** lachlan has quit IRC11:56
*** lachlan has joined #buildstream12:04
*** lachlan has quit IRC12:08
*** tristan has quit IRC12:47
*** lachlan has joined #buildstream13:12
*** bilelmoussaoui has quit IRC13:13
*** lachlan has quit IRC13:21
*** tristan has joined #buildstream13:22
*** lachlan has joined #buildstream13:35
gitlab-br-botwillsalmon closed issue #963 (Improve workspace docs) on buildstream https://gitlab.com/BuildStream/buildstream/issues/96313:38
*** lachlan has quit IRC13:39
*** lachlan has joined #buildstream14:00
*** lachlan has quit IRC14:03
*** lachlan has joined #buildstream14:38
*** lachlan has quit IRC14:54
tpollardKinnison: I think marge is still struggling, it 1346 probably needs a manual merge14:57
Kinnisontpollard: then could you do it?14:58
Kinnison(It's not that I'm lazy, I literally don't have merge rights :D)14:58
tpollardSure14:58
gitlab-br-bottpollard approved MR !1346 (danielsilverstone-ct/classmethod-inits->master: Make various Element/Source init helpers @classmethod to clarify data flow) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/134614:58
gitlab-br-bottpollard merged MR !1346 (danielsilverstone-ct/classmethod-inits->master: Make various Element/Source init helpers @classmethod to clarify data flow) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/134614:59
Kinnisonta14:59
*** lachlan has joined #buildstream15:44
*** lachlan has quit IRC15:49
*** lachlan has joined #buildstream15:51
*** lachlan has quit IRC15:55
*** bochecha has quit IRC15:58
*** lachlan has joined #buildstream16:14
*** lachlan has quit IRC16:17
*** phildawson_ has joined #buildstream16:38
*** phildawson has quit IRC16:39
*** lachlan has joined #buildstream16:46
*** lachlan has quit IRC16:49
*** toscalix has quit IRC16:54
*** lachlan has joined #buildstream17:06
*** lachlan has quit IRC17:40
*** lachlan has joined #buildstream17:44
*** pointswaves has joined #buildstream17:45
*** tristan has quit IRC17:48
*** phildawson_ has quit IRC17:52
*** tristan has joined #buildstream18:09
*** pointswaves has quit IRC18:20
*** lachlan has quit IRC18:31
*** nimish2711 has joined #buildstream18:32
*** lachlan has joined #buildstream18:34
*** nimish2711_ has joined #buildstream18:39
*** nimish2711 has quit IRC18:39
*** nimish2711_ is now known as nimish271118:39
*** lachlan has quit IRC18:40
*** lachlan has joined #buildstream19:07
*** lachlan has quit IRC19:13
*** lachlan has joined #buildstream19:57
*** lachlan has quit IRC20:00
*** mohan43u has quit IRC21:10
*** mohan43u has joined #buildstream21:38
*** nimish2711 has quit IRC21:45
*** nimish2711 has joined #buildstream21:50
gitlab-br-botcs-shadow opened MR !1347 (chandan/coverage-doesnt-need-deps->master: tox.ini: Coverage does not need module installed) on buildstream https://gitlab.com/BuildStream/buildstream/merge_requests/134723:13
*** nimish2711 has quit IRC23:15
*** nimish2711 has joined #buildstream23:20
*** admin has quit IRC23:47

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