Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
jnthnwrthngtn Moarning. So it turns out I can turn one of the failing NQP tests after switching method dispatch to new-disp into a SEGV by deleting some of the test, and so probably the other odd failure mode is also a result of some kind of memory corruption... 08:45
Nicholas "my machine" (several of them) are currently powered down because they in Oregon, and it's hot there. 08:46
so I don't have access to anything fast with ASAN or valgrind 08:47
jnthnwrthngtn I'm guessing "hot" means "very unusually hot"... 08:50
Nicholas whole of the west coast of North America is, I believe. Canada is breaking records. 08:51
moon-child yeah, last few days have been hell
Nicholas so powering down non-essential services seemed like a good plan
jnthnwrthngtn uhh... 09:21
MVMObject *fateres = MVM_repr_alloc_init(tc, tc->instance->boot_types.BOOTIntArray);
MVM_ASSERT_NOT_FROMSPACE(tc, fateres);
The assert fails right after allocation?!
Ah, I guess it means something wrote into the previous nursery 09:24
So it's not all zeroed 09:25
Nicholas ooh fun. Once upon a time I had a hacky patch to allocate nurseries with mmap and change them to unaccessable when not in use. That would have exploded with this. 09:41
if your guess is right
hmm, I wonder *how* hacky it is, and whether it's viable to make it a conditional compile... 09:42
but not this morning. Or at least, this part of today.
jnthnwrthngtn Yeah, I did wonder about mprotect hacks 09:44
Can't rr it as it seems not to support AMD CPUs (or AMD CPUs don't support it...) 09:50
Nicholas Aaa(rr)gh
At least one of the (powered off) machines could run rr
I can't remember if it was Intel, or if there is some new enough AMD CPU that rr can work with. 09:51
Either way, can't currently help
jnthnwrthngtn Ah, it seems there are patches in rr for zen and zen 2 architectures, but I think I've zen 3 09:56
So mine is maybe too new
argh
Turns out the cheap way to get some an effect is to free the fromspace memory always after GC is done 10:04
And then let ASAN report the write to freed memory 10:05
Goodness, this finds all kinds 10:11
Bleh, though having now fixed those, it turns out they weren't the actual issue the test runs into, which instead seems to be about memory managed with the FSA 10:28
meeting and lunch now, guess I'll try to hunt it down later
nine Nicholas, jnthnwrthngtn: github.com/MoarVM/MoarVM/commit/9d...4d9f5b579c 10:48
jnthnwrthngtn: rr runs just fine on zen3. I use github.com/rr-debugger/rr/wiki/Zen...nel-module 10:51
Just load that kernel module and rr works like a charm 10:52
sena_kun jnthnwrthngtn, github.com/rr-debugger/rr/wiki/Zen says it should work. :/
jnthnwrthngtn Oh. When I ran rr it pointed me to a github issue about it, when I read through, and saw no mention of that :) 11:03
jnthnwrthngtn Current NQP HEAD compiles call and callmethod QAST nodes into dispatch instructions. 14:22
It builds. 3 failing tests, 2 a bug I need to hunt, 1 an NYI. Also an intermittent hang that I'm looking at now. 14:23
I also discovered that the QAST regex compiler will need updating since it directly emits findmeth/invoke. There are likely some other such places to update too 14:26
moon-child nine: that reminds me of the jvm XXXalot flags they use for testing 21:04