Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2016-10-13

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:13 timotimo joined #moarvm
01:16 zakharyas joined #moarvm
01:31 ggoebel joined #moarvm
01:48 ilbot3 joined #moarvm
01:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
04:42 travis-ci joined #moarvm
04:42 travis-ci MoarVM build passed. Timo Paulssen 'dogbert17++ found this memleak in ord_basechar_at'
04:42 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/167200153 https://github.com/MoarVM/MoarVM/compare/eceb4296abb4...736364c02a2d
04:42 travis-ci left #moarvm
05:35 domidumont joined #moarvm
05:40 domidumont joined #moarvm
05:50 dataf4l joined #moarvm
05:50 dataf4l hey guys
05:50 dataf4l how does one run moar files?
06:04 FROGGS joined #moarvm
06:05 dataf4l joined #moarvm
06:06 nwc10 dataf4l: simplest example is to look at how nqp does it. The nqp wrapper script is:
06:06 nwc10 #!/bin/sh
06:06 nwc10 exec /home/nicholas/Sandpit/moar-san/bin/moar nqp.moarvm "$@"
06:06 nwc10 so effectively
06:07 nwc10 moar file-of-bytecode.moarvm  command line arguments for file-of-bytecode
06:18 domidumont joined #moarvm
06:24 domidumont joined #moarvm
06:33 brrt[work] FROGGS: you can gdb attach to the PID
06:35 brrt[work] but that's not really relevant now
06:37 nebuchadnezzar joined #moarvm
07:03 ilbot3 joined #moarvm
07:03 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
08:20 domidumont joined #moarvm
10:10 Util joined #moarvm
10:10 hoelzro joined #moarvm
10:10 zostay joined #moarvm
10:10 _longines joined #moarvm
10:10 nine joined #moarvm
10:10 pyrimidine joined #moarvm
10:10 mtj_ joined #moarvm
10:10 btyler joined #moarvm
10:10 nwc10 joined #moarvm
10:10 avar joined #moarvm
10:10 konobi joined #moarvm
10:10 cxreg joined #moarvm
10:10 Dunearhp joined #moarvm
10:10 lizmat joined #moarvm
10:10 jnthn joined #moarvm
10:10 mst joined #moarvm
10:10 japhb joined #moarvm
10:10 TimToady joined #moarvm
10:10 flaviusb joined #moarvm
10:10 timotimo joined #moarvm
10:10 zakharyas joined #moarvm
10:10 ggoebel joined #moarvm
10:10 dalek joined #moarvm
10:10 domidumont joined #moarvm
10:28 _longines joined #moarvm
10:28 nine joined #moarvm
10:28 pyrimidine joined #moarvm
10:28 mtj_ joined #moarvm
10:28 btyler joined #moarvm
10:28 nwc10 joined #moarvm
10:28 avar joined #moarvm
10:28 konobi joined #moarvm
10:28 cxreg joined #moarvm
10:28 Dunearhp joined #moarvm
10:28 lizmat joined #moarvm
10:28 jnthn joined #moarvm
10:28 mst joined #moarvm
10:28 japhb joined #moarvm
10:28 TimToady joined #moarvm
10:28 flaviusb joined #moarvm
10:28 timotimo joined #moarvm
10:28 ggoebel joined #moarvm
10:28 dalek joined #moarvm
10:28 Util joined #moarvm
10:28 hoelzro joined #moarvm
10:28 zostay joined #moarvm
10:28 domidumont joined #moarvm
10:28 nebuchadnezzar joined #moarvm
10:28 sivoais joined #moarvm
10:28 geekosaur joined #moarvm
10:28 psch joined #moarvm
10:28 ilmari joined #moarvm
10:28 stmuk_ joined #moarvm
10:28 diakopter joined #moarvm
10:28 camelia joined #moarvm
10:28 [Coke] joined #moarvm
10:28 arnsholt joined #moarvm
10:28 moritz joined #moarvm
10:30 ChanServ joined #moarvm
10:31 camelia joined #moarvm
10:35 sivoais joined #moarvm
13:36 zakharyas joined #moarvm
13:40 dalek joined #moarvm
13:53 dalek joined #moarvm
14:06 domidumont joined #moarvm
14:38 domidumont1 joined #moarvm
15:21 dataf4l joined #moarvm
15:23 FROGGS joined #moarvm
15:24 FROGGS o/
15:40 domidumont joined #moarvm
15:53 dataf4l joined #moarvm
15:57 FROGGS domidumont: I posted another comment just now
15:57 FROGGS domidumont: and yes, run() works while shell() isnt
15:57 FROGGS though we want shell() because it uses PATH
15:58 FROGGS I'm going to take a closer look at the shell() implementation in moar after dinner
16:11 dataf4l joined #moarvm
16:20 domidumont FROGGS: I still have hangs with run command (see githun for details)
16:36 FROGGS hmmmm, interesting
16:50 dataf4l joined #moarvm
16:55 dataf4l joined #moarvm
17:23 dataf4l joined #moarvm
17:35 dogbert17 joined #moarvm
17:40 domidumont1 joined #moarvm
17:54 FROGGS it's hanging here: https://github.com/MoarVM/MoarVM/blob/master/src/io/procops.c#L240
17:56 timotimo libuv isn't finishing up the process being run?
17:57 timotimo this is without capturing, yes? so there shouldn't be a pipe that's blocking because the receiving end isn't reading from it, right?
17:57 FROGGS aye, aye and aye
17:59 timotimo is it hanging inside libuv's "give me the next event that happens please" part?
17:59 FROGGS in epoll_wait, so yes
18:00 timotimo hm. i wonder how hard it is to introspect (from inside gdb) what kinds of things are installed there
18:01 FROGGS I believe there is a race condition... I added more debug printf's and now it calls spawn_on_exit (which didnt happen before) and it does not hang
18:02 FROGGS btw, we do not ignore the stdin/stdour/stderr of the child process but we let inherit it
18:03 timotimo yeah, spawn_on_exit is what kicks the process out of the eventloop
18:03 timotimo and that causes uv_run to exit because the process is the only thing inside that eventloop
18:03 timotimo spawn_on_exit is the exit_cb on that process
18:04 FROGGS yes
18:04 timotimo yes
18:04 FROGGS so what could we do?
18:04 timotimo maybe we can golf it to a program that does nothing but spawn that process using our functions (golfed, too, probably) and see if we can make it b0rk on that platform without the rest of moarvm?
18:05 dogbert17 timotimo: thanks for helping out with the memory leak yesterday
18:05 timotimo dogbert17: no problem, was easy as cake :)
18:05 FROGGS uff
18:06 timotimo if it did call spawn_on_exit but it still would hang, we could perhaps have something like "another thread is putting extra stuff into our event loop that prevents the eventloop from terminating"
18:06 dogbert17 I found a few more of the same type and have now posted my first PR to MoarVM
18:06 timotimo but that's not happening, so ...
18:06 timotimo fantastic :)
18:06 FROGGS we could try uv_run(tc->loop, UV_RUN_NOWAIT); ...
18:07 timotimo what does that do?
18:07 FROGGS does not block if there is nothing todo IIRC
18:07 timotimo does that mean it returns immediately from uv_run?
18:08 FROGGS I *think* so...
18:08 FROGGS would be bad probably
18:08 FROGGS let's try
18:08 timotimo but we rely on uv_run to block so we can have blocking run
18:08 timotimo that's exactly how we implement blocking i/o on top of async i/o
18:11 FROGGS - UV_RUN_NOWAIT: Poll for i/o once but don't block if there are no
18:11 FROGGS pending callbacks. Returns zero if done (no active handles
18:11 FROGGS or requests left), or non-zero if more callbacks are expected (meaning
18:11 FROGGS you should run the event loop again sometime in the future).
18:12 FROGGS I'm trying this now:
18:12 FROGGS if (uv_run(tc->loop, UV_RUN_NOWAIT))
18:12 FROGGS uv_run(tc->loop, UV_RUN_DEFAULT);
18:12 FROGGS dunno if that solves the race condition or just adds another one
18:13 FROGGS damn, that also hangs
18:14 FROGGS and the uv_run(tc->loop, UV_RUN_NOWAIT) on its own just makes it return early so that the shell() is not done when the other one kicks in
18:15 timotimo :\
18:18 jnthn Odd. afaik it just stays in run so long as there's something keeping the loop "alive" (which is why we ref/unref stuff in various places)
18:18 timotimo yeah
18:23 timotimo we haven't bumped our libuv dependency in a long time, right?
18:24 FROGGS timotimo: it happens with the newer libuv that is packaged in debian
18:25 timotimo good to know
18:25 timotimo we might really want to bump our libuv, though
18:25 FROGGS that's the diff and the lines that might are to blame: https://github.com/libuv/libuv/compare/5467299450ecf61635657557b6e01aaaf6c3fdf4...d989902ac658b4323a4f4020446e6f4dc449e25c#diff-993e2d1f75ebf418adfbe81df8050a95L501
18:26 [Coke] jnthn: any thoughts on moarvm #426 ?
18:26 timotimo could this be problematic if we inherit stdio pipes there?
18:26 timotimo i don't know what the "nocheckstdio" means
18:27 FROGGS https://github.com/libuv/libuv/blob/master/src/unix/core.c#L496
18:27 timotimo ah, it just means stdio pipes are okay to be closed with this
18:28 jnthn [Coke]: Didn't get to look at it yet, sorry. Will try to do so soon.
18:28 timotimo [Coke]: anything to report for the angular 2 profiler yet? :)
18:28 timotimo don't worry if you haven't had time to work on it yet
18:36 [Coke] jnthn: no worries.
18:36 [Coke] timotimo: nope. thanks for the reminder, though!
18:37 timotimo OK :)
19:13 FROGGS I cant make sense out of it ó.ò
20:35 dataf4l joined #moarvm
22:27 timotimo are we perhaps looking at the wrong end of the whole thing?
22:27 timotimo could it be we are triggering something causing the program being run to hang?
22:28 timotimo and so we are right to block forever? because the program we're executing is glitching out?

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary