Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-10-01

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

All times shown according to UTC.

Time Nick Message
00:55 cognominal joined #moarvm
01:08 benabik joined #moarvm
01:46 dalek MoarVM: a547c80 | jimmy++ | nqp-cc/src/QASTRegexCompilerMAST.nqp:
01:46 dalek MoarVM: proper handling of classes an zerowidth, jnthn++
01:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a547c80d5d
02:05 FROGGS joined #moarvm
06:56 FROGGS joined #moarvm
07:02 FROGGS joined #moarvm
07:32 dalek MoarVM/gcorch: a547c80 | jimmy++ | nqp-cc/src/QASTRegexCompilerMAST.nqp:
07:32 dalek MoarVM/gcorch: proper handling of classes an zerowidth, jnthn++
07:32 dalek MoarVM/gcorch: review: https://github.com/MoarVM/MoarVM/commit/a547c80d5d
07:32 dalek MoarVM/gcorch: 4e236a5 | diakopter++ | nqp-cc/src/QASTRegexCompilerMAST.nqp:
07:32 dalek MoarVM/gcorch: Merge branch 'master' of github.com:MoarVM/MoarVM into gcorch
07:32 dalek MoarVM/gcorch: review: https://github.com/MoarVM/MoarVM/commit/4e236a5115
07:51 diakopter jnthn: you'll be glad to know I'm writing up a changelog for the gcorch branch
07:51 diakopter should aid the diff review.
08:06 diakopter .ask TimToady ltm s05 patch - "whitespace is the archtypical" .. archtypical? or archetypical? or archetypal?
08:06 yoleaux diakopter: I'll pass your message to TimToady.
08:40 moritz does 'make' in nqp-cc/ actually build an nqp?
08:41 moritz if yes, where is it? if no, how can I run moarqp?
08:42 JimmyZ ../moarvm nqp.moarvm
08:42 moritz JimmyZ: thanks
08:43 diakopter :)
09:02 dalek MoarVM/gcorch: ce534ce | diakopter++ | src/gc/orchestrate.c:
09:02 dalek MoarVM/gcorch: finish merging jnthn's patch
09:02 dalek MoarVM/gcorch: review: https://github.com/MoarVM/MoarVM/commit/ce534ce546
09:08 tadzik I must draw that
09:08 diakopter O_O
09:09 * masak .oO( what's an Orch, and what is it doing in the GC? )
09:14 tadzik http://imgur.com/8hkkbnb there
09:17 masak :P
09:18 masak those horses all look identical :)
09:19 moritz free the s-tables?
09:20 tadzik stables
09:20 grondilu joined #moarvm
09:21 tadzik masak: the first one I drew was so perfect, that trying to draw another would just result in a worse horse :)
09:22 * masak .oO( reaching the saddle point of perfection )
09:23 * moritz tries to come up with a pun about warsow and worse horse, and fails
09:24 jnthn tadzik++
09:26 masak moritz: making horse puns for a living would be fun, but unfortunately it does not result in a stable income.
09:30 moritz masak++
09:32 tadzik :>
09:36 * diakopter bridles at the humor
09:41 * masak .oO( just some harness joking around )
09:45 jnthn saddly, I can't think of any more horse puns...
09:45 masak I could keep doing them 'til I'm horse.
09:45 cognominal joined #moarvm
09:46 diakopter nay.
09:47 tadzik neigh
09:49 jnthn åhnej
09:55 FROGGS masak: you say careering horses gives you a better income as the career as a prance.... err, stand-up comedian?
10:05 masak I guess I'm saying... neither of these things should enter your curriculum.
10:19 not_gerd joined #moarvm
10:19 not_gerd o/
10:19 not_gerd if there are no objections, I'll start implementing https://gist.github.com/gerdr/aabd97a9637e0720ccf4 tonight in preparation for adding extops
10:20 tadzik s/of of/of/ :)
10:21 not_gerd I don't think that will stop me from writing the code ;)
10:21 tadzik I hope not :)
10:25 jnthn not_gerd: Gotta go to a boring sales meeting now...will look at it when I'm back :)
10:25 jnthn &
10:27 not_gerd take your time - I won't start with actual coding until much later
10:34 FROGGS not_gerd: I don't think I can care about `make install` today :/
10:37 not_gerd FROGGS: no worries - if it becomes an issue, I'll do it
11:25 FROGGS not_gerd: thank you
12:39 timotimo .o( any additional one would just have been a whorse )
13:01 arnsholt joined #moarvm
13:10 benabik joined #moarvm
13:23 not_gerd bye, #moarvm
13:23 not_gerd left #moarvm
15:57 FROGGS joined #moarvm
16:37 not_gerd joined #moarvm
16:37 not_gerd ~~
16:37 jnap joined #moarvm
16:39 diakopter hi :)
16:42 not_gerd ¡Hola!
16:43 * not_gerd wonders what the ¡ operator should do
16:43 TimToady it's says you're about to take a factorial
16:43 TimToady *it
16:44 timotimo ¿que?
16:44 TimToady actually it was one of the characters I was looking at for replacing lift with placeholderish syntax
16:45 TimToady though © better indicates "caller"
16:47 * TimToady wonders if Apple sues people for saying ¡Pad!
17:04 jnap joined #moarvm
17:10 jnap joined #moarvm
17:28 jnap joined #moarvm
18:27 grondilu joined #moarvm
18:32 lizmat joined #moarvm
18:59 dalek MoarVM: be0fe24 | jnthn++ | src/core/interp.c:
18:59 dalek MoarVM: Fix STable claiming.
18:59 dalek MoarVM:
18:59 dalek MoarVM: With this, t/serialization/01-basic.t now fully passes.
18:59 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/be0fe2401e
18:59 lizmat joined #moarvm
19:00 sorear joined #moarvm
19:00 diakopter o_O
19:00 jnthn 1..24 pass of 02-types.t too
19:01 jnthn Now need to fix 25..31 ;)
19:01 ssutch joined #moarvm
19:01 diakopter o_O
19:02 TimToady careful, you'll be done with rakudo by the end of the day at this rate
19:04 diakopter and my eye will pop
19:05 jnthn Guess if progress is that awesome I've got time for a walk... :)
19:05 lizmat_ joined #moarvm
19:05 jnthn bbiab &
19:05 FROGGS \o/
19:06 FROGGS awesome these days are
19:11 ssutch joined #moarvm
19:17 lizmat_ joined #moarvm
19:17 timotimo so, i understand this correctly? we now have a stage0 in .moarvm generated with the cross compiler and we're about to make that stage0 compile a stage1, so that we can build a stage2 with that?
19:18 diakopter "about to" is 1-2 weeks I'm sure
19:19 FROGGS timotimo: I think that should be right, yes
19:19 FROGGS and then we will use that as stage0 I suppose, when all ops have settled
19:20 timotimo i thought all that's needed now is serialization? and jnthn is about to make that work tonight :P
19:20 FROGGS *g*
19:22 nwc10 win 32
19:23 lizmat joined #moarvm
19:27 johnny5_ joined #moarvm
19:28 lizmat_ joined #moarvm
19:44 foo_bar_baz joined #moarvm
19:52 lizmat_ joined #moarvm
19:53 japhb_ joined #moarvm
19:58 jnthn ok, let's see if I can figure out 02-thingy.t
19:59 * diakopter sends you positive energy
19:59 jnthn Serialization Error: missing static code ref for closure
19:59 jnthn Hm :)
19:59 diakopter sounds like a bug :)
20:00 benabik An error, at least.
20:01 diakopter heh.
20:03 lizmat joined #moarvm
20:04 dalek MoarVM: 310ccae | jnthn++ | src/core/interp.c:
20:04 dalek MoarVM: scsetcode needs to set code object's SC
20:04 dalek MoarVM:
20:04 dalek MoarVM: Fixes remaining failures in t/serialization/02-types.t.
20:04 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/310ccaeb02
20:05 diakopter jnthn: the recent fixes there have seemed surprisingly simple/similar.. ;)  but I'm sure not trivial to find.
20:05 benabik Probably easier for jnthn, given that he's implemented this 3(?) times?
20:06 jnthn Plus designed the thing in the first place... :)
20:06 jnthn So I've got a better picture of how it's *meant* to work, which is decidedly helpful.
20:06 benabik Well, designing something doesn't always tell you where to look in the implementation...
20:07 diakopter jnthn's gotten accustomed to my mistkae patterns
20:08 jnthn 1..4 of 03-closures.t pass right off with that last fix. So, 5..9 there to go... :)
20:08 japhb joined #moarvm
20:09 * diakopter is flabbergasted you haven't fixed bugs in my half of serialization.c yet
20:09 timotimo \o/
20:11 jnap joined #moarvm
20:13 diakopter jnthn: master is telling me Unhandled blocktype QAST::Block<1400753610904153498>.blocktype
20:14 diakopter error error
20:14 jnthn diakopter: yeah :)
20:14 diakopter oh..
20:14 jnthn diakopter: Looks like interpolation fail
20:14 diakopter there's a Makefile thingie missing for nqp-mo.pm
20:14 jnthn or rather, expecting Perl 6 interpol semantics
20:14 jnthn When NQP has simpler ones
20:14 diakopter this is the 2nd time it's tripped me up
20:17 TimToady someday when our optimizers are up to snuff, we can just start porting it all to Perl 6, one of those sister languages to NQP :)
20:17 timotimo interpol, eh?
20:19 jnthn TimToady: I'm more scared of circularity sawing there... :)
20:19 jnthn I'm still, at this point, deeply glad that Rakudo is *not* a bootstrapped compiler and only NQP does that.
20:20 TimToady doubtless understanding circularity better is one of the prerequisites to getting our optimizers up to snuff
20:21 diakopter jnthn: I'm kinda stumped on this build error.
20:21 diakopter C:\Users\mwilson\src\MoarVM​\nqp-cc\install\bin\nqp.exe nqp-moar-cc.nqp --setting=NULL --target=mbc --output=nqp-mo.moarvm nqp-src\nqp-mo.pm
20:26 jnap joined #moarvm
20:27 jnthn diakopter: Hm, is f->context_object just caching the context wrapper?
20:27 diakopter wha
20:28 diakopter oh, I think so, yes
20:28 jnthn oh...heh
20:28 jnthn 0xbaadf00d...that's not a great point :)
20:28 jnthn *pointer
20:28 diakopter well
20:28 diakopter oh, did I forget to mark that one
20:29 ssutch joined #moarvm
20:29 jnthn no, forgot to zero it in the first place
20:29 jnthn we don't memset(0) on frames 'cus we touch everything
20:29 jnthn or near enough
20:30 diakopter o
20:30 diakopter so anyways, any idea on how to build the cross-compiler?
20:30 jnthn but yeah, you may have forgot to mark it too :P
20:30 diakopter well it's not just a cache
20:30 diakopter it needs to be unique per frame
20:31 diakopter so it's enforcing that
20:31 diakopter it's so it can store a sc, mostly, I think. and used an object tomake it consistent
20:31 diakopter iirc.
20:31 jnthn Yeah, clearing it at frame allocation should do it.
20:32 jnthn On JVM I just shoved an SC pointer in the frame itself. But still needs care.
20:32 jnthn We don't re-use them on JVM at present...
20:35 diakopter jnthn: any ideas on how I can build the cross compiler?
20:37 diakopter FROGGS: well our stage0 is really nqp's stage3
20:37 dalek MoarVM: 4092f6e | jnthn++ | src/ (2 files):
20:37 dalek MoarVM: Ensure context_object is NULL and marked.
20:37 dalek MoarVM:
20:37 dalek MoarVM: Avoids one segfault in closure serialization.
20:37 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4092f6e6ad
20:37 dalek MoarVM: e79e004 | jnthn++ | src/6model/serialization.c:
20:37 dalek MoarVM: Better error reporting.
20:37 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/e79e0048fc
20:37 dalek MoarVM: 709dce3 | jnthn++ | src/6model/serialization.c:
20:37 dalek MoarVM: Pass correct object; fixes 03-closures.t.
20:37 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/709dce3253
20:37 jnthn diakopter: What's keeping you from building it?
20:37 diakopter that error I pasted
20:37 diakopter for that command I pasted
20:37 jnthn diakopter: What branch?
20:38 diakopter master like I said :P
20:38 jnthn o.O
20:38 FROGGS diakopter: I thought it is just a copy of stage2
20:38 * jnthn is on master too and it builds here... :S
20:38 diakopter make realclean?
20:38 jnthn diakopter: nqp --version ?
20:38 diakopter This is nqp version 2013.09-48-g62b8cab built on parrot 5.5.0 revision RELEASE_5_5_0
20:38 jnthn hm, that matches mine exactly too
20:39 jnthn Doing realclean
20:39 jnthn btw, all t/serialization/*.t pass now :)
20:39 diakopter wow.
20:39 FROGGS jnthn++
20:39 FROGGS yay!!
20:39 benabik O.o
20:39 jnthn diakopter++ # master transliterator :)
20:40 benabik diakopter++ jnthn++
20:40 diakopter jnthn: did you like how I left the parrot macros in :)
20:40 jnthn um...
20:40 diakopter :X
20:41 jnthn :)
20:41 diakopter >.<
20:41 jnthn So that's where they're from... :P
20:41 diakopter I'm sure rakudo will expose more errors that don't have test coverage
20:42 jnthn bootstrapping NQP may also :)
20:44 benabik Erm. "t/serialization/01-basic.t ..... moarvm(41865) malloc: *** error for object 0x7ffc40a35808: incorrect checksum for freed object - object was probably modified after being freed."
20:44 diakopter hee
20:45 diakopter configuring with clang && instrumentation then running with the asan prettifier will help solve that
20:45 diakopter asan_symbolize
20:46 jnthn diakopter: The realclean and re-bulid worked for me...
20:46 not_gerd did anyone here try out the clang visual studio integration, btw?
20:46 diakopter I installed it
20:46 not_gerd there are shiny new windows binaries for clang
20:46 diakopter but haven't tried it
20:47 BinGOs o.O
20:47 diakopter this is what I have on ubuntu btw.. Ubuntu clang version 3.4-1~exp1 (trunk) (based on LLVM 3.4)
20:47 diakopter (which includes the awesome asan_symbolize)
20:48 dalek MoarVM: 746bdfa | jnthn++ | nqp-cc/tools/build/Makefile.in:
20:48 dalek MoarVM: Add serialization tests to selftest.
20:48 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/746bdfaa40
20:48 benabik clang: error: '-fsanitize-undefined-trap-on-error' required with '-fsanitize=address' option
20:48 benabik clang: error: unsupported argument 'address' to option 'fsanitize='
20:49 diakopter too old clang?
20:49 benabik Is there a simple way to add to CFLAGs?
20:50 not_gerd edit the Makefile ;)
20:50 benabik So no
20:50 jnthn CFLAGS    = ...
20:50 jnthn Looks pretty easy to me :)
20:51 benabik Apparently too old a clang.  Xcode seems to use 3.3 and Asan is 3.4(?)
20:52 diakopter I thought there was a new xcode like last week
20:53 benabik Yeah, but Apple (like many large vendors) moves up versions slowly
20:53 diakopter but Apple *makes* clang
20:54 diakopter its chief architect is now the vp head of the xcode division
20:54 diakopter jnthn: I pulled to master and it seems to be working now
20:54 diakopter (oops, osrry)
20:54 jnthn diakopter: hm, ok
20:54 benabik Doesn't keep the release engineers from complaining if you try to change the version of something.  I bet 10.9 will upgrade.
20:57 jnthn So, now to try and make --target=mbc work...
20:58 donaldh joined #moarvm
20:59 benabik At least it's reliable.  Although gdb just tells me it's trying to allocate a page in the GC.
21:00 benabik In stub_objects, if that's informative.
21:01 dalek MoarVM/dll: ec3339c | (Gerhard R)++ | / (18 files):
21:01 dalek MoarVM/dll: Start implementing DLL support
21:01 dalek MoarVM/dll:
21:01 dalek MoarVM/dll: Symbols are still stubbed.
21:01 dalek MoarVM/dll: review: https://github.com/MoarVM/MoarVM/commit/ec3339c623
21:02 not_gerd so, I did get some hacking in
21:02 jnthn not_gerd++
21:02 jnthn benabik: Hmm, that's the point that mallocs though, thing is what had it before... :)
21:03 benabik jnthn: Right.
21:03 * benabik doesn't really have the time to build a new clang to get asan
21:04 not_gerd if we want to keep cgoto performing well, we can't add extops to the opcode space, though, but would need to dispatch from a single op
21:05 not_gerd ie a single extop instruction which takes the extop id as first argument (and a variable number of remaining args)
21:05 not_gerd thoughts?
21:07 jnthn :/
21:08 jnthn Not too fond of an extra 2 bytes on every extop in the bytecode.
21:08 diakopter not_gerd: nah you can inject placeholders for all the unused ones :)
21:09 jnthn Well, you could resize the labels table, yes :)
21:09 jnthn And just point 'em all at the extop label :)
21:09 diakopter right
21:10 not_gerd for a reasonable number of extops, just adding dummy targets could work out
21:10 not_gerd jnthn: I could resize the table, but how would I inject the labels into the code ;)
21:10 not_gerd no JIT yet
21:11 diakopter just on startup
21:12 benabik void *extop_label = &&OP_extop;
21:13 benabik Then insert extop_label into the jump table, and the OP_extop code handles dispatching to function.
21:13 * jnthn was thinking of what benabik said, yes.
21:13 * diakopter too, ftw
21:14 jnthn for the win? :)
21:14 diakopter yeah :P
21:16 tadzik I always wondered, isn't "for the win" a grammar fail of sorts?
21:17 diakopter well it's an appendix
21:18 tadzik appendix?
21:19 diakopter something appended?
21:20 diakopter tadzik: good thing I didn't make reservations for yosemite, since it's now closed due to USA govt "shutdown"
21:20 tadzik oh shite
21:21 tadzik soooooo, is anyone guarding it? :>
21:22 jnthn :P
21:23 * jnthn is quite happy not to live under a political system where the majority vote to re-elect a president who set a policy, and those who lost the election get to hold the country ransom 'cus they don't like the policy anyway...
21:24 benabik tadzik: Police are "essential"  (although I wonder if their paychecks are...)
21:26 diakopter jnthn: erm the president doesn't set policy
21:27 benabik Well, he sets policy but not law.  >.>  <.<
21:27 benabik Surprising number of regulations are solely under the control of the Executive.
21:27 jnthn diakopter: Right, I'm sure obamacare has nothing to do with obama :P
21:27 diakopter I didn't say that; I'm saying the Congress had to vote for it
21:27 TimToady well, originally it was romneycare :)
21:27 diakopter right
21:28 jnthn hah :)
21:28 TimToady the ironies in all this is too deep for words
21:29 diakopter but yes it's a hostage/blackmail/ransom situation
21:29 diakopter but they do that all the time
21:29 diakopter usually on smaller thingies.
21:29 TimToady at the moment, the democrats and moderate republicans are both content to pursue a strategy of letting the tea party marginalize itself further
21:30 TimToady eventually the money will walk away from the tea party, even if they are still gerrymandered to get elected
21:30 tadzik well, at least you guys aren't discussing an airplane that fell off the sky 4 years ago...
21:32 benabik Heh.  Australia shut down in '75 and the Queen just fired the entire Parliament.
21:32 diakopter the even stupider thing is they don't have the money to continue operating, obamacare or not
21:33 * grondilu remembers that few years ago Belgium has had no government during a year or two (don't remember how long exactly).  Life went on.
21:33 diakopter were there a million furloughed workers?
21:34 jnthn Are there a million people in Belgium? ;)
21:35 jnthn (yes, I know, there's probably about 10 million or so... :))
21:35 jnthn A million furloughed workers would be a rather incredible chunk of the working population though :)
21:35 grondilu well, I should shut up anyway, as I pretty much don't know what this shutdown stuff is about.
21:36 dalek MoarVM/gcorch: be0fe24 | jnthn++ | src/core/interp.c:
21:36 dalek MoarVM/gcorch: Fix STable claiming.
21:36 dalek MoarVM/gcorch:
21:36 dalek MoarVM/gcorch: With this, t/serialization/01-basic.t now fully passes.
21:36 dalek MoarVM/gcorch: review: https://github.com/MoarVM/MoarVM/commit/be0fe2401e
21:36 diakopter bah
21:37 jnthn oh noahs!
21:37 TimToady wb?
21:37 diakopter fark.
21:37 dalek joined #moarvm
21:37 jnthn phew :)
21:39 dalek MoarVM: 73403d0 | jnthn++ | nqp-cc/src/QASTCompilerMAST.nqp:
21:39 dalek MoarVM: Fix serialization string heap code-gen.
21:40 dalek MoarVM:
21:40 dalek MoarVM: Just nabbed a fix from JVM version.
21:40 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/73403d0fef
21:40 dalek MoarVM: bf63b53 | jnthn++ | / (7 files):
21:40 dalek MoarVM: Add and map getscdesc op.
21:40 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/bf63b53666
21:40 dalek MoarVM: a42d053 | jnthn++ | nqp-cc/src/QASTCompilerMAST.nqp:
21:40 dalek MoarVM: A couple more deserialization code-gen fixes.
21:40 dalek MoarVM:
21:40 dalek MoarVM: This gets --target=mbc to produce MAST for a small example; next fail
21:40 dalek MoarVM: is in bytecode generation.
21:40 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a42d053403
21:40 flussence joined #moarvm
21:44 grondilu .mbc is 'MoarVM Byte Code'?   How is it different from .moarvm
21:44 grondilu ?
21:44 diakopter it's not
21:45 diakopter just a fossil naming convention kept for .. convention
21:45 grondilu k
21:45 diakopter inherited from the squawker
21:52 timotimo the squawker is the parrot-moarvm crosscompiler?
21:53 jnthn My invocation is --target=mbc --output=foo.moarvm, fwiw :)
21:53 timotimo hehe
21:53 jnthn That's where I'll be bug hunting next, anyways. :)
21:53 not_gerd good night o/
21:53 diakopter o/
21:53 jnthn 'night, not_gerd
21:53 jnthn Getting that working is next step to being able to work on bootstrap
21:53 diakopter I almost want to work on master again to let the gcorch branch simmer a bit
21:54 diakopter jnthn: did you see my changelog branch diff?
21:54 jnthn (and it shouldn't be much to get it to work...maybe I nail it tomorrow)
21:54 jnthn diakopter: Yeah, I wasn't sure what all of it meant :)
21:54 diakopter just what it said! ;)
21:55 jnthn well, the last bit confused me
21:55 diakopter jnthn: and maybe I steal the rest of mbc from you tonight :P
21:55 * jnthn had imagined a "flat" bunch of threads rather than parent/child relations
21:55 diakopter they are flat..
21:56 diakopter but a thread has to survive at least 1 gc run anyway
21:56 diakopter since it is the gc that cleans them up
21:56 jnthn ok
21:56 diakopter (because it has to be the one to do it)
21:56 jnthn "a worker thread sorts the worklist it receives by the allocating thread_id of the pointers' targets"
21:56 jnthn I'm curious why we aren't just passing the pre-categorized work? :)
21:58 diakopter cuz theoretically this saves a bunch of allocations and awakenings/check-locations, and sorting takes like 1 ns
21:58 diakopter in high parallel situations anyway
21:59 jnthn ok
22:00 not_gerd left #moarvm
22:03 diakopter jnthn: can I have 10 min of your time to glance at https://gist.github.com/dia​kopter/7b70423d7db7de3fcd72
22:04 jnthn diakopter: Those are ones that blow up on gcorch?
22:04 diakopter jnthn: I'm at a loss for where to start
22:04 diakopter yeah
22:04 diakopter any tips for where to start looking would be awesome
22:04 jnthn diakopter: The files that fail largely strike me as larger ones.
22:05 diakopter yeah, I suspect they are ones that are surviving 10 gc runs
22:05 jnthn diakopter: Could it possibly be that only those make it to a gen2 collection?
22:05 jnthn Turning on GC orch debugging should tell...
22:05 diakopter yeah
22:05 jnthn Well, or it used to. I dunno current state. :)
22:05 diakopter yeah :P
22:05 diakopter but..
22:06 jnthn Next question is, does it segv inside of GC? or after it?
22:06 diakopter after
22:06 diakopter interpreter gets a pointer to a zeroed object
22:06 jnthn Is the pointer it segfaults on in either semispace?
22:06 jnthn *into
22:06 diakopter how do I tell
22:07 jnthn Look at tc->fromspace and tc->tospace or so
22:07 jnthn And add on to them the nursery size
22:07 jnthn (to get end of each)
22:07 jnthn And see if the pointer is in that range.
22:07 diakopter oh noes.
22:07 diakopter my vs has decided to stop being able to attache to processes.
22:07 jnthn If not (I'm guessing *not* if we're looking at a gen2 issue) then it must be into GC
22:07 jnthn s/GC/gen2/ sorry
22:08 jnthn Or just junk
22:08 jnthn What kind of pointer is it, ooc? To an object, or an STable?
22:08 diakopter objet
22:08 diakopter it always fails in the same place
22:08 jnthn (vs) that's invonceneint...
22:08 diakopter array push
22:09 jnthn oh, and array's memory is zeroed...hm
22:09 jnthn The other thing you can do to maybe trigger it in a smaller case is just set the gen2 ratio to 1
22:09 jnthn So it does a gen2 collect every time.
22:09 diakopter heh, ok
22:09 jnthn It'll then probably explode on more things, but hopefully on things with a smaller overall heap
22:09 jnthn Or maybe one of the failure modes gives mroe clues
22:09 jnthn Is it always array push in all the tests?
22:10 diakopter I think so
22:10 jnthn hmmm
22:10 diakopter makes me think it's some particular array
22:10 jnthn I was gonna say, could it be one of the global ones, but it's strange we'd be pushing to any built-in thingy...
22:11 jnthn I then wondered about something we deserialized which are directly gen2 allocated
22:11 jnthn But that also seems odd.
22:11 jnthn It sounds like *something* that points to an array ends up unrooted, anyways...
22:11 diakopter erm
22:11 diakopter vs is now debugging
22:12 diakopter but I'm getting source lines interspersed with machine ode
22:12 diakopter code
22:12 jnthn o.O
22:12 jnthn Right click, is there some "show disassembly" thing?
22:12 diakopter oh heh.
22:12 diakopter nm back to normal
22:12 diakopter erm the object isn't zeroed
22:13 diakopter it has a threadid, size, and st
22:13 diakopter elems is 3, start is 0, ssize is 8, but slot is 0
22:14 diakopter so what would null slots but leave the rest alone
22:16 diakopter jnthn: ?
22:16 jnthn ...
22:16 jnthn Would a wrong call to gc_free do it?
22:17 diakopter yep
22:17 jnthn Then it's likely that.
22:17 diakopter what could cause that
22:17 jnthn The object not being marked, and then the GC freeing it, I'd imagine.
22:18 jnthn So it sounds like it's "just" a lack of marking
22:18 diakopter I'm having trouble imagining what could've had an effect on that in my branch
22:18 jnthn You could be unlucky enough to have moved memory around enough to trigger it...
22:19 diakopter but it's not doing anything differenly in the single-threaded case, I thought
22:19 jnthn Hm, true
22:19 jnthn I mean, what I said would have to imply memory corruption...
22:20 jnthn hmm
22:20 jnthn Did you manage to confirm it's a pointer into gen2 btw?
22:20 diakopter the verbose instruction tracing output doesn't help since it outputs more than 4GB in the first 400ms worth of untraced run
22:21 jnthn See src/gc/debug.h for a macro that I sometimes use that may be inspiration...
22:21 diakopter 3cc55c55b0
22:21 diakopter fromsapce 0x0000003cc54cb040
22:22 diakopter tospace 0x0000003cc56d3040
22:22 diakopter MVM_NURSERY_SIZE 2097152
22:23 jnthn r: say 1025392 < 2097152
22:23 jnthn It's into fromspace.
22:23 jnthn That should never happen.
22:24 diakopter :P
22:24 jnthn So, not gen2 specific issue, seems...
22:24 jnthn To see where it's going on in the code, use the macro in debug.h in an if statement, and call MVM_panic.
22:25 diakopter but where?
22:25 jnthn This will give a backtrace, which may help us understand where we are and what array we're talking about
22:25 jnthn It's happening in a push, yes?
22:25 diakopter er, at_pos
22:25 jnthn Is it from a push op from interp.c?
22:25 diakopter atpos_o
22:25 jnthn If so jsut stick if int there...
22:25 jnthn Yeah
22:26 jnthn oh, it's easier even
22:26 jnthn MVM_ASSERT_NOT_FROMSPACE(tc, obj);
22:26 jnthn In that op
22:26 jnthn You'll need to #include gc/debug.h too.
22:29 diakopter Collectable in fromspace accessed
22:29 diakopter https://gist.github.com/dia​kopter/f186647c9522cdcbcfb0
22:29 diakopter o_O
22:31 diakopter line no seems off
22:32 jnthn Presumably $cur_candidate := @candidates[$cur_idx]; though...
22:33 diakopter <shrug>
22:34 jnthn It's somewhat suspect we end up calling .dispatch too
22:34 jnthn We really should be hitting the multi-dispatch cache...
22:35 jnthn unless this is really early on in QAST -> MAST
22:36 diakopter last gc seq was 12
22:36 * diakopter turns on gc orch
22:36 jnthn I wonder if it's a write barrier failure
22:36 diakopter debugging
22:36 jnthn That is
22:37 jnthn @!candidates is computed and stashed in a gen2 object
22:37 diakopter yeah
22:37 jnthn uh, $!dispatch_order is the attr
22:37 jnthn @candidates is pulled from it
22:37 diakopter wut.
22:38 diakopter wait... (./NQPCOREMoar.setting.moarvm:dispatch:4294967295)
22:39 diakopter that's... a large bytecode
22:39 jnthn That number is often wrong...
22:39 jnthn even in master
22:39 diakopter yeah :(
22:41 diakopter but it uses that number to get the other numbers
22:45 jnthn oh...but dispatch is the right sub name...and the NQP line nubmer makes sense...
22:45 diakopter sort of
22:54 diakopter jnthn: any other thoughts?
22:55 diakopter what might cause the write barrier not to be updated
22:55 jnthn Not really...only that the code object is certainly going to be in gen2 as it is deserialized
22:57 jnthn MVM_gc_gen2_allocate_zeroed is correctly seeing the MVM_CF_SECOND_GEN flag
22:57 jnthn So that looks right...
22:57 diakopter jnthn: splice is missing write barriers
22:58 jnthn That'd be an issue...though I dunno if it's this issue
22:58 diakopter also, how does the wb list know about moved memory like tht
22:59 diakopter couldn't splice cause some pointers to become located in invalid memory
22:59 jnthn It stores objects that point to nursery things
22:59 jnthn Not interior pointers inside that object
22:59 diakopter oh yeah
23:00 diakopter set_size_internal doesn't have wbs either
23:00 diakopter (for its memmove)
23:00 jnthn Doesn't need them, same reason.
23:01 diakopter ?
23:01 jnthn It's only when a gen2 comes to point to an additional nursery
23:01 jnthn memmove doesn't change the set of objects that the array references.
23:01 diakopter hm
23:02 lizmat joined #moarvm
23:02 diakopter well, copy_to doesn't have them, and I know it needs them :P
23:02 jnthn yes, it does :)
23:03 diakopter .todo moarvm/moarvm add write barriers to MVMArray.c splice and copy_to
23:27 jnthn happy debugging...night o/
23:28 diakopter o/
23:41 ssutch left #moarvm

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