github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:19 MasterDuke joined, MasterDuke left, MasterDuke joined 00:40 AlexDaniel left
timotimo in theory we could support Blob inside of a CStruct with "never read back" semantics, i.e. whatever the C side does, you ain't gonna see it, but you also don't have to pay for copying back and forth 01:26
06:41 brrt joined 07:52 yoleaux joined 07:59 brrt left 12:39 scovit joined
scovit timotimo: why would you allow that? 12:40
timotimo i dunno, copying is expensive? and blob is supposed to be immutable 12:41
scovit But then why wouldn't one use Pointer instead? 12:46
timotimo interop with "native" p6 types 12:47
scovit are you talking about inlined blobs or not? 12:48
timotimo i was thinking of blobs that appear as a pointer in the struct 12:49
scovit Ok, in that case, I think that the only problem would be the elems field in the Repr, right?
timotimo how do you mean "problem"? 12:50
scovit Like why owuld you need to copy the content?
timotimo hm. are you suggesting we actually give the memory address of the buffer the blob itself uses to C? 12:51
scovit yes
and the opposit
e
the buffer of
C you can give to the Blob
right?
timotimo well, there the elems are the problm :) 12:52
scovit elems = -1 :)
then deal with it if you want :)
timotimo Blob is supposed to be immutable, which includes having a fixed size ...
scovit In that case I think it might be a bad idea to allow them 12:53
timotimo right, it'd also be hard to support that in nativecast
since then there's no original Blob object to get the proper size from 12:54
then you're winning nothing over a CArray
scovit agreed
on the other end, a fast cast from blob to CArray might be nice to have (don't remember if it is already there) 12:55
timotimo i hate that we can't make any of this safer
dogbert2_ timotimo: running './perl6--profile t/spec/S02-types/sethash.t' end with a SEGV 13:11
13:12 AlexDaniel joined
dogbert2_ the number of blockers is quite low now 13:17
timotimo well, it better be :) 13:18
dogbert2_ :)
I wonder where nine and brrt are hiding today 13:19
jnthn should maybe be hiding in bed with his cold, but is here anyway :) 13:30
Though I ain't quite sure what I trust myself to touch :)
timotimo oh nose!
dogbert2_ jnthn: want suggestions ? 13:32
timotimo is watching "Making C Less Dangerous in the Linux kernel" to see if anything is interesting for moarvm 13:33
MasterDuke timotimo: in dogbert2_'s example, STABLE(type) is NULL here github.com/MoarVM/MoarVM/blob/mast...ent.c#L516 13:37
timotimo i'm already in rr :)
MasterDuke excellent, i shall leave it to your more capable hands 13:38
timotimo the st pointer got nulled out in a nursery copy step, i.e. the type pointer somehow didn't cause the type to be rooted?
at gen/moar/Metamodel.nqp:2750 (/home/timo/perl6/install/share/nqp/lib/Perl6/Metamodel.moarvm:!produce_parameterization)
this is where that type got logged for the first time
dogbert2_ although I'm not sure it's related, that test file seems to contain a nasty MoarVM bug 13:39
M#1035 13:40
synopsebot M#1035 [open]: github.com/MoarVM/MoarVM/issues/1035 Mysterious error when running t/spec/S02-types/sethash.t with FSA_SIZE_DEBUG=1
nwc10 oooh, 13:41
ASAN is excited by that
timotimo that isn't multithreaded, is it?
nwc10 paste.scsys.co.uk/583170 13:42
can't say when that started, sorry
timotimo that looks like someone's iterating while another place is deleting keys maybe 13:43
MasterDuke i don't see anything obviously multithreaded at a quick glance 13:44
other than (lives|dies)-ok perhaps? 13:45
timotimo i think only something like "run-ok" or so will use threads
MasterDuke none of those 13:46
timotimo ok, so 13:47
the one with FSA_SIZE_DEBUG=1 triggers the invalid read in a test that iterates over the hash and removes items from the hash
perhaps delete_key should use fixed_size_free_at_safepoint 13:48
though it could be that that just makes it harder to hit the bug, not impossible
jnthn I think just harder
timotimo dose the hash iterator keep a pointer directly into the hash?
it must, right?
jnthn Since GC can happen during the iteration
timotimo: I figure perhaps yes, but I don't know exactly; samcv++ probably does 13:49
timotimo MVMHashEntry *cur, *next;
that's troublesome
but given that iterating over the hash while changing its size can not be sane, since rehashing happens during resizing ... 13:50
what are we to do? force iterators over hashes to eagerly get all the keys?
perhaps hold a pointer to the hash "body", so that we can find out when the resize has happened (since the pointer changes) and then throw an exception or start from the beginning? 13:51
jnthn There is a #define that I think detects the case that can be switched on in src/string/uthash_types.h 13:52
(It's not on by default)
timotimo it's "after_add_key", but i reckon it'll also understand delete_key? 13:53
dogbert2_ the bug tends to show up around test 235-6, i.e. 'Can use $_ from .values to remove items from SetHash (2)' followed by 'Can use $_ from .values to restore items in SetHash' 13:59
timotimo yeah, that's consistent with "the hash iterator holds on to a pointer into the hash data while changing the hash moves the hash data away" 14:06
14:13 lucasb joined
samcv timotimo, hello 15:48
timotimo, yeah i believe it does keep a pointer 15:49
at least while the iteration is happening
16:28 brrt joined
brrt ohai #moarvm 16:35
timotimo yeah, it does :( 16:38
samcv: how do you feel about adding one more pointer to the object itself so we can ensure the pointer stays correct for each access? :|
MasterDuke making every hash one pointer bigger? or every iterator one pointer bigger? 16:42
16:48 lucasb left
samcv well that will make it slower 16:51
but correctness matters more i think
so what is getting freed? 16:52
the object that stores the hash right? 16:54
timotimo, so uthash.h:766 ? 16:55
so then the next is not available? 16:56
timotimo hold on, i was afk for a bit 17:07
i'd imagine the hash_state in MVMIterBody to grow a new pointer, yeah 17:08
and i don't think HASH_ITER would need that, since we don't usually have user code run in its body? 17:09
i think HASH_ITER_NEXT_ITEM needs it. though perhaps only where we actually come from an MVMIter object's "shift" repr-method 17:10
17:24 brrt left 17:27 brrt joined
dogbert11 oh, it's brrt 17:29
brrt: did you see this conversation from yesterday? colabti.org/irclogger/irclogger_lo...02-19#l173 17:31
lizmat jnthn timotimo samcv: wrt to this delete key from hash business while we has an iterator on it... I'll gladly change the code in SetHash / BagHash / MixHash to handle that differently should you decide that you shouldn't do that 17:32
timotimo i think it's difficult to handle inside rakudo unless we make iterator functions on hashes always eager 17:39
17:57 patrickb joined
lizmat well, in that case, wouldn't it be just a matter of creating a list_s with an iterator on that ? 18:00
hmmm... well, with some sugar to handle the key_s and value functions on the iterator :-) 18:01
timotimo yeah, that would be possible 18:29
19:00 Kaiepi joined
brrt dogbert11: no, didn't see 19:03
oh, I can explain
nine++ can explain better, though 19:04
roughly; there's two modus-operandi for the nativecall-jit
one is for interpreted code
one for JITted code 19:05
the JIT knows the addresses of the operands, the interpreter doe snot
*does not
so the MVM_JIT_ARG_I64 is, I think, an indirect reference looked up via the interpreter bytecode buffer 19:10
samcv timotimo, do you have code to trigger your issue WRT the hash thing 19:16
19:42 Kaiepi left 19:43 Kaiepi joined
nine brrt: not sure I can explain that better after all :) 19:49
20:19 brrt left
dogbert11 nine, brrt: is there anything in the recently added code that strikes you as odd? github.com/MoarVM/MoarVM/commit/ef...741bf89460 20:41
the above change seems to be the cause of R#2706 20:43
synopsebot R#2706 [open]: github.com/rakudo/rakudo/issues/2706 [āš  blocker āš ] Some weird issue exposed by Font::FreeType
20:50 brrt joined 21:05 robertle joined
nine dogbert11: no, quite the opposite. It looks entirely sane to me. So I concur with jnthn++ that the commit just unlocked JIT compilation of more code and we hit a troublesome piece that's been there for quite a while. 21:36
dogbert11: I've been a bit under the weather the past few days and wasn't really up to debugging anything. But I'm getting better
21:38 nebuchadnezzar left
timotimo samcv: it's in t/spec/S02-types/SetHash.t 22:01
ha, fun. i found a relatively simple way to get a BOOTContext into the serialized blob of my module so it explodes when trying to precomp 22:07
(because BOOTContext doesn't have a serialize function)
samcv timotimo, how many times do i have to run it to get the issue? 22:08
timotimo oh, er, valgrind it
i think we FSA the hash body?
so even when it's freed it's still technically valid memory
samcv yeah 22:09
timotimo so it might actually not even explode in valgrind unless you add --valgrind to moar's Configure.pl 22:10
brrt =/quit 22:11
22:11 brrt left
samcv or maybe change it to fsa debug? 22:11
dogbert11 nine: get well soon 22:12
samcv i'm still sick after more than a week :( 22:13
dogbert11 samcv: turn on FSA_SIZE_DEBUG
timotimo btw why would FSA_SIZE_DEBUG make this properly asplode? 22:15
dogbert11 good question
nine samcv: oh, that sucks :/
dogbert11 but it does 22:16
timotimo oooh
because using size debug makes it use malloc directly
samcv nine, yeah. i have only taKen two days off. but days when i get tired i've just worked from home the rest of the day after doing what i need to do
timotimo instead of the fsa pools
samcv i am getting better but vvery slowly
i got sick after fosdem and my friend from malaysia got sick. he was only sick 2 days. but i am still sick
timotimo bah, got the short end of the stick :( :( 22:17
samcv pretty often people catch things after going through airports. so no clue whatever it is
timotimo or ... the long end of the sick maybe
22:17 robertle left
samcv whichever is the least common of the types of sticks 22:17
is what i got :-)
dogbert11 flu ? 22:19
samcv guessing flu 22:20
dogbert11 that's usually quite uncomfortable
samcv feels like the flu at least. i find cold usually is more symptoms and flu makes you more likely to feel "sick"
tired, sore etc
dogbert11 :( 22:21
for me it takes around a week to recover from a flu 22:22
timotimo There were 49,514,936 object allocations. The dynamic optimizer was able to eliminate the need to allocate 645,212 additional objects (that's 1.29%) 22:24
the hard work paid off!! 22:25
tadzik wow!
timotimo (but yay moarperf now shows that in the overview)
(100% Scalars were replaced) 22:27
22:30 MasterDuke left
nine samcv: sudden onset of high fever that will stay for days is a good indicator of the flu. Got me down for a week on a vacation in Japan. 22:31
timotimo damn, i hope you had some vacation left after that
nine I did have a week and a half before that. I was just glad that I got a little better in time for the flight home. 12 hour flights are bad enough without sickness. 22:33
timotimo oh yeah
and with a flu on an airplane, owch, you'd be infecting 100% of the passengers
nine Well, Japan was at least the right place for getting disposable face masks to prevent exactly that :) 22:34
Well, off to bed now. Good night! 22:36
timotimo aye 22:37
good night!
jnthn Goodness, everyone seems to be getting it this winter 22:44
jnthn currently has a cold-ish thing that doesn't feel like it's going to turn into flu, but has given him some days of sore throat, ears, etc. 22:45
timotimo i've only got a super mildly sore throat, maybe even just my imagination
jnthn Mine was a bit too strong for imagination. But on the first day I had it, I went out for some spicy Indian food. Maybe it helped. :) 22:49
22:49 Kaiepi left, Kaiepi joined
samcv nine, yeah that's prolly what i had. i don't have a thermometer. but during the peak of it i did feel warm 22:53
talked to sawyerX and stevan today about PerlCon 2020 Amsterdam. now i need to look for a venue and get quotes 23:00
jnthn samcv++ 23:06
I'd like to come to that :)
samcv jnthn, keynote speaker? (just kidding :) unless you're offering) 23:13
also theme suggestions would be nice. since i have no clue what i want
jnthn I dunno, I'm a keynote speaker this year, won't folks be bored of me by then? :) 23:14
samcv you you're keynote at riga?
jnthn Yeah 23:17
At least, perlcon.eu/ thinks so :) 23:18
samcv nice!
We start at 10:00 and continue the main program until 18:00. The extended program begins at 18:00 and continues till 02:00. T 23:19
02:00 :o
what.
timotimo is that like ... including social dinner event?
samcv party and after party and after after partyp 23:20
including dance floor and DJ
timotimo post-after-party-chillout and optional pyjama party
lizmat
.oO( perljama party)
samcv one thing we'll be exploring for PerlCon 2020 is if we can use Booking offices for the tutorials on weekend 23:21
do wed-fri for the confernece and weekend do tutorials at booking offices to cut costs
jnthn I'm quite certain I won't be parting until 2am on the Thursday :P 23:26
lizmat
.oO( partying ? )
23:27
jnthn uh, yes :) 23:29
Apparently tonight I'm too cold-y to type, let alone party :)
samcv we can instead cut costs by having all training's being ftrom 6pm to 12. and then dance club from 24:00-02:00 charging entry for not perl antendees 23:30