Parrot 1.0 Released | parrot.org | 380 RTs left!
Set by moderator on 28 March 2009.
Infinoid Thanks, I'll ignore copyright.t and c_function_docs.t for now 00:00
hmm, I'm getting lots of segfaults from t/pmc/nci.t on x86-64 (no jit) 00:06
00:09 AndyA joined
nopaste "Infinoid" at 75.5.243.250 pasted "r37969 t/pmc/nci.t failures on x86-64 (backtrace at the bottom)" (382 lines) at nopaste.snit.ch/16189 00:09
cotto Infinoid, I see them too when I configure with --jitcapable=0 00:10
Infinoid++
Infinoid any idea what broke?
cotto lemme dig 00:11
Infinoid cotto++
dalek rrot: r37970 | pmichaud++ | trunk/compilers/pct/src (2 files):
[pct]: Add HLL source line bytecode annotations to PCT.
00:12
Tene pmichaud: should parrot also report HLL source line number on uncaught exceptions?
cotto It sure looks easier to debug than the jit backtraces 00:13
pmichaud Tene: I think HLLCompiler will probably do that, rather than Parrot. 00:14
But sure, if Parrot wants to do it -- that'd be cool too.
Tene 'kay
pmichaud but at the moment I don't remember how to get the annotation information :-)
chromatic If the annotation is there, why not?
pmichaud I think it would be really awesome if parrot could do it by default :) 00:15
dukeleto cotto: ping
pmichaud looks like it's an 'annotations' method on Exception objects 00:16
cotto dukeleto, pong 00:17
pmichaud and the annotations opcode otherwise
cotto dukeleto, I'd like to mentor the person who proposed the decnumber integration GSoC project. 00:18
I sent you an email to that effect.
dalek kudo: a2728b4 | pmichaud++ | build/Makefile.in:
Refactor Makefile testing again -- previous method caused too much rebuild.
00:23
shorten dalek's url is at xrl.us/ben8e3
Tene argh, been too long since I've worked with PMCs from C. 00:24
Infinoid Is anyone here in touch with Tod McQuillin (nickname "devin")? 00:26
Tene VTABLE_annotations doesn't work...
Infinoid He runs the shorten bot, and I haven't managed to get a response from him in email or irc.
pmichaud I think it's a normal method, not a vtable function.
Tene I don't remember how to call PMC methods from C. 00:28
pmichaud me either... looking.
Tene That's what I'm trying to recall. :)
pmichaud PCCINVOKE 00:29
PCCINVOKE(INTERP, obj, "methodname"), perhaps?
00:29 bacek_ joined
pmichaud see examples in src/pmc/complex.pmc 00:29
also in codestring.pmc 00:30
Infinoid bacek_: Would you be opposed to making get_string() and set_string_native() the real functions, and pack()/unpack() wrappers around those? Calling a vtable is a hell of a lot more efficient than calling a method, so I'd rather the basic ops not pay the PCCINVOKE penalty. 00:33
(that's in regards to r37965) 00:34
Tene no, PCCINVOKE doesn't work... 00:35
chromatic I thought the same thing when I read that commit.
bacek_ good morning again.
dukeleto mornin' 00:36
bacek_ Infinoid: no problems.
Infinoid Thanks!
bacek_ just arrived at $work...
00:37 kid51 joined 00:38 TiMBuS joined
dalek rrot: r37971 | allison++ | branches/pcc_rewiring/src/call/pcc.c:
[pcc] Initialize the index into the list of positional arguments. After

argument, break to the next parameter.
00:38
00:39 rhr joined
Whiteknight Tene: What method are you trying to call from where 00:41
?
Tene Whiteknight: the 'annotations' method on an Exception pmc from src/exceptions.c 00:42
Whiteknight Parrot_PCCINVOKE(interp, obj, "annotations", "->P", &result) 00:44
or Parrot_PCCINVOKE(interp, obj, "annotations", "S->P", name, &result)
Tene that segfaults. 00:45
Whiteknight send me the patch? 00:46
Tene Lemme make sure I'm not doing somethind stupid first. :)
Whiteknight great, give me a clean slate to do something stupid myself :) 00:47
nopaste "tene" at 97.117.63.134 pasted "diff for WhiteKnight++" (22 lines) at nopaste.snit.ch/16190 00:52
"tene" at 97.117.63.134 pasted "example pir to test for WhiteKnight++" (12 lines) at nopaste.snit.ch/16191 00:53
"tene" at 97.117.63.134 pasted "backtrace for WhiteKnight++" (24 lines) at nopaste.snit.ch/16192 00:54
cotto Infinoid, I'll look at the new, improved NCI segfault later tonight. 00:55
Infinoid Thanks!
cotto It's too bad make fulltest doesn't catch that on a jitcapable build.
Infinoid That does seem a bit unexpected 00:56
00:57 acajou joined
Tene Whiteknight: I'm driving home... back online in a bit. 01:03
Whiteknight okay 01:04
01:08 Theory joined 01:11 rhr joined
nopaste "Whiteknight" at 69.249.200.13 pasted "Solution for Tene++" (27 lines) at nopaste.snit.ch/16193 01:19
dalek rrot: r37972 | allison++ | branches/pcc_rewiring/src/call/pcc.c:
[pcc] Allow return values to be constants too.
01:37
Whiteknight allison: ping 01:41
allison Whiteknight: pong 01:42
Infinoid Does ManagedStruct.clone() even work? I see a memmove() to copy the data pointed to by SELF.ptr, but I don't see where the new buffer is actually allocated.
Whiteknight allison: need any help on the pcc stuff? I've got tuits finally, just looking for a place to get involved 01:43
allison Whiteknight: it's not really parallelizable at the moment
Whiteknight Infinoid: I don't think I've ever seen it used or tested anywhere 01:44
Infinoid Well, my version's gonna work, dang it.
Whiteknight allison: that's fine. just let me know when you need an extra set of hands
Tene I don't know as much C as I should... I don't quite get the const stuff. 01:48
Whiteknight: why are there two consts in those declarations?
Whiteknight because it's a constant pointer, pointing to a constant structure 01:49
Tene Thanks. :) 01:50
Whiteknight no problem, it's a small bit of C esoterica that provides a small optimization sometimes
Tene, does that do what you want? I wasn't sure if the output was all correct 01:53
Tene Whiteknight: yes, that's exactly right.
Whiteknight okay, Tene++
02:03 acajou left
Infinoid Parrot_jit_build_call_func() writes a bunch of code to a buffer and *then* checks whether it overran the buffer. I love that kinda code 02:03
dalek rrot: r37973 | allison++ | branches/pcc_rewiring/src/gc/register.c:
[pcc] Defaults for call signature stored in context.
02:40
02:48 janus joined
dalek rrot: r37974 | allison++ | branches/pcc_rewiring/src/ops/core.ops:
[pcc] Removing unused variable.
02:56
Tene jonathan: ping
purl: msg jonathan There's a problem with annotations for source lines... if I call 'die' in p6, it looks for the annotations set in control.pir, and finds none. 02:59
purl Message for jonathan stored.
nopaste "tene" at 166.70.38.237 pasted "example of annotations not working for jonathan++" (10 lines) at nopaste.snit.ch/16194 03:00
"tene" at 166.70.38.237 pasted "patch to report the source line of uncaught exceptions for jonathan++" (58 lines) at nopaste.snit.ch/16195
Tene purl: msg jonathan Perhaps Exception.pmc's annotations method should climb the contexts of the resume continuation if it doesn't find the asked-for annotation? 03:04
purl Message for jonathan stored.
03:12 Andy joined 03:23 eternaleye joined
dalek rrot: r37975 | allison++ | branches/pcc_rewiring/src/embed.c:
[pcc] The 'main' sub needs to be invoked using the new conventions.
03:52
rrot: r37976 | allison++ | branches/pcc_rewiring/src/call/pcc.c:
[pcc] Graceful handling for too many return arguments.
04:05 tetragon joined 04:09 Tene joined
cotto Infinoid, it looks like ManagedStruct's clone is called 63 times during make cover. 04:21
but I don't see where the memory is allocated either 04:22
cotto loves having make cover work again 04:24
04:35 flh joined
Infinoid hrm. well, I've got a patch that adds a custom clone handler (which, in this case, does mmap to get an executable buffer for jit). If something else is allocating memory behind the scenes, it probably leaks like a sieve 04:36
04:48 masak joined 04:50 eternaleye joined 04:59 Theory joined 05:14 eternaleye joined 05:26 chromatic joined
dalek kudo: 241ae0d | (Stephen Weeks)++ | src/builtins/control.pir:
[die]: Set exception severity and type in die()
05:30
shorten dalek's url is at xrl.us/ben88m
05:39 Fayland_logger joined 06:05 clunker3 joined 06:09 japhb joined 06:13 dukeleto joined 06:23 eternaleye joined 06:47 masak joined 06:52 iblechbot joined 07:06 Doubi joined, japhb joined 07:46 eternaleye_ joined 08:06 riffraff joined 08:20 mikehh_ joined
dalek rrot: r37977 | fperrad++ | trunk/docs/book (2 files):
[book] fix POD format
08:53
09:05 cghene joined
bacek good evening. 10:32
bacek wonders is String.pmc doing "wrong things" in destroy? 11:13
11:28 masak joined 11:56 ruoso joined 12:05 Tene_ joined
bacek Bah. PackFile_unpack/PackFile_pack combo leads to "weird results"... 12:12
It produces at least wrong header. And may be anything else... 12:14
12:24 davidfetter joined
dalek rrot: r37978 | bacek++ | branches/packfile_revamp/src/pmc/packfile.pmc:
Switch Packfile.pmc to use attributes.

own this string.
12:24
12:24 iblechbot joined
dalek rrot: r37979 | bacek++ | branches/packfile_revamp/t/pmc/packfile.t:
Add test (disabled ATM) for set_string/get_string unpack/pack synonyms.
12:29
12:37 rg1 joined 12:40 Whiteknight joined
Whiteknight cotto: ping 12:41
Infinoid what's the status of jit on win32? 12:49
12:53 schinkelm joined
nopaste "pmichaud" at 72.181.176.220 pasted "exception backtrace fail, for jonathan++" (28 lines) at nopaste.snit.ch/16198 12:55
dalek kudo: c76c692 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 349 files, 8444 passing, 0 failing
12:58
shorten dalek's url is at xrl.us/ben9wt
bacek Infinoid: I hit... erm... "roadblock". See TT#545. I'll try to do something with it. But currently PBC are very unreliable. 13:02
afk # zzzz.... 13:03
Infinoid Will do, sleep well 13:09
13:10 gryphon joined 13:11 slavorg joined 13:28 rdice joined 13:35 amoc joined
PerlJam reads yesterday's #ps 13:38
13:51 uniejo joined 14:06 uniejo joined 14:19 iblechbot joined 15:03 jan joined 15:12 uniejo joined 15:18 Tene joined
dalek kudo: 7a22e0d | (Moritz Lenz)++ | t/spectest.data:
we pass the new S06-signature/types.t
15:20
shorten dalek's url is at xrl.us/beoaf4
15:49 uniejo joined 15:52 Khisanth joined 15:55 Psyche^ joined 16:01 flh joined 16:04 shucho_ joined 16:07 Theory joined 16:46 Tene joined 16:51 acajou joined 17:15 davidfetter joined
dalek rrot: r37980 | jonathan++ | trunk/src/pmc/sub.pmc:
[core] Parrot Subs that get their arity inspected cache the information. However, when we cloned, we ended up with two subs sharing that cache. This could lead to double frees, or (in the case that led to me discovering this bug) a sub reporting an arity of over sixty thousand.
17:17
acajou FWIW, Rakudo is failing tests today for me... 17:18
(spectests)
perl.pastebin.com/d7a9f5e8 17:20
dalek kudo: 582e78c | (Moritz Lenz)++ | src/builtins/any-list.pir:
.join now defaults to empty separator
17:21
shorten dalek's url is at xrl.us/beoavn
moritz acajou: thanks. It looks like an update of your local rakudo could fix that 17:24
17:26 darbelo joined
acajou git fetches and recompiles again... 17:27
dalek kudo: 776152d | jnthn++ | src/classes/Signature.pir:
!add_implicit_self on a Signature should be able to take a type, which will become the invocant's type in the signature.
17:32
shorten dalek's url is at xrl.us/beoaw2
dalek kudo: ccc12b3 | jnthn++ | src/builtins/guts.pir:
Make !EXPORT able to handle converting multis to Perl6MultiSub as it exports them, to save sprinking calls to !TOPERL6MULTISUB all over the code base and to make sure we export the multi in its Perl 6 dispatch algorithm form.
shorten dalek's url is at xrl.us/beoaw4
dalek kudo: 0fa3809 | jnthn++ | src/classes/ (2 files):
Give methods on Array a Perl 6 signature and get the transformed into Perl6MultiSub, which is not only more correct but also resolves the issues with method calls on typed arrays. Note that we also bump the required Parrot version number, since I found and fixed a Parrot bug along the way.
shorten dalek's url is at xrl.us/beoaw6
dalek kudo: d43f016 | jnthn++ | build/PARROT_REVISION:
Oops, forgot to commit updated Parrot rev.
shorten dalek's url is at xrl.us/beoaw8
dalek kudo: d019aff | jnthn++ | :
Merge branch 'master' of git@github.com:rakudo/rakudo
shorten dalek's url is at xrl.us/beoaxa
17:40 flh joined
dalek kudo: 8a2b924 | (Moritz Lenz)++ | t/spectest.data:
we now pass S09-typed-arrays/arrays.t
17:43
shorten dalek's url is at xrl.us/beoaym
acajou Hmmm, maybe I should wait a little... 17:44
Looks like by the time make spectest runs the binary is out of date! 17:45
moritz indeed ;-)
acajou My latest try got worse, not better.
moritz acajou: what operating system do you use? 17:46
acajou Kubuntu 8.04.2
gcc 4.2.4
moritz reasonably similar to mine to not expect any big differences
acajou Maybe I got the tree at an odd moment... 17:48
perl.pastebin.com/d67833d75
moritz acajou: ah, that's because TimToady changed the specs for @array.join, and my updated to rakudo came only 30min later :-) 17:49
acajou :) 17:50
Is there a time of day where things are generally more quiet when it might be more useful for the peanut gallery to try a spectest? 17:51
acajou is in EDT. 17:52
Infinoid try 11pm or midnight your time, that's usually pretty quiet here
moritz acajou: 6 o'clock GMT might be good ;-)
acajou nods. 17:53
Thanks.
17:55 acajou left 17:58 cognominal_ joined 18:51 barney joined 18:57 LylePerl joined
LylePerl Hello 18:57
Infinoid hi! 18:59
LylePerl Infinoid: hi 19:00
purl que tal, LylePerl.
LylePerl I've started working with Rakudo recently with the aim to get it running with IIS/Vista 19:01
Infinoid Cool.
LylePerl I've got Rakudo running, working with Apache, got november working with apache
but can't get rakudo working with IIS 19:02
Infinoid Ok, how can I help?
LylePerl I've tried a load of different things. It appears IIS has a problem with parrot (or maybe the other way round)?
Infinoid What's the problem?
purl SIR NO PROBLEM SIR!
LylePerl I've just tried a basic PIR script hello world with content type, and it doesn't work either 19:03
Error is:-
This application has requested the Runtime to terminate it in an unusual way. 19:04
src\\io\\api.c:455: failed assertion 'pmc'
Infinoid Is this with the latest svn version of parrot?
So far it sounds like parrot needs a little more environmental stuff set up... probably the "stdout" io descriptor 19:05
LylePerl It's the one that comes with rakudo parrot -V gives 1.0.0-devel 19:06
Infinoid rakudo binary or built from git?
LylePerl from git
Infinoid Ok, rakudo will probably have just done a "svn co" or "svn export" or whatever to get a copy of the parrot sources
So that means you should be pretty much up to date 19:07
LylePerl I can check if you want?
Infinoid It's ok, I just wanted to check so I can follow along here
I imagine you've written some kind of iis plugin which links to libparrot and uses the embedders' API to call into it? 19:08
(I know nothing about iis)
LylePerl No, just calling through cgi
the same way IIS gets setup with perl.exe 19:09
Infinoid Oh, ok. What's the pir script? Can you paste it into nopaste.snit.ch (it will show up here)?
LylePerl I've set it the same way with pugs and pugs works
nopaste "LylePerl" at 78.86.207.240 pasted "cgi pir hello world" (4 lines) at nopaste.snit.ch/16204 19:10
Infinoid Simple enough. :) 19:11
Does it work when you "cd" into the parrot build directory and run "parrot.exe test.pir"?
LylePerl yes, works fine on cmd
Infinoid Ok. Does your CGI wrapper chdir into that directory before invoking parrot? 19:12
LylePerl Hmmm... I'm pretty sure IIS doesn't do that. 19:13
In Perl 5 I have to use findbin and chdir at the top of scripts
In the Rakudo test code I had it open a file and write to it at the start and end of the script. The file was written to, so the script is being ran. Just IIS doesn't seem to get the output?? 19:15
Infinoid I can run parrot just fine from outside the tree, on linux. Maybe we're building something in a different way on win32, or maybe I'm barking up the wrong tree
Ah, does IIS try to read from a special tmpfile or somesuch?
LylePerl Not that I'm aware of. I'm pretty sure it's invoked as parrot.exe \\full\\path\\to\\file.pir 19:16
Infinoid Well, hmm. "parrot-dev/test/parrot parrot-dev/test.pir" works just fine here
That kind of full-path syntax works in cmd too? 19:17
LylePerl Actually I'm sure it is as I did a request trace
yes it works in cmd
Infinoid If you can run it from somewhere else using absolute paths to parrot and to the pir file, it must be something else environmental that's different when it's run under iis
Does iis run it as a different user? Could some differing environment variables be getting in the way? 19:18
LylePerl That's what I'm thinking
purl Oooh he is soooo fine!!!
Infinoid Thanks for that, purl.
LylePerl I'm thinking either IIS invokes it in a certain way, or expects it to return data and close in a certain way 19:19
this might help, I posted some details on their forum
forums.iis.net/p/1156635/1899524.aspx
Infinoid by "return data", if you mean "print to stdout", your test.pir script should definitely do that
hah! 19:21
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "".
LylePerl I know. But the error from my rakudo test script was a bit different for a simple script, it showed nothing be returned
Infinoid That's just beautiful.
LylePerl but the script is returning headers
Infinoid Yeah, it says it's missing something but apparently can't tell you what
LylePerl I know the trace was pretty worthless 19:22
:(
Infinoid Hmm. Do we do any \\r translation on win32?
This is just a guess, but maybe try skipping the \\r's and just doing \\n\\n after the headers.
LylePerl ok, one sec
Infinoid If IIS was actually receiving \\r\\r\\n\\r\\r\\n, that might cause some confusion 19:23
LylePerl nope, same error :(
Infinoid Bummer.
LylePerl With Rakudo I tried something a bit more detailed I'll paste it 19:24
Infinoid Do you have a similar trace for the just-running-parrot-directly case?
Ok, thanks
nopaste "LylePerl" at 78.86.207.240 pasted "cgi p6 hello world" (7 lines) at nopaste.snit.ch/16205 19:25
LylePerl I'll do one now
Infinoid You'll have a blank line at the top of your content, but that script looks fine to me otherwise 19:27
dalek kudo: 6b97553 | pmichaud++ | :
Merge branch 'master' of git@github.com:rakudo/rakudo
19:29
shorten dalek's url is at xrl.us/beobfx
nopaste "LylePerl" at 78.86.207.240 pasted "pir iis trace" (18 lines) at nopaste.snit.ch/16206 19:30
LylePerl pretty much the same as the rakudo one 19:31
Infinoid Ok. Normally IIS expects CGI stuff to write to stdout, just like every other server on the planet, right?
LylePerl yes 19:32
Infinoid Is this compiled with msvc or with mingw?
LylePerl for some reason it also picks up stuff from stderr and treats it like it came from stdout
Infinoid or cygwin, or what
LylePerl mingw
Infinoid Ok. Do you have any way of knowing whether the script is even running? 19:33
Oh, right, you mentioned writing something to a secondary file
LylePerl yes that's right
the script actually ran fine to the end
I redirected STDERR
Infinoid well, that rules out a lot of problems 19:34
LylePerl I'm emailed Jan from ActiveState about this as I know he has probable done the most Perl/IIS stuff, but he is away for a few days
Infinoid The equivalent script works fine with perl5 (or heaven forbid, a batch file), right? 19:35
LylePerl Works with perl 5
never tried a batch file, lol :) 19:36
Infinoid I have. It's not a very good way to pick up chicks.
Ok, so if the I/O is the same, it must be something else
LylePerl Do you think it's worth waiting for Jan to get back? He might have all the answers? 19:37
Infinoid Nah, I don't think this is a perl issue
moritz maybe parrot does something unusal, like closing STDOUT and reopening?
Infinoid Could be. Or just not flushing stdout properly
Or leaving a thread running for a moment after the main one exits
Or something weird like that, I dunno 19:38
LylePerl those sound good
Infinoid I'm concerned about this, though: [12:04] < LylePerl> src\\io\\api.c:455: failed assertion 'pmc'
That looks like an altogether different issue
LylePerl Is there a way of tracing what parrot is doing?
After all the script is being called
Infinoid Yeah, pass it the "-t1" argument
LylePerl where will the trace output go? 19:39
Infinoid stderr, I think.
LylePerl ok, last question
purl it has been said that last question is how to use template by itself from plugin :)
Infinoid Do you get that failed assertion often? If so, I'm amazed that IIS is reporting a successful execution, that causes SIGABRT on the unix side of the pond 19:40
LylePerl I only just realized purl is a bot
Infinoid purl, forget last question
purl Infinoid: I forgot last question
LylePerl I really don't know any parrot code. Any chance of a snippet updating that hello world script but directing STDERR to a file at the start? 19:41
Sorry to ask, I feel dirty :(
Infinoid No problem, let me see
pir is basically assembly code, I only learn bits and pieces of it on an as-needed basis, so don't worry 19:42
If you can open a normal file, you can use the "setstderr" op to assign it to stderr 19:43
there's some more details in docs/ops/io.pod if you need 19:44
LylePerl thanks 19:45
19:45 cognominal_ joined
Infinoid it's also entirely possible that your script isn't running at all (or crashing due to that assertion failure) and thus isn't outputting anything, and some return value snafu is preventing iis from detecting the error 19:45
If Parrot_confess() isn't returning an error value on mingw, we should probably fix that 19:46
LylePerl sorry you lost me a bit there :/ 19:48
Infinoid I'll provide some background. 19:49
We have a framework intended to keep all of us coders honest, by crashing horribly whenever we pass a NULL pointer to a function that wasn't expecting one
That error you mentioned earlier, "src\\io\\api.c:455: failed assertion 'pmc'", means you've hit that
LylePerl i see
Infinoid When that crashes, it calls a C function, called "Parrot_confess", to emit that message and crash as violently as possible
And yet IIS is reporting a successful execution 19:50
LylePerl that's could be iis though
Infinoid I suspect it isn't crashing violently enough on mingw
LylePerl is there something I can do to check?
Infinoid Hopefully the tracing will give us more info 19:51
LylePerl I've got to grab some food and spend a little time with the missus. I'll try out some more things and get back with what I find. 19:53
Thanks very much for your help on this
Infinoid No problem, hope we can sort this out next time
20:13 schinkelm joined 20:17 Andy joined 20:24 donaldh joined 21:12 Whiteknight joined 21:43 donaldh left
LylePerl This is nagging at me so I've found a bit more time for it tonight 21:51
nopaste "LylePerl" at 78.86.207.240 pasted "pir iis tests" (65 lines) at nopaste.snit.ch/16207 22:06
LylePerl That's the different things I've tried since we spoke and the results I got
I'm open to suggestions as to new things to try 22:07
rg this looks a lot like the cgi is not getting any stderr handle. 22:20
rg has no idea about windows, though, but this again confirms all my prejudices against it ;P 22:22
LylePerl IIS is a total pain :/
rg i guess suggesting to at least use apace is not an option ;) 22:23
*apache
LylePerl IIS has always been weird with cgi such as things printed to STDERR randomly appear on STDOUT instead. Also not in the order you print them to STDOUT and STDERR
I've already got apache working :) 22:24
But parrot is going to need to be able to work with IIS 22:25
I'm kinda surprised to find this problem in v1 :/
My fault I should have been along to test it sooner... 22:26
moritz ;-)
1.0 is also just a version number
purl okay, moritz.
rg well you could change your perl wrapper to open stderr to a file before calling parrot. maybe that will give you a new clue. 22:28
Infinoid LylePerl: try putting some 'printerr "got here 1"' in your pir script to make sure parrot keeps running the whole way through 22:31
those lines will show up in your test.txt
if it doesn't crash (which is what I think is happening)
unfortunately, the "setstderr" opcode only changes what the PIO layer thinks is stderr; it won't affect stuff in parrot which uses stdio directly (which includes Parrot_confess) 22:33
The next step is to figure out why _PIO_STDOUT(interp) (in the print(STR) op) is NULL when running under IIS 22:37
LylePerl trying now
rg infinoid: i don't think the -t version is getting that far. Parrot_io_is_tty is called before the first op is executed. 22:41
nopaste "LylePerl" at 78.86.207.240 pasted "pir iis test file" (14 lines) at nopaste.snit.ch/16208 22:42
22:42 bacek joined
LylePerl rg: ahhh, that explains that then 22:42
this code behaves as you would expect on the cmd 22:43
but through IIS the file is wiped but nothing is written to it
Infinoid so it crashed on the first print
LylePerl guess so
is this an IO issue then? 22:44
rg hmm the open actually runs?
Infinoid ... somehow.
LylePerl yep the open runs, opening the file for w which wipes it
rg strange
LylePerl I guess it could crash at the end of the open
rg i guess there's no such thing as a core file on windows?
nor a debugger :P
Infinoid he's running mingw, he can try to get gdb up and running 22:45
but attaching it to a script running under iis will be an additional challenge...
rg that script will probably only run for a fraction of a second
you'd need a core dump to debug.
Infinoid well, you can put a sleep(10) in there I guess, but ... does win32 even have pids? 22:46
LylePerl I've been looking for something I used about 4 years ago, which did a very useful debugging trace thing, but I can't for the life of me remember what it was called :(
Can't seem to find it on google either, been looking for 2 days now
rg goes back to hacking html on unix for $job. at least that's unix ;)
LylePerl pretty sure it has pids
Infinoid hah, thanks rg
Infinoid is reading through the Parrot IO init stuff 22:48
LylePerl I've posted to a windows programming forum to try and find that software I'm looking for
Infinoid ok. if you're feeling brave, there is a gdb build for mingw 22:50
LylePerl ummm... what's that? 22:51
purl That's the money you could be saving with Geico.
Infinoid gdb is the command line debugger from the gnu project (common on unix platforms) 22:52
LylePerl your bot is crazy :)
How can we use that through IIS?
Infinoid the only way I can think is, to put a "sleep 30" at the very top of the pir file, go find parrot in the windows task list, and then run "gdb parrot.exe <processid>" and hope that actually works on win32 22:53
I'm working on testing that right now.
LylePerl that's if a sleep doesn't make it crash, :) 22:55
Infinoid that would be an interesting bug, indeed
LylePerl It's pretty late here now 12pm
how long do you think this'll take? 22:56
sorry, 12am
Infinoid hmm, probably half an hour or so
We still don't really know what the problem is.
LylePerl ok, I'll give it a go
Infinoid We can resume this tomorrow, if you prefer.
I'm building with strawberry perl, here, and the version of mingw bundled with that 22:58
I've just downloaded sourceforge.net/project/showfiles.p..._id=594520 and unpacked it to a tmpdir, and copied bin/gdb.exe and bin/gdbserver.exe to my c:\\strawberry\\c\\bin\\ 22:59
shorten Infinoid's url is at xrl.us/beocaa
LylePerl I've downloaded gdb
22:59 Tene joined
Infinoid oh, nice, my process list doesn't include pids. 23:00
hmm
rg infinoid: there's a menu in the process manager where you can select the displayed columns 23:02
Infinoid yeah, found it. next problem: no debugging symbols on mingw 23:04
oh good 23:05
ok, LylePerl, you want to put a "sleep 30" at the top of your pir sub
LylePerl done that
Infinoid then pull up your task manager, processes tab, select "Select Columns..." from the View menu and enable process ids if they aren't already
LylePerl done that 23:06
Infinoid sort by image name, start the page loading, find parrot's process id
run "gdb parrot.exe <process id>" from the parrot directory
it will attach to the process
"break Parrot_io_putps" will add a breakpoint just before the crash
then "cont" until it gets out of the windows system nonsense (this took a couple of tries for me)
then when it hits the breakpoint, it will look like: Breakpoint 1, Parrot_io_putps (interp=0x3a26d8, pmc=NULL, s=0x61b7c8) 23:07
then at the (gdb) prompt, run "bt" and nopaste us the results
I'm fairly sure pmc will be null and it'll be called from Parrot_say_sc or another similar op... but we'll want to poke around a little bit in the interp object 23:08
LylePerl pmc= isn't null 23:12
Infinoid that means it won't crash this time around. "cont"
LylePerl pmc=0x0?
Infinoid that works
LylePerl so bt
Infinoid Yes, please
sorry, I use NULL and 0 interchangeably, so when you said it wasn't null, I figured it had a non-zero value 23:13
so, just to verify, "print interp->piodata->table[1]" should also return null 23:14
LylePerl it didn't at first, had 0x32...
Infinoid or (PMC *) 0x0 or somesuch
nopaste "LylePerl" at 78.86.207.240 pasted "pir iis debug output" (26 lines) at nopaste.snit.ch/16210
23:14 acajou joined
Infinoid ok, looking good so far 23:14
are all the values of the interp->piodata->table[] array NULL? 23:15
0, 1 and 2 should be our Filehandles for stdin, stdout and stderr, respectively
print interp->piodata->table[0]
(fortunately, gdb has command-line editing)
nopaste "LylePerl" at 78.86.207.240 pasted "pir iis debug output" (7 lines) at nopaste.snit.ch/16211 23:17
LylePerl table [2] has a pmc
rg yes, the one from setstderr
LylePerl I see
should I retry without setting that? 23:18
Infinoid nah, I think we know what's happening
LylePerl can you fill me in?
Infinoid the code responsible for allocating that array is in Parrot_io_init(), but that seems to be working fine
The code responsible for filling in the values (which are null) is in Parrot_io_init_win32() 23:19
I just put a watchpoint for table[1] and it's set by src/io/win32.c:148
so, your GetStdHandle(STD_OUTPUT_HANDLE) is returning INVALID_HANDLE_VALUE when run under iis
The million dollar question is why :) 23:20
LylePerl lol
Infinoid googles for the msdn page
Whiteknight Tene: ping 23:21
Tene Whiteknight: pong
Whiteknight Have you committed that exception stuff you were working on yesterday?
Tene Whiteknight: there's a problem with annotations.
Whiteknight what kind of problem?
Tene when I fetch the annotations in effect at the point of an exception thrown from rakudo's die(), it gets the annotations from rakudo's control.pir 23:22
not from where die() was called.
Infinoid LylePerl: are you able to write C code, or do you have a patch command if I send you a diff?
LylePerl I have patch
Tene I could patch exception.pmc's annotations method to search up the chain of contexts looking for a particular named annotation as a workaround.
Whiteknight ah, so it's a lot of work then 23:23
Tene well, that woul dbe a little bit of work
but I'd need confirmation that that's the right fix.
so consulting with jonathan and/or allison
LylePerl Or I can write it in, but it's years since I wrote any C
and I didn't know much in the first place :p
Whiteknight Tene: Ok. let me know if you need anything with it 23:24
nopaste "infinoid" at 75.5.243.250 pasted "debug patch for LylePerl; apply with 'patch -p1 <patch.txt'" (23 lines) at nopaste.snit.ch/16212
Tene Whiteknight: I'm considering adding a find_annotation mathod that does that as a first draft. 23:25
Whiteknight: are you wanting it for anything, or just curious?
Infinoid LylePerl: With that patch, if it fails, it should emit a message (complete with content-type) containing the error number, so we can go and look it up to (hopefully) figure out what's going on.
Whiteknight Tene: I was doing some comment-updating work in exceptions.c, and I didn't want to commit if I was going to interfere with you. But i will now 23:26
Infinoid at the bottom of the nopaste page, there will be a "plain text" option which will get rid of all the html rubbish and then you can save it as a text file from the File menu.
Interestingly, support.microsoft.com/kb/239588 claims GetStdHandle works in cgi stuff running under iis. 23:27
LylePerl I downloaded from git, but through the browser and not git clone 23:29
dalek rrot: r37981 | whiteknight++ | trunk/src/exceptions.c:
update some of the function-level documentation in src/exceptions.c to be more descriptive and accurate
LylePerl I've patched with patch win32.c patch.c
Infinoid ok, then "mingw32-make" to rebuild parrot 23:30
LylePerl ok
Infinoid and then, try your cgi failure again (you don't need a sleep this time)
LylePerl waiting for perl Makefile.PL to finish. Guess I didn't need to do that? 23:31
Infinoid it'll just take longer, that's all.
With any luck, you'll get a "Unable to open stdin handle: err = <somenumber>" response, and that number will be of great use to us figuring this issue out
jonathan Tene: Hi
LylePerl ok, building now...
Tene jonathan: Hi. :)
jonathan Tene: Modifying exception.pmc to walk up the ret-conts chain sounds fine to me.
Plz just add a Parrot test after adding that. :-) 23:32
And probably a note in the POD above it.
But yes, I think it's a good idea.
Infinoid hey jonathan, you wouldn't happen to know anything about the win32 I/O init stuff, would you?
Tene jonathan: I'll try that tonight, then.
jonathan Tene++
Tene purl: karma tene 23:33
jonathan Tene: If you don't get to it tonight, I may do tomorrow.
purl tene has karma of 403
jonathan Infinoid: Not a great deal - is that the source of the IIS problems?
Infinoid Yeah. LylePerl's Parrot_io_init_win32() is failing to get handles for stdin, stdout and stderr, and leaving null pointers in the io handle table which crash later on.
jonathan OK
Infinoid doesn't have a clue why, was wondering if you knew anything about it
thanks tho :)
jonathan We probably want to check they're not coming back null in Parrot_io_init_win32, so debugging this in the future is less of a pain... 23:34
Let me take a peek at what that function is doing...
Infinoid There are some cases where parrot will run without those filehandles being open, which we should handle. I just didn't think this would be one of them. 23:35
jonathan Infinoid: OK, but perhaps then putting a PMCNULL so we don't segv?
Infinoid (though maybe IIS gives us a closed stdin except during POST requests)
Yeah, we should fix the segv either way.
LylePerl Unable to open stdin handle: err = 0x6 23:36
Infinoid Oh, goodie. One moment
jonathan Infinoid: Is it the GetStdHandle that fails?
Infinoid yes
jonathan Or when you later pass the handle to Parrot_io_fdopen_win32?
OK.
Infinoid I'd like it to keep trying for the other handles, even when stdin fails
jonathan Infinoid: One other thing...
purl well, one other thing is to be aware of my own breath.
Infinoid Now that I've thought it through, I bet stdout will work just fine
jonathan ...erm, yes, exactly what you just said. 23:37
I'm suspecting that if there is no POST data, IIS won't open STDIN
And then we never get to try and open STDOUT
LylePerl that sounds good
jonathan Well, easy check is to re-order them and see ;-)
Infinoid yeah, my thoughts exactly
true
LylePerl: can you move the stdin clause so it appears after the other two?
LylePerl on it 23:38
still with your patch or should I remove it?
Infinoid my patch only provides more diagnostics, it won't hurt
...and stderr will still fail silently, because I didn't add prints to that failure path 23:39
rg it might not even fail
Infinoid (ohnoes)
rg just wonders why there is a return value when it's not checked :P 23:40
Infinoid guesses this is a work in progress
LylePerl Wohooooo!!!!
dalek kudo: 2ae3181 | jnthn++ | src/classes/ (2 files):
Get type checking of operations involving arrays working. Along the way, fixed the bug where my @a; @a = 1; then made anything that referenced @a[0] blow up with a Null PMC Exception.
shorten dalek's url is at xrl.us/beocep
LylePerl :) 23:41
Infinoid It did something different this time?
LylePerl it works
Infinoid LylePerl++
karma LylePerl
purl lyleperl has karma of 3
LylePerl the script displays the hello world, then you get another content type from your patch, I'll remove that now
infinoid++ 23:43
jonathan++
rg iis-- :P
LylePerl do we still want return -1;?
Infinoid r37986 will hopefully fix that. 23:44
LylePerl for stdin
dalek kudo: 0a9dd6d | jnthn++ | src/classes/ (2 files):
Get typed hashes working in dispatch and have assignments to them typed-checked. Calling methods on them is still broken; need a few more things to become Perl6MultiSub.
shorten dalek's url is at xrl.us/beoce7
Infinoid No, I have another fix on the way
I don't like returning -1, because among other things, it will prevent the winsock init stuff from running
So for now I'm just setting it to PMCNULL, jonathan++ for suggesting that
It'll probably still try to crash if you access it, but at least stdin won't break stdout any more. 23:45
LylePerl so "return PMCNULL;"
rg actually it should throw an exception ;)
Infinoid actually, I did _PIO_STDOUT[interp] = PMCNULL; and let the function keep running
rg: an exception wouldn't get LylePerl any farther with his stuff
dalek rrot: r37982 | bacek++ | branches/packfile_revamp/t/pmc/packfileconstanttable.t:
Rewrite packfileconstanttable.t in pure PIR.
23:46
LylePerl my next step is to get november to run on iss, and I'm pretty sure that checks STDIN
rg it might if he's able to output a content type first
rrot: r37983 | bacek++ | branches/packfile_revamp/t/pmc/packfileconstanttable.t:
Add tests for PackfileConstantTable.set_*_int
rrot: r37984 | bacek++ | branches/packfile_revamp/src/pmc/packfileconstanttable.pmc:
Implement PackfileConstantTable.set_*_int methods.
rrot: r37985 | bacek++ | branches/packfile_revamp/src/pmc/packfileconstanttable.pmc:
Add PackfileConstantTable.init method which allocates PackFile_ConstTable.

set_*_int methods works on fresh PackfileConstantTable.
Whiteknight I'm getting test failures in t/pmc/nci.t and t/pmc/codestring.t. Anybody else seeing these things
Whiteknight ?
rrot: r37986 | Infinoid++ | trunk/src/io/win32.c:
[win32] Make Parrot_io_init_win32 try to be a little more resistant to closed filehandles. LylePerl++
rrot: r37987 | bacek++ | branches/packfile_revamp (2 files):
Fix PackfileConstantTable.set_pmc_keyed_int.
rrot: r37988 | bacek++ | branches/packfile_revamp/t/pmc/packfileconstanttable.t:
:retab test file
rrot: r37989 | bacek++ | branches/packfile_revamp/t/pmc (2 files):
Simplify tests by proper using Test::More.
Infinoid oh no, someone left the bacekinator on overnight
rg whiteknight: yes: smolder.plusthree.com/app/public_pr...ails/19708 23:47
shorten rg's url is at xrl.us/beocff
Infinoid My patch is busted (though it should still work for LylePerl), another fix on the way
23:48 joubert joined
rg whiteknight: though just nci, not codestring. 23:49
Whiteknight thanks rg. Just making sure I'm not crazy
Infinoid LylePerl: r37990 should fix all your troubles. You can just delete the parrot directory entirely and rakudo should get you a clean checkout and build it for you 23:50
LylePerl Now I can finally start writing the Rakudo cgi script guides for Linux/Apache and Win/Apache||IIS ;) 23:51
Infinoid LylePerl++
Lemme know if it breaks again (I haven't tested this fix at all)
rg rakudo will need to bump parrot_revision to pick that up. 23:52
Infinoid Well, on the plus side, you should be able to do a "getstdin" and check the result with "isnull" to see whether you have POST data to be read
ah, hmm.
does rakudo do an export, or a checkout?
LylePerl Thanks. Your help has been really great. I wouldn't have had a clue about gdb or anything
This has been really insightful
Infinoid gdb requires a lot of patience sometimes, thanks for sticking with it
dalek rrot: r37990 | Infinoid++ | trunk/src/io/win32.c:
[win32] Hey, idiot, set the right value this time.
23:53
LylePerl to think. Sunday I promised myself I could look at Perl 6, but only for an hour
23:53 bacek_ joined
LylePerl 3 days later... :) 23:53
rg can i ask here what are the plans for cpan with perl6 or do i need to go to #perl6? ;) 23:54
Infinoid bacek_: I looked at your bug, but I'm not really sure what's going on. The ticket didn't have any actual details as to why it's broken, whether it crashes, etc
LylePerl I really do need to get back to some £work though. Thanks again, I'm sure I'll be back when I've written some more scripts
Infinoid rg: That's been discussed a few times, but I don't remember the resolution. There may be a synopsis for it
#perl6 probably wouldn't hurt
Thanks again, LylePerl!
LylePerl: You might need to do a little more work to get these fixes into the version of parrot rakudo gives you, as rg++ was saying 23:55
If you bug me about it the next time you're playing with this stuff, I can give you a summary patch you can apply
Or you can just keep using the version you've got, I don't think it will break anything 23:56
Tene rg: There are no plans. There has been a lot of discussion, but none that anybody has any interest in implementing yet. 23:57
Infinoid rg: If you're volunteering... :)
Infinoid is already mirroring cpan(5), and is willing to do the same for 6
LylePerl cpan isn't actually controlled by TPF is it...
Infinoid cpan is run by Jarkko, I don't know who or what is "officially" responsible for it 23:58
rg weill there is something at cpan6.org, but it doesn't seem to be moving very fast
LylePerl Infinoid: If I keep my parrot build separate I should be ok? (unless rakudo has problems with newer versions...) 23:59
Infinoid there are also some google hits for 6pan, which may or may not be the same thing
LylePerl: Yeah. There's a sliding window of compatibility, but if you ever run into trouble, pmichaud or jonathan should be able to tell you which version you need