github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm Set by AlexDaniel on 12 June 2018. |
|||
00:47
leont joined
00:48
p6bannerbot sets mode: +v leont
03:06
AlexDani` joined
03:07
p6bannerbot sets mode: +v AlexDani`
03:10
AlexDaniel left
04:01
leont left
05:49
lizmat left
06:00
lizmat joined,
p6bannerbot sets mode: +v lizmat
06:04
lizmat left
06:50
AlexDani` is now known as AlexDaniel
|
|||
AlexDaniel | can somebody take a look at R#2564 ? | 09:50 | |
synopsebot | R#2564 [open]: github.com/rakudo/rakudo/issues/2564 [⚠ blocker ⚠] "Cannot invoke this object (REPR: Null; VMNull)" in t/04-nativecall/06-struct.t on mipsel | ||
AlexDaniel | it should be reproducible everywhere, I think? | 09:51 | |
though the machine needs to be under load | |||
robertle | AlexDaniel: do you think it is arch-independent? so I should get the same when running on amd64 if I just run it long enough? | 10:00 | |
and why do you reckon load would be a factor? | 10:01 | ||
that would explain why it happens more often on the buildd :) | |||
10:03
lizmat joined,
p6bannerbot sets mode: +v lizmat
|
|||
AlexDaniel | robertle: well, ppc64el and mipsel are little endian, so endianness is not an issue here | 10:03 | |
right? | |||
t/04-nativecall/06-struct.t (Wstat: 11 Tests: 17 Failed: 0) | 10:04 | ||
Non-zero wait status: 11 | |||
just had this on my machine | |||
nine | did you get a coredump? | ||
AlexDaniel | no-no, was simply trying to reproduce | 10:05 | |
nine | :/ | ||
AlexDaniel | it happened in like two minutes, so no worries | ||
… I hope… | 10:06 | ||
nine | Linux++ # load > 120 and my desktop is still pretty usable | ||
AlexDaniel | robertle: also, from the last buildd page, it seems that another file failed? t/08-performance/99-misc.t | 10:10 | |
nine | But even load 165 does not seem to help reproduce the segfault :/ | 10:13 | |
AlexDaniel is trying to reproduce again | 10:14 | ||
10:56
wictory[m] left,
ilmari_ left,
AlexDaniel` left
|
|||
AlexDaniel | dogbert11: maybe you can figure out how to reproduce it… | 11:03 | |
11:09
AlexDaniel` joined,
p6bannerbot sets mode: +v AlexDaniel`
|
|||
AlexDaniel | ok, happened second time. It'll take me a bit more time to actually get a coredump though… | 11:09 | |
11:35
wictory[m] joined,
ilmari_ joined,
p6bannerbot sets mode: +v wictory[m],
p6bannerbot sets mode: +v ilmari_
|
|||
AlexDaniel | nine: alright, so… | 12:23 | |
my observations | |||
while ./perl6 t/04-nativecall/06-struct.t; do :; done | |||
this, for some reason, doesn't segfault | |||
which is weird, like, it should, but it's somewhat random and it just doesn't | |||
this, however: | 12:24 | ||
while make t/04-nativecall/06-struct.t; do :; done | |||
does segfault! | |||
maybe I'm missing something, I don't know | |||
nine: alright so what do I do with 176.5MB core file? | |||
nine | make t/04-nativecall/06-struct.t just gives me: sh: t/04-nativecall/06-struct.t: Permission denied | 12:25 | |
AlexDaniel: gdb --core yourcorefile | |||
AlexDaniel | also this was not compiled with debug symbols, so it's probably useless | ||
nine | oh :( | ||
AlexDaniel | if you can tell me the right command to run Configure.pl to compile moar with debug symbols, I'll do it again | 12:26 | |
last time I had to build moarvm separately because I gave up trying to figure out how to do it from rakudo repo | |||
nine | perl Configure.pl --debug --optimize=0 --prefix=/wherever/you/install/to | 12:27 | |
nine has got debug-on and debug-off scripts in his MoarVM directory for easy switching | |||
AlexDaniel | ? that's for what? To compile moar? Sure, yes, but can I do that from rakudo source folder? I'm dead serious. | 12:29 | |
like with --gen-moar | |||
nine | I guess that would be perl Configure.pl --backends=moar --moar-option='--debug' --moar-option='--optimize=0' --gen-moar --prefix=/whatever | 12:30 | |
I never use --gen-moar | |||
AlexDaniel | yeah, when bisecting moar or when doing changes in moar I guess it makes more sense to build it separately | 12:32 | |
but I noticed that lately I just want to build the latest version on head and then I realize that I have no debug symbols | 12:33 | ||
boom, segfault in less than 10 iterations | 12:34 | ||
“not stripped”, so I guess it's good :) | 12:35 | ||
nine++ | |||
hmmmm or is it… | 12:36 | ||
nine | what does the backtrace look like? | 12:37 | |
AlexDaniel | nine: :S gist.github.com/AlexDaniel/ac27412...5bdc6b2ab6 | 12:39 | |
nine | That's decidedly not helpful :( | 12:40 | |
AlexDaniel | /home/alex/git/rakudo/install/bin/moar is not stripped, so why is it like that? | ||
nine | Either it's a completely corrupted stack, or it didn't actually build with debug symbols. | 12:41 | |
Can you reproduce the failure with MVM_JIT_DISALBE=1 or MVM_JIT_EXPR_DISABLE=1 or MVM_SPESH_DISABLE=1? | 12:42 | ||
Anyway, I'm off for some r&r | |||
dogbert11 | . | 12:46 | |
are you hunting SEGV's? | |||
AlexDaniel | yeaah… | ||
dogbert11 | interesting | 12:47 | |
I can try to repro | 12:49 | ||
dogbert11 goes to his rakudo/nqp/MoarVM dir and types 'perl Configure.pl --debug --no-optimize --prefix=../../install/' followed by 'make -j<no of cores> install' | 12:51 | ||
12:51
MasterDuke joined
|
|||
dogbert11 | AlexDaniel ^^ | 12:51 | |
AlexDaniel | dogbert11: github.com/rakudo/rakudo/issues/25...-451653011 | 12:52 | |
12:52
p6bannerbot sets mode: +v MasterDuke
|
|||
dogbert11 | the above way is how I always do these things | 12:53 | |
AlexDaniel | nine: segfaults with MVM_JIT_DISALBE=1 | 12:55 | |
dogbert11 | got a coredump | 12:56 | |
AlexDaniel | dogbert11: what about backtrace? is it as useless? | ||
dogbert11 | no, it's better by I failed to do what I wrote above i.e. I forgot to turn off opts, let me try again ... | 12:58 | |
AlexDaniel | dogbert11: are you running it through `make` too? | 12:59 | |
nine: hahaha of course MVM_JIT_DISALBE makes no difference | 13:00 | ||
:D | |||
13:00
MasterDuke left
|
|||
dogbert11 | yes, I'm following your advice | 13:00 | |
AlexDaniel | (disaLbe) | ||
dogbert11 | that's a new option, where did you find it :) | 13:03 | |
AlexDaniel | nine told me about it! :D | ||
I don't think it segfaults with jit disabled | 13:05 | ||
but honestly it's hard to tell | |||
dogbert11: if you can reproduce, maybe you can try bisecting it? | 13:06 | ||
dogbert11 | I'll see what I can do, atm it does not want to SEGV, now that optimizations are turned off, grr. | 13:09 | |
13:10
lucasb joined,
p6bannerbot sets mode: +v lucasb
15:12
leont joined,
Ven`` joined
15:13
p6bannerbot sets mode: +v leont,
p6bannerbot sets mode: +v Ven``
15:16
lizmat left
|
|||
dogbert11 | AlexDaniel: reproed, made an update to R#2564 | 15:20 | |
synopsebot | R#2564 [open]: github.com/rakudo/rakudo/issues/2564 [⚠ blocker ⚠] "Cannot invoke this object (REPR: Null; VMNull)" in t/04-nativecall/06-struct.t on mipsel | ||
AlexDaniel | dogbert11: yeah I've seen it | 15:21 | |
that's really nice | |||
gives me hope :) | |||
dogbert11 | well, I ran the system under load, i.e. had a spectest run in another terminal. That uncovered another SEGV :( | 15:22 | |
15:22
zakharyas joined
15:23
p6bannerbot sets mode: +v zakharyas
|
|||
dogbert11 | a SEGV in t/spec/S32-io/utf16.t | 15:23 | |
AlexDaniel | maybe the same issue? | ||
dogbert11 | doesn't look like it | 15:24 | |
#0 0x00007f31704db8e4 in MVM_string_utf16_decodestream_main (tc=0x237ba50, ds=0x5acb440, stopper_chars=0x7ffff4d33ca4, seps=0x0, endianess=1) at src/strings/utf16.c:63 | 15:25 | ||
#1 0x00007f31704db885 in MVM_string_utf16be_decodestream (tc=0x237ba50, ds=0x5acb440, stopper_chars=0x7ffff4d33ca4, seps=0x0) at src/strings/utf16.c:46 | |||
#2 0x00007f31704b90da in run_decode (tc=0x237ba50, ds=0x5acb440, stopper_chars=0x7ffff4d33ca4, sep_spec=0x0, eof=0) at src/strings/decode_stream.c:145 | |||
possibly something for samcv | |||
aha | 15:37 | ||
AlexDaniel: M#1030 | 15:41 | ||
synopsebot | M#1030 [open]: github.com/MoarVM/MoarVM/issues/1030 Valgrind errors when running t/spec/S32-io/utf16.t | ||
AlexDaniel | dogbert11: looks familiar, maybe check latest robertle tickets? | 15:47 | |
15:49
lucasb left
|
|||
dogbert11 | timotimo, nine: are any of you around? | 16:02 | |
is anyone with some c-language fu around then :) | 16:03 | ||
and jnthn is resting out in the snow I guess :) | 16:05 | ||
AlexDaniel: I'm 'relatively' certain that I know what the problem is | 16:13 | ||
16:16
zakharyas left
16:19
zakharyas joined
16:20
p6bannerbot sets mode: +v zakharyas
16:25
domidumont joined
16:26
p6bannerbot sets mode: +v domidumont
|
|||
timotimo | o/ | 16:32 | |
wow, that spec test is loud | 16:33 | ||
dogbert11 | timotimo: I think I see the error | 16:35 | |
check this line (62) and line 57 here github.com/MoarVM/MoarVM/blob/mast...tf16.c#L62 | 16:36 | ||
look wrong to my untrained eye | |||
*looks | 16:37 | ||
timotimo | yeah, cur_bytes would be uninitialized there every time | 16:43 | |
dogbert11 | is the correct fix to set cur_bytes to NULL or should something be done about line 62 as well | 16:45 | |
dogbert11 is a bit uncertain wrt the correct fix | 16:47 | ||
16:50
Ven`` left
16:52
zakharyas left
|
|||
timotimo | can ds->bytes_head ever be null? | 16:54 | |
ah, yes it can be | |||
but then it'll "immediately" return 0 later on | |||
wait a minute ... | |||
if cur_bytes is nulled out, the next line that tries to dereference cur_bytes would segfault? | 16:55 | ||
dogbert11 | I have to admit that I don't know what cur_bytes should be set to, NULL is just a wild guess :) | 16:57 | |
timotimo | well, null is surely a more sensible value than "whatever happens to be on the stack at that given position at that moment" | 16:58 | |
but still ... | |||
dogbert11 | I think we're in agreement the logic seems a bit suspect | 16:59 | |
is it something for samcv you think? | |||
timotimo: you're right, setting cur_bytes to NULL would be a bad idea :) | 17:02 | ||
the code itself is relatively new, i.e. September 2018 | 17:04 | ||
timotimo | yeah utf16 was only recently made to really work right | 17:09 | |
dogbert11 | should I add some extra info to the case or do you think the valgrind output is enough? | 17:10 | |
timotimo | i... | 17:12 | |
but how does this code do anything but violently asplode whenever it's run? | 17:13 | ||
only because a valid pointer happens to sit on the stack at that position usually? | |||
dogbert11 | I noticed that if MoarVM is compiled normally, i.e. without turning off optimizations, then valgrind fails to detect the problem | 17:14 | |
timotimo | like, if you initialize it to null, does it reliably null-pointer-deref and segfault there? | ||
in that case, perhaps the optimizer says "well, that's undefined behaviour" and just moves the code below the "return 0" or something | |||
i wonder if a coverage report will show any lines below that return 0 or maybe the return 1 to be covered by that test file | 17:15 | ||
dogbert11 | optimizers seems to be full of esoteric trickery | ||
timotimo | yeah | 17:16 | |
dogbert11 | I'm rerunning stresstest now, with optimizations off, in order to see if something else turns up as well | 17:17 | |
timotimo | that strikes me as a good idea | 17:18 | |
we might want to invest some time into ubsan, too, though some undefined behaviour we actually want, like i think int overflows and shifts with "too big" values? | 17:19 | ||
dogbert11 | how does that work, can you do something like 'perl Configure.pl --debug --ubsan --prefix=../../install/' | 17:20 | |
timotimo | i don't know if we already have support for it in configure.pl | ||
dogbert11 | Configure.pl: prefix=s bindir=s libdir=s mastdir=s make-install asan ubsan valgrind telemeh show-autovect show-autovect-failed:s), | 17:21 | |
so perhaps it might work | |||
does ub in ubsan mean undefined bahaviour | 17:23 | ||
timotimo | aye | 17:24 | |
dogbert11 | will definitely have to try that out | 17:25 | |
timotimo: when building MoarVM with --ubsan I got this: 3rdparty/dynasm/minilua.c:1609:4: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int [31]' | 17:27 | ||
hmm, src/core/validation.c:250:23: runtime error: load of misaligned address 0x7f8f1b1f67ee for type 'MVMuint32', which requires 4 byte alignment | 17:29 | ||
0x7f8f1b1f67ee: note: pointer points here | |||
07 00 01 00 70 00 00 00 68 01 02 00 01 00 08 00 00 00 02 00 f9 00 02 00 50 00 00 00 07 00 01 00 | |||
timotimo | i imagine that would be okay | 17:30 | |
dogbert11 | theand this one: src/6model/serialization.c:1679:21: runtime error: left shift of 4235 by 52 places cannot be represented in type 'long int' | ||
timotimo | we do have some defines for "can handle unaligned X bit reads/writes" | ||
yeah, that's one that i mentioned for things we do want | |||
dogbert11 | ok, cool | ||
hmm, some tests seems to hang when using ubsan | 17:36 | ||
src/jit/graph.c:39:5: runtime error: null pointer passed as argument 2, which is declared to never be null | 17:38 | ||
timotimo: check this out: src/strings/utf16.c:63:15: runtime error: member access within null pointer of type 'struct MVMDecodeStreamBytes' | 17:46 | ||
18:06
lizmat joined,
p6bannerbot sets mode: +v lizmat
18:19
patrickb joined
18:20
p6bannerbot sets mode: +v patrickb
19:32
zakharyas joined,
p6bannerbot sets mode: +v zakharyas
19:38
patrickb left
20:19
lizmat left,
lizmat joined,
p6bannerbot sets mode: +v lizmat
21:15
chansen___ is now known as chansen
21:16
chansen is now known as chansen_
21:38
domidumont left
22:39
zakharyas left
23:39
evalable6 left
23:41
evalable6 joined,
p6bannerbot sets mode: +v evalable6
|