00:05:50  * travis-cijoined
00:05:50  <travis-ci>[travis-ci] joyent/node#114 (v0.6 - 348d8cd : James Hartig): The build was fixed.
00:05:50  <travis-ci>[travis-ci] Change view : https://github.com/joyent/node/compare/d87f551...348d8cd
00:05:50  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/node/builds/425500
00:05:50  * travis-cipart
00:17:27  <bnoordhuis>ryah: https://github.com/bnoordhuis/node/compare/isolates2...eio_poll <- a belated 'it works'
00:17:40  <bnoordhuis>it's hideous of course
00:18:35  <ryah>bnoordhuis: hey! nice
00:23:08  <ryah>checking it out...
00:23:44  <ryah>there is only a single response queue still
00:23:54  <ryah>when eio_poll is called - it will make all callbacks on that thread
00:24:02  <ryah>or?
00:24:41  <ryah>even ones that belong to other threads
00:24:55  <ryah>somehow etp_poll needs to check uv__loop
00:25:37  <ryah>btw it would be awesome to get a libuv test for this
00:25:58  <ryah>start two threads - issue some fs calls at different times
00:29:35  <bnoordhuis>(just pushed a minor fix)
00:30:20  <bnoordhuis>maybe it's better to catch the eio callbacks in a single thread, then dispatch them to their owning thread
00:30:43  <bnoordhuis>that's possibly a lot of overhead though
00:31:04  <ryah>we have to make the callbacks on the owning thread
00:32:09  <ryah>i think your patch is part of the solution - certainly each eio_req needs to be associated with a loop
00:32:19  <ryah>and notifications need to be based on that loop
00:34:08  <bnoordhuis>i was thinking of an intermediate callback that wakes up the owning thread - so libeio calls intermediate, intermediate queues final callback, intermediate wakes up thread, final callback runs
00:34:44  <bnoordhuis>the queue would be some kind of thread-safe fifo
00:36:37  * bnoordhuisdigs through eio some more
00:37:31  <ryah>bnoordhuis: https://gist.github.com/1499619 <-- sometimes hangs with your patch
00:39:06  <bnoordhuis>asserts for me -> uv_eio_want_poll: Assertion `req->uv__loop != ((void *)0)' failed.
00:39:39  <bnoordhuis>i probably haven't updated all eio_*() call sites yet
00:40:10  <ryah>do we want to share the thread pool?
00:40:19  <ryah>we could try to namespace it and have one per isolate
00:40:33  <ryah>i think i'd rather have it shared
00:40:51  <ryah>we could also just get rid of eio entirely :)
00:41:10  <bnoordhuis>heh, don't give me ideas :)
00:41:25  <rmustacc>If you're going to share it, you'll need to increase the size.
00:41:41  <ryah>it grows on demand
00:41:57  <ryah>we could bump the max number of threads
00:42:01  <rmustacc>Is that new?
00:42:05  <rmustacc>Oh, I meant the max.
00:42:14  <ryah>no
00:42:21  <rmustacc>It's going to be a lot easier to hit the max.
00:42:24  <ryah>yeah
00:42:28  <ryah>i guess :)
00:42:29  <rmustacc>Of course, I'd just say use separate processes.
00:43:57  <bnoordhuis>yeah...
00:47:13  <bnoordhuis>sweet, hit my first threading bug
00:47:14  <bnoordhuis>#3 0x000000000047b681 in uv_eio_want_poll (req=0xf51780) at ../deps/uv/src/unix/uv-eio.c:82
00:47:14  <bnoordhuis>82 assert(req->uv__loop != NULL);
00:47:14  <bnoordhuis>(gdb) p req->uv__loop
00:47:14  <bnoordhuis>$6 = (void *) 0xe87560
00:50:22  <ryah>nice - we lost the json.py dep
00:50:42  <ryah>and the options output looks better even
00:50:48  <ryah><3 open source
00:51:25  <ryah>i should start using python 2.5
01:04:44  * mikealquit (Quit: Leaving.)
01:16:20  * mjr_joined
01:18:50  <mjr_>Hey guys, getting a strange error-less segfault crash recently
01:18:53  <mjr_>Dec 18 14:44:06 prod-06 kernel: [1054313.616909] node[28097]: segfault at 880454e ip 00007f4502f05d30 sp 00007fff278448c8 error 4 in libc-2.11.1.so[7f4502e7f000+17a000]
01:18:53  <mjr_>Dec 19 12:12:42 prod-06 kernel: [1131611.568678] node[1426]: segfault at 738c34e ip 00007f371ac31d30 sp 00007fff39112cf8 error 4 in libc-2.11.1.so[7f371abab000+17a000]
01:18:53  <mjr_>Dec 19 16:56:09 prod-06 kernel: [1148613.731204] node[3493]: segfault at 926516f ip 00007f3cbf86fd30 sp 00007fff635af208 error 4 in libc-2.11.1.so[7f3cbf7e9000+17a000]
01:19:05  <ryah>mjr_: oh joy
01:19:10  <mjr_>Any idea how to figure out what this is, or do we need core files?
01:19:31  * TooTallNatejoined
01:19:53  <mjr_>Like, what is the libc address that's the same every time?
01:20:20  <ryah>hm
01:20:28  <ryah>mjr_: if you nm libc
01:20:37  <ryah>nm libc-2.11.1.so
01:20:41  <ryah>maybe you can find that offset?
01:21:33  <ryah>i think we need a core file though
01:23:48  <mjr_>nm: /lib/libc-2.11.1.so: no symbols
01:23:50  <mjr_>boo
01:24:05  <mjr_>I think there's some other tool for dumping symbols in shared libraries, isn't there?
01:24:09  <mjr_>Anyway, I'll get some cores
01:24:54  <rmustacc>Well, you'll need to get your distros debug symbols.
01:25:02  <pquerna>do you have debuginfo installed?
01:25:04  <rmustacc>They usually have some kind of package so you can see where you are.
01:25:12  <rmustacc>Otherwise a stripped binary is pretty useless for debugging.
01:25:20  * TooTallNatequit (Ping timeout: 240 seconds)
01:25:37  <rmustacc>Or stipped so for that matter.
01:25:58  <mjr_>I'm on ubuntu 10.04, if that matters.
01:26:04  <ryah>the symbols are in tehre - when i run 'strings /lib/libc.so.6' i see all the function
01:26:25  <bnoordhuis>`objdump -T` will print all dynamic symbols
01:26:31  <mjr_>ooo
01:26:48  <ryah>there you go
01:27:04  <bnoordhuis>but (there's always a but) the problem with dynamic symbols is that they're dynamic
01:27:10  <ryah>why doesn't nm work?
01:27:24  <pquerna>apt-get install libc6-dbg
01:27:43  * ryahemerge -i libc6-dbg
01:28:08  <ryah>i dont even remember distro this is or why im using it
01:28:17  <bnoordhuis>i think `nm -D` will work too
01:28:36  <ryah>bnoordhuis: it does
01:29:07  <mjr_>oh yeah, that does work
01:29:22  <mjr_>So how to convert that offset in the kernel message to something from nm -D?
01:29:32  <bnoordhuis>you should take pquerna's advice :)
01:29:38  <mjr_>Sure, did that.
01:30:51  <rmustacc>I always find it easier to work from a core file.
01:31:22  <bnoordhuis>same here, especially if the process is already dead
01:31:33  <mjr_>Does libc6-dbg give you a shared lib with symbols?
01:31:46  <bnoordhuis>if you really, really want to and don't have ASLR enabled, you can map an address to a symbol
01:31:49  <bnoordhuis>but it's a lot of work
01:31:53  <pquerna>/usr/lib/debug/lib32/libc-2.11.1.so
01:31:55  <pquerna>is there now
01:32:07  <pquerna>er
01:32:07  <pquerna>/usr/lib/debug/lib/libc-2.11.1.so
01:32:16  <pquerna>and i believe your symbols/nm should map into that
01:34:10  <mjr_>It is now painfully clear that I don't actually know the details of how shared libraries work on linux.
01:34:35  <mjr_>So I'll enable cores for the future. Right now though, is there any hope of dereferencing that kernel message with the debug libc?
01:35:02  <mjr_>I don't find those strings from the kernel messages in the nm output, but maybe that's a silly thing to look for.
01:35:54  <ryah>what's at offset 17a000 ?
01:35:56  <mjr_>Trying to reconcile the last comments from bnoordhuis and pquerna, they seem to conflict.
01:36:16  <bnoordhuis>mjr_: what does `sysctl kernel.randomize_va_space` say?
01:36:31  <mjr_>kernel.randomize_va_space = 2
01:36:35  <pquerna>well, libc6-dbg just contains the .so of /lib/libc* without the symbols stripped
01:36:47  <pquerna>so the same addresses as the non-debug one
01:36:56  <pquerna>so if you get the right address, you can see what func that is
01:37:19  <bnoordhuis>mjr_: set it to 0, turns off ASLR - else the address will be different for each crash
01:38:52  * mikealjoined
01:38:58  <mjr_>Oh man, I did not know about randomize_va_space.
01:39:20  <mjr_>And here I thought I mostly knew how computers worked.
01:39:21  <ryah>i think he should still be able to find it via the offset
01:40:00  <ryah>the dmesgs show libc loaded at different addresses but crashing at the same offset
01:42:15  <ryah>mjr_: gist nm /usr/lib/debug/lib/libc-2.11.1.so
01:42:18  <mjr_>Yeah, that does seem suspicious
01:42:20  <mjr_>https://gist.github.com/ba32eb824a387c4f448b
01:42:29  <mjr_>actually, that's nm --numeric-sort
01:42:49  * ericktquit (Ping timeout: 248 seconds)
01:42:56  <mjr_>I can send the whole thing, but that's right where 17 a0 00 should be
01:43:35  <ryah>__FRAME_END__ ?
01:44:15  <ryah>*shrug*
01:51:30  <mjr_>yeah, who knows. I'll get cores.
01:54:10  * mikealquit (Quit: Leaving.)
02:07:27  <CIA-111>node: Ryan Dahl master * rb603578 / tools/installer.js :
02:07:27  <CIA-111>node: Fix 'make install'
02:07:27  <CIA-111>node: Broken in 45605c because configure does not spit out proper JavaScript.
02:07:27  <CIA-111>node: Needed to change single quotes to double. - http://git.io/5s5VTg
02:07:50  <ryah>#FML --^
02:18:49  * travis-cijoined
02:18:49  <travis-ci>[travis-ci] joyent/node#115 (master - b603578 : Ryan Dahl): The build is still failing.
02:18:49  <travis-ci>[travis-ci] Change view : https://github.com/joyent/node/compare/aac717d...b603578
02:18:49  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/node/builds/425758
02:18:49  * travis-cipart
02:19:05  * bnoordhuisquit (Ping timeout: 248 seconds)
02:19:12  * mikealjoined
02:20:27  * sh1mmerquit (Read error: Connection reset by peer)
02:20:51  * sh1mmerjoined
02:23:21  * ericktjoined
02:32:33  * pieternjoined
02:36:16  * mikealquit (Quit: Leaving.)
02:44:59  * mikealjoined
02:49:23  * mikealquit (Client Quit)
02:49:55  * mikealjoined
02:56:04  * pieternquit (Quit: pietern)
03:07:59  * ericktquit (Quit: erickt)
03:18:29  * ericktjoined
03:19:37  * erickt_joined
03:19:45  * ericktquit (Read error: Connection reset by peer)
03:19:45  * erickt_changed nick to erickt
03:32:20  * ericktquit (Quit: erickt)
03:58:13  * mikealquit (Quit: Leaving.)
04:29:26  <indutny>oh a lot of hacks this night ;)
04:55:40  * mikealjoined
05:11:06  * mikealquit (Quit: Leaving.)
05:28:08  * AvianFluquit (Quit: Leaving)
05:48:36  * isaacsquit (Quit: isaacs)
06:01:57  * mikealjoined
06:03:30  * mikealquit (Client Quit)
06:27:23  * isaacsjoined
06:29:26  * ericktjoined
06:42:10  * TooTallNatejoined
06:43:10  * paddybyersquit (Quit: paddybyers)
06:45:06  * paddybyersjoined
06:48:07  * ericktquit (Quit: erickt)
06:53:04  * TooTallNatequit (Read error: Connection reset by peer)
07:19:18  * ljacksonquit (Read error: Operation timed out)
07:33:56  * ljacksonjoined
08:13:47  * paddybyersquit (Quit: paddybyers)
08:16:21  * kuebkjoined
08:26:17  * kuebk1joined
08:29:42  * kuebkquit (Ping timeout: 245 seconds)
08:36:49  * kuebkjoined
08:36:49  * kuebk1quit (Read error: Connection reset by peer)
08:41:57  * paddybyersjoined
09:05:19  * paddybyersquit (Quit: paddybyers)
09:10:32  * isaacsquit (Quit: isaacs)
09:48:00  * piscisaureus_joined
10:54:10  <txdv_>Is it okay to use MIT for a language binding of libuv?
10:57:01  * txdv_changed nick to txdv
11:08:35  * paddybyersjoined
11:19:46  <piscisaureus_>txdv: I don't really know if I understand your question
11:40:45  <txdv>I am creating some language bindings for libuv
11:40:52  <txdv>cant I release these under the MIT license
11:41:00  <txdv>does it comply with the license of libuv?
11:46:25  <piscisaureus_>txdv: well libuv is licensed under a pretty liberal license, you can certainly use it
11:46:57  <piscisaureus_>txdv: but I think you cannot just say "everything is MIT" because libuv's license is somewhat complicated
11:48:37  <piscisaureus_>txdv: but if you add a license that says "it's mit and contains libuv which has license XX" then you should be fine
11:50:33  <txdv>I am compiling uv to an so and I am using the ABI
11:50:59  <txdv>guess i can add the note that libuv is licensed under other stuff
11:51:45  <piscisaureus_>txdv: well I think if it is an so you should be fine (I mean, you're using an glibc so but you don't care about GPL either right)
11:51:57  <piscisaureus_>txdv: which language btw?
11:53:36  <txdv>C#
11:53:53  <txdv>https://github.com/txdv/LibuvSharp
11:55:05  <piscisaureus_>ah ok, nice
11:55:35  <piscisaureus_>does c# not have standard libraries that do the same? (I don't know - just wondering.)
11:55:47  <txdv>no
11:56:02  <piscisaureus_>then how do people do tcp with c#?
11:56:12  <txdv>they created thousand of threads
11:56:15  <txdv>and buy expensive servers
11:56:50  <mmalecki>best explanation ever.
11:57:04  <txdv>There is an async API, but it has a ThreadPool
11:57:33  <txdv>And there is the sync API, which sucks if you have a shitload of connections
12:00:18  <txdv>piscisaureus_: what language does have a standard library to do async api? node.js and java
12:00:33  <txdv>but java has no inline/anonymous functions
12:01:08  <piscisaureus_>txdv: yeah I know about java
12:01:53  <piscisaureus_>txdv: I don't fully know .net / c# standard libs but I kind of supposed it would have it too, since it is a java competitor :-)
12:02:42  <mmalecki>btw, https://github.com/noderb/noderb
12:02:53  <mmalecki>this is quite awesome.
12:02:55  <txdv>standard? no. But there is Manos.IO some bindings for libev (obviously doesn't work on windows) and now there will be LibuvSharp
12:03:02  <txdv>hmm nice
12:03:06  <txdv>i like ruby
12:03:12  <mmalecki>yeah, so do I
12:06:10  <txdv>the api of noderb sucks
12:06:19  <mmalecki>just a bit
12:07:30  <piscisaureus_>looks like it could use some work yeah
12:07:55  <txdv>https://github.com/txdv/LibuvSharp/blob/master/Test/UdpTest.cs // this is how it looks like in my bindings for C#
12:09:47  <txdv>the tcp api of noderb should be more 'blockier' (block is like a callback function in ruby)
12:26:57  <piscisaureus_>anyone seen bnoordhuis around?
13:20:02  <indutny>oh, transcompiling is soo interesting
13:20:33  <indutny>ometajs -> AST -> DSL #1 -> AST # 2 -> DSL #2 -> Javascript
13:20:33  <indutny>hehe
14:33:43  * bnoordhuisjoined
14:33:59  <bnoordhuis>piscisaureus_: bertje, jij zocht mij?
14:42:43  <piscisaureus_>bnoordhuis: ik ben er over 5 minuten weer
15:05:34  * ericktjoined
15:15:09  <piscisaureus_>DrPizza: yt?
15:15:20  <DrPizza>hello
15:19:51  <piscisaureus_>DrPizza: can you comment on https://github.com/joyent/node/issues/2318 ?
15:20:35  <DrPizza>isn't there the other command, the one that adds the cmd /c on the javascript side, for this kind of scenario?
15:20:51  <piscisaureus_>DrPizza: we have .exec()
15:20:55  <DrPizza>there's no particularly good or nice way of telling if something is a .exe file
15:21:09  <piscisaureus_>DrPizza: but exec() buffers all the output
15:21:36  <piscisaureus_>DrPizza: also, people kind of expect this to work because on unices you can safely use spawn() with a bash script
15:25:57  <piscisaureus_>One super annoying thing would be that we'd have to apply ^ quoting :-/
15:26:23  <bnoordhuis>how can i initialize a CRITICAL_SECTION statically?
15:26:27  <bnoordhuis>please don't say "you can't"
15:26:29  <DrPizza>bnoordhuis: you can't
15:26:35  <bnoordhuis>:(
15:26:46  <piscisaureus_>yeah that suck heh
15:30:11  <bnoordhuis>so what's a good way to do one-time initialization? the InitOnce*() functions are vista and newer only, it seems
15:30:23  <piscisaureus_>bnoordhuis: uv_once :-)
15:30:29  <piscisaureus_>bnoordhuis: it's already in libuv
15:30:46  <piscisaureus_>bnoordhuis: just not exported atm
15:30:58  <bnoordhuis>right, i've seen it
15:31:26  <piscisaureus_>bnoordhuis: it has a static initializer which is called UV_ONCE_INIT
15:31:50  <bnoordhuis>ah, that's useful
15:31:57  <bnoordhuis>and easy to implement on unices too
15:32:01  <bnoordhuis>think i'll go with that
15:32:18  <piscisaureus_>bnoordhuis: https://github.com/joyent/libuv/blob/master/src/win/internal.h#L347-364 <-- make that publiv
15:32:26  <piscisaureus_>bnoordhuis: and implement on unix
15:33:36  <piscisaureus_>the uv_once_s struct could be a little smarter btw
15:33:55  <bnoordhuis>how so?
15:34:54  <bnoordhuis>oh, because of the alignment requirements?
15:34:57  <piscisaureus_>bnoordhuis: well uv_once_s not takes up 3x the size of a pointer
15:35:00  <piscisaureus_>in practice
15:35:14  <bnoordhuis>meh, i don't care
15:35:25  <piscisaureus_>kk
15:35:27  <bnoordhuis>in practice you'll only use a handful of them in any sane application
15:35:47  <DrPizza>piscisaureus_: anyway; I don't know any good way to even figure out whether something is a PE or not, short of trying to load the file and examining it to see if it's a PE
15:35:55  <DrPizza>and I'm not really comfortable with libuv trying to do that
15:36:22  * isaacsjoined
15:36:49  <piscisaureus_>DrPizza: I think we should just check for .com or .exe
15:36:56  <DrPizza>but that's not right
15:37:04  <piscisaureus_>DrPizza: because?
15:37:12  <DrPizza>well, you can spawn things without an extension too
15:37:32  <piscisaureus_>DrPizza: yeah but running it through cmd doesn't hurt, it's just a little slower :-)
15:38:26  <piscisaureus_>DrPizza: this is what the crt does too btw. (not that the crt is my standard)
15:38:40  <piscisaureus_>DrPizza: we could also just try CreateProcess and only if that fails prefix cmd
15:39:44  <piscisaureus_>ok well it could actually matter if the file is on an unc path because then cmd won't be able to run it but CreateProcess can
15:40:01  <piscisaureus_>fucking edge cases
15:40:24  <DrPizza>I think cmd's rules are even more nuanced aren't they?
15:40:40  <piscisaureus_>like what?
15:40:44  <DrPizza>like it can spawn executables from UNC, but can't 'cd' to a UNC path
15:40:52  <DrPizza>so batch files are a problem
15:41:29  <piscisaureus_>oh god
15:41:35  <piscisaureus_>\\piscisaureus\c$\windows\system32\cmd.exe <-- wfm!
15:44:30  <DrPizza>C:\Users\DrPizza>cd \\awkawk\c$\
15:44:30  <DrPizza>'\\awkawk\c$\'
15:44:30  <DrPizza>CMD does not support UNC paths as current directories.
15:44:32  <DrPizza>kwality.
15:44:51  * piscisaureus_gets pot
15:45:03  <DrPizza>oh, I don't think it's as simple as trying CreateProcess and then failing is it?
15:45:08  <DrPizza>because there's the stupid ordering
15:45:14  <DrPizza>iirc .com comes before .exe
15:45:17  <DrPizza>and .bat maybe before either
15:45:45  <piscisaureus_>DrPizza: yeah but we can just test which files exist right?
15:45:54  <piscisaureus_>and then supply a fully specified path name
15:45:58  <DrPizza>you'd have to test for all of the
15:46:00  <DrPizza>them
15:46:10  <piscisaureus_>yeah we used to do that
15:46:20  <DrPizza>oh right, with the pathext stuff
15:46:24  <piscisaureus_>yeah
15:46:55  <DrPizza>imo if people want cmd's poorly-documented spawning behaviour, they should invoke cmd explicitly
15:47:13  <piscisaureus_>My kingdom for an OS that doesn't have these complications
15:47:21  <piscisaureus_>people don't want this stuff
15:47:26  <piscisaureus_>they want something that just works
15:48:15  <piscisaureus_>the problem is that cmd'ing is actually pretty painful
15:48:36  <piscisaureus_>btw this is not a debate - I just don't know what to do :-/
15:48:41  <piscisaureus_>require('child_process').spawn('cmd', ['/s', '/c', '"C:\\util\\mycmd.bat"'], {
15:48:42  <piscisaureus_> windowsVerbatimArguments: true
15:48:42  <piscisaureus_>});
15:49:00  <DrPizza>piscisaureus_: would a tolerable halfway house be
15:49:03  <DrPizza>instead of making them do that
15:49:05  <DrPizza>have something like
15:49:21  <piscisaureus_>shell: true :-)
15:49:28  <piscisaureus_>{ shell: true }
15:49:28  <DrPizza>spawn('my-batch-file.bat', [], { spawnWithShell: true })
15:49:29  <DrPizza>heh
15:49:30  <DrPizza>yeah
15:50:18  <piscisaureus_>yeah I would like that
15:50:20  <DrPizza>so basically, push exec's logic into spawn(), and make it an option
15:50:38  <piscisaureus_>the current exec / execFile / spawn logic is also pretty misty
15:52:20  <piscisaureus_>DrPizza: there's also more fun, what if people would want to run powershell?
15:52:35  <DrPizza>I don't know what the implications are
15:52:41  <DrPizza>maybe spawnViaCmd then
15:52:45  <DrPizza>so that there's no doubt about which shell it is!
15:57:31  <piscisaureus_>still my kingdom + all my daugthers for an OS that doesn't suck
15:58:32  <piscisaureus_>bnoordhuis: http://groups.google.com/group/nodejs/pendmsg?view=full&sort=date&pending_id=5121385192867397414&ind=0
15:59:24  <bnoordhuis>piscisaureus_: You have to be a manager of this group to view this page. :(
15:59:39  <piscisaureus_>bnoordhuis: are you not?
15:59:51  <bnoordhuis>apparently not
16:02:45  <piscisaureus_>bnoordhuis: try again
16:03:01  * kuebkquit (Quit: Leaving.)
16:03:25  <bnoordhuis>piscisaureus_: you promoted me to admin just to show me that? :)
16:03:41  <piscisaureus_>bnoordhuis: yup
16:04:11  <mmalecki>piscisaureus_: implement one in node.js
16:04:12  * AvianFlujoined
16:04:17  <bnoordhuis>i won't ask if you don't have anything better to do because that's clearly not the case :)
16:04:44  <piscisaureus_>bnoordhuis: I reviewed all the new windows issues and it were only 8 :-)
16:04:46  * AvianFluquit (Remote host closed the connection)
16:05:01  <piscisaureus_>and mostly boring issues
16:05:24  * AvianFlujoined
16:06:45  <bnoordhuis>piscisaureus_: while you're at it, can you op me for nodejs-dev too
16:07:07  <piscisaureus_>bnoordhuis: I don't have karma for nodejs-dev
16:07:22  <bnoordhuis>oh okay, no biggie
16:08:23  <piscisaureus_>bnoordhuis: I can up you for http://groups.google.com/group/libuv but I don't think it's going to do much :-)
16:09:18  <mmalecki>piscisaureus_: I see this list is full of people who care about PHP.
16:23:32  <indutny>.away
16:23:44  <indutny>oops
16:23:46  <indutny>sorry
16:33:00  <bnoordhuis>paddybyers: ping
16:33:13  <paddybyers>bnoordhuis: hi
16:33:23  <bnoordhuis>hey
16:33:36  <bnoordhuis>you've been working on libeio + multiple event loops, right?
16:33:54  <paddybyers>yes; as in that last exchange on libev
16:34:07  <bnoordhuis>what did you end up doing?
16:34:28  <paddybyers>it's in that pull request that I linked
16:34:52  <paddybyers>I'll try to remind myself :)
16:35:28  <bnoordhuis>paddybyers: what PR is that?
16:35:42  <bnoordhuis>https://github.com/joyent/libuv/pull/235 <- this one?
16:36:18  <paddybyers>hang on
16:36:23  * bnoordhuishangs on
16:36:41  <paddybyers>this is the commit: https://github.com/paddybyers/libuv/commit/3ad1de77598e09ed0da19a61cddac7fff137ee02
16:36:47  <paddybyers>I didn't update the PR
16:37:01  * ericktquit (Quit: erickt)
16:37:32  <paddybyers>it's as I said in that email: one res_queue per event loop, but one req_queue (and thread pool) only per process
16:38:41  <paddybyers>so calls to want_poll and done_poll are done on a per-event-loop basis
16:39:00  <bnoordhuis>right
16:39:08  <bnoordhuis>i'm working on something similar
16:39:40  <bnoordhuis>but i was thinking about doing the ev_poll() from a random thread, then signaling the owning thread with ev_async
16:39:42  <bnoordhuis>thoughts?
16:40:10  <paddybyers>that was Marc's suggestion, but I wanted to avoid the extra context switch
16:41:06  <bnoordhuis>does it have a measurable impact?
16:41:11  <bnoordhuis>in the grand scheme of things, i mean
16:41:42  <paddybyers>I don't know and didn't measure it; but I knew that you are all paranoid about performance :)
16:41:50  <bnoordhuis>yeah, we are :)
16:42:11  <bnoordhuis>but in this case, since it's all in the same address space, there won't be any tlb flushes
16:42:17  <paddybyers>I need to go back, but I thought also that there was some eio state I would need access to to do that
16:43:49  <bnoordhuis>i'll tinker with it
16:44:15  <bnoordhuis>less context switches is better obviously but i'd rather not chop up libeio too much
16:44:23  <paddybyers>so your idea is that there's a dedicated thread to read the res_queue, and dispatch it to the relevant loop
16:45:43  <paddybyers>that thread will need to know if that other loop is already processing outstanding responses, if you want to preserve the poll/done behaviour
16:47:27  <paddybyers>from memory I think that was my problem: I couldn't see a way to do that using only the eio API, because i would need to be able to count how many pending responses were in the res_queue for that loop
16:48:19  <paddybyers>BTW how's the isolate stuff going generally? I found out yesterday that Android doesn't support __thread :(
16:53:07  <bnoordhuis>neither does the default gcc on os x, it turns out, so we dropped that :)
16:54:06  <bnoordhuis>re eio: no, not a separate thread (i think), any thread may ev_poll()
16:54:24  <bnoordhuis>a separate thread would be easier to implement though
16:54:26  * AndreasMadsenjoined
16:54:28  <paddybyers>bnoordhuis: ok
16:55:13  <paddybyers>v8 has some fast inline assembler for TLS stuff
16:55:25  <AndreasMadsen>The cluster 2.0 - step 4 pull request is uploaded please checkout and comment on it: https://github.com/joyent/node/pull/2388
16:55:32  <paddybyers>but on Android it falls back to pthread_specific
16:55:50  <bnoordhuis>yeah, we went with stuffing everything into a big struct
16:55:57  <bnoordhuis>not elegant but it works
16:56:46  <paddybyers>that's what I did, using node_extensions.h
16:59:24  <bnoordhuis>maybe we should steal each other's code more
17:05:28  <paddybyers>bnoordhuis: I'll have a look at isolates2 (I guess that's where the new stuff is). Mine's all there and free free to ask.
17:05:45  * felixgejoined
17:05:46  * felixgequit (Changing host)
17:05:46  * felixgejoined
17:06:02  <paddybyers>Whatever happens I've got a monster rebase to do when isolates2 lands, and anything that minimises that is good
17:09:12  * ericktjoined
17:16:30  <CIA-111>node: Bert Belder v0.6 * rf4e34f1 / lib/path.js : Remove unnecessary statement - http://git.io/AgS5cA
17:22:30  * sh1mmerquit (Quit: sh1mmer)
17:24:46  * travis-cijoined
17:24:46  <travis-ci>[travis-ci] joyent/node#116 (v0.6 - f4e34f1 : Bert Belder): The build passed.
17:24:46  <travis-ci>[travis-ci] Change view : https://github.com/joyent/node/compare/348d8cd...f4e34f1
17:24:46  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/node/builds/428496
17:24:46  * travis-cipart
17:39:24  * indexzerojoined
17:39:54  * isaacsquit (Quit: isaacs)
18:02:16  * isaacsjoined
18:09:02  <piscisaureus_>ryah: bnoordhuis: isaacs: I'm back. I don't know if you guys wanna have a call tonight. If so, I'd like to have it at noon / 9
18:09:38  <piscisaureus_>is that okay with you?
18:11:07  <txdv>call of duty
18:12:03  <piscisaureus_>booty call :x
18:20:43  * sh1mmerjoined
18:21:12  * TooTallNatejoined
18:25:38  * brsonjoined
18:29:02  * ericktquit (Quit: erickt)
18:36:47  <ryah>yo
18:37:09  <indutny>нщ
18:37:10  <indutny>yo
18:37:37  <piscisaureus_>ryah: I am not here. call at noon?
18:38:01  * ericktjoined
18:38:14  * brsonquit (Ping timeout: 240 seconds)
18:39:51  <ryah>piscisaureus_: yeah
18:40:02  <ryah>it's just you me and bnoordhuis
18:45:25  * brsonjoined
18:56:27  <TooTallNate>ryah: were you gonna merge that iOS pull request?
18:56:48  <ryah>TooTallNate: link?
18:56:58  <ryah>TooTallNate: we moved the platform stuff to libuv
18:57:00  <ryah>TooTallNate: can you rebase?
18:57:12  <ryah>then i'll merge
18:57:44  <TooTallNate>it's not mine :p
18:57:45  <TooTallNate>one sec
18:58:07  <TooTallNate>ryah: https://github.com/joyent/libuv/pull/243
19:00:31  <ryah>TooTallNate: oops sorry ;)
19:01:43  <AndreasMadsen>ryah: The cluster2 step 4 is uploaded, I would like to wait one or two days, before landing it. I'm hoping people will comment it before it gets merged this time.
19:03:29  <AndreasMadsen>Also it's a big patch so take your time, the other patches won't be that big.
19:09:08  <CIA-111>libuv: Daisuke Murase master * r3cbe7c3 / (AUTHORS src/unix/darwin.c):
19:09:08  <CIA-111>libuv: Fixes for iOS
19:09:08  <CIA-111>libuv: replace AbsoluteToNanoseconds to alternate implementation in uv_hrtime when
19:09:08  <CIA-111>libuv: target OS is iOS which does not have CoreServices.framework
19:09:08  <CIA-111>libuv: Fixes #243 - http://git.io/poYE0A
19:10:41  * travis-cijoined
19:10:42  <travis-ci>[travis-ci] joyent/libuv#11 (master - 3cbe7c3 : Daisuke Murase): The build is still failing.
19:10:42  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/cb70db1...3cbe7c3
19:10:42  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/428993
19:10:42  * travis-cipart
19:12:26  <ryah>AndreasMadsen: link?
19:12:43  <AndreasMadsen>https://github.com/joyent/node/pull/2388
19:14:17  <ryah>Showing 8 changed files with 856 additions and 167 deletions
19:14:18  <ryah>:(
19:14:40  <AndreasMadsen>Is it too big ?
19:16:18  <ryah>large changes are scary
19:16:38  * ryahshakes GYP
19:16:50  <AndreasMadsen>I know but it is very hard to split this up.
19:16:52  <ryah>GYP WHY WONT YOU DO WHAT I WANT
19:17:01  <ryah>AndreasMadsen: that's fine - we'll review
19:17:09  <ryah>AndreasMadsen: you have some changes in there that could be removed
19:17:25  <ryah>like the cpus.length doc change
19:19:11  <AndreasMadsen>I will remove that one, but I will give you some time to point other mistakes out.
19:26:43  <bnoordhuis>ryah: did you perhaps forget to merge uv_thread_self() back into libuv?
19:27:05  <bnoordhuis>it's either that or my `git grep` fu failing me
19:29:04  <ryah>oh yeah
19:29:07  <ryah>i did
19:29:09  <ryah>let me put that in
19:30:35  <bnoordhuis>ryah: oh, i can too
19:30:43  <bnoordhuis>just wanted to know if i hadn't overlooked it
19:33:27  <ryah>one sec - almost done
19:34:44  <CIA-111>libuv: Ryan Dahl master * ra993329 / (4 files in 3 dirs): add uv_thread_self - http://git.io/z6C-Og
19:36:15  * travis-cijoined
19:36:15  <travis-ci>[travis-ci] joyent/libuv#12 (master - a993329 : Ryan Dahl): The build is still failing.
19:36:15  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/3cbe7c3...a993329
19:36:15  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/429123
19:36:15  * travis-cipart
19:37:56  <ryah> SOLINK(target) out/Default/libbinding.dylib
19:37:56  <ryah>Undefined symbols:
19:37:58  <ryah>anger
19:42:43  <bnoordhuis>https://github.com/bnoordhuis/node/compare/isolates2...eio_poll
19:42:56  <bnoordhuis>^ took paddybyers's patch, works great
19:43:52  <ryah>oh yes - this looks good
19:44:07  <paddybyers>cool
19:44:34  <ryah>there's some merge cruft there
19:44:43  <ryah>do you intend to add #if !TARGET_OS_IPHONE ?
19:45:09  <ryah>rebase isolates2
19:45:15  <bnoordhuis>yeah, i will
19:45:31  <bnoordhuis>this is still proof-of-concept mode :)
19:45:44  <ryah>but yeah - this looks quite nice. let me review more deeply once the patch is clean
19:47:51  <AndreasMadsen>ryah: What is the policy about not allowing overwrite, using Object.defineProperty ?
19:48:24  <ryah>*shrug*
19:48:45  <ryah>AndreasMadsen: those things used to be unoptimized in v8 so we would avoid them
19:48:49  <ryah>im not sure what the situation is now
19:49:47  <AndreasMadsen>https://github.com/joyent/node/pull/2388/files#L1R68
19:50:37  <CIA-111>libuv: Ben Noordhuis master * r69ce014 / (5 files in 4 dirs): Wrap platform "thread-safe run once" APIs. - http://git.io/lsef-w
19:50:38  <CIA-111>libuv: Ben Noordhuis master * r6a9cb90 / include/uv-private/ngx-queue.h : Add ngx_queue_foreach() macro. - http://git.io/Re2Lkg
19:50:38  <CIA-111>libuv: Ben Noordhuis master * r10de090 / src/unix/core.c :
19:50:39  <CIA-111>libuv: unix: centralize loop init logic
19:50:39  <CIA-111>libuv: Also fixes a bug where loops other than the main loop didn't pick the kqueue
19:50:39  <CIA-111>libuv: backend, which broke the fs event watcher on Darwin and the BSDs. - http://git.io/KdfNYQ
19:52:14  * travis-cijoined
19:52:14  <travis-ci>[travis-ci] joyent/libuv#13 (master - 10de090 : Ben Noordhuis): The build is still failing.
19:52:14  <travis-ci>[travis-ci] Change view : https://github.com/joyent/libuv/compare/a993329...10de090
19:52:14  <travis-ci>[travis-ci] Build details : http://travis-ci.org/joyent/libuv/builds/429177
19:52:14  * travis-cipart
19:56:40  <AndreasMadsen>ryah: https://github.com/joyent/node/pull/2388/files#L1R68
20:02:35  <piscisaureus_>ryah bnoordhuis: are we going to have the kall now?
20:03:46  <bnoordhuis>yes
20:16:20  * dshaw_joined
20:19:47  <mjr_>Behold, the cores: https://gist.github.com/6823d43a34cf4c6ca8bb
20:20:27  <mjr_>With actual symbols from believable parts of V8.
20:25:39  <ryah>http parser!
20:25:42  <ryah>hm
20:25:48  <ryah>this is definitely from ben's optimization
20:26:06  <ryah>very good to find this
20:26:25  <bnoordhuis>now to reproduce it :)
20:27:09  <ryah>mjr_: can you open the first core and do this
20:27:19  <ryah>frame 2
20:27:38  <ryah>print size_
20:27:38  <mjr_>It's very reproducible. We get about 200 crashes / day right now.
20:27:43  <ryah>print str_
20:27:57  <bnoordhuis>mjr_: can you send over a core file and the node binary?
20:28:03  <piscisaureus_>bad interaction with gc?
20:28:10  <ryah>mjr_: can i have the core too?
20:28:35  <ryah>i love smoking guns
20:29:07  <piscisaureus_>lets try to get the ssl certs out ::troll::
20:29:36  <mjr_>Yeah, let me put them somewhere
20:30:04  <txdv>what does off_t in fs_read do?
20:30:24  <bnoordhuis>txdv: file offset to read from
20:30:28  <piscisaureus_>txdv: read file at position
20:31:09  <txdv>and what happens if i provide -1?
20:31:31  <bnoordhuis>txdv: gremlins will eat your computer
20:31:51  <mjr_>Let's see fi this works:
20:31:57  <mjr_>http://ranney.com/node_cores.tar.gz
20:32:45  <bnoordhuis>104M!
20:32:47  <mjr_>You'll note that 2 of them are in the same place, but the third is actually in a different place in node string handling.
20:33:04  <mjr_>It's a 3-pack of cores with a bonus executable thrown in for free.
20:33:09  <bnoordhuis>wicked!
20:33:18  <mjr_>Linux x86_64
20:33:42  <bnoordhuis>nothing makes me feel more unix greybeard than post-mortem core debugging
20:33:50  <mjr_>Oh, but it's dynamically linked
20:33:58  <bnoordhuis>ubuntu 10.04?
20:34:01  <mjr_>yes
20:34:23  <bnoordhuis>it'll probably work, i run 10.04 x86_64 too
20:34:35  <mjr_>I guess it's not crashed in any shared libraries.
20:35:38  <mjr_>ryah: does that core work for you in your Solaris play land, or do you want me to paste you some output from gdb?
20:36:12  <ryah>mjr_: it wont work in solaris - but im loading it up in linux
20:37:39  <mjr_>I kid. Of course you have access to Linux. But if it doesn't load up properly on you machine, I can do it on mine if that helps.
20:38:53  <ryah>"/home/ryan/mjr/node": not in executable format: File format not recognized
20:38:53  <ryah>"/home/ryan/mjr/prod-26-11847-node.core" is not a core dump: File format not recognized
20:38:56  <ryah>:/
20:39:47  <bnoordhuis>wfm
20:39:53  <mjr_>You should get Bryan to throw a chair at that error.
20:40:04  <bnoordhuis>that's what you get for being a gentoo user
20:41:11  <ryah>bnoordhuis: are you just doing
20:41:11  <ryah>gdb --core=prod-26-11847-node.core node
20:41:14  <ryah> ?
20:41:45  <bnoordhuis>other way around
20:41:47  <bnoordhuis>gdb ./node core
20:42:16  <ryah>meh
20:42:32  <bnoordhuis>did it work?
20:42:40  <ryah>nope
20:43:44  <ryah>bnoordhuis: i bet you need a handlescope in StringPtr::ToString
20:43:48  <mjr_>ryah you have x86_64?
20:43:55  <mjr_>Just caught another one: https://gist.github.com/0e6302bd8143aff75bfb
20:44:13  <mjr_>Want me to poke at that one for you?
20:44:45  <bnoordhuis>ryah: plausible... but there's also a crash in node::StringPtr::Update()
20:46:37  <ryah>mjr_: yeah
20:47:36  <bnoordhuis>it looks like an uninitialized StringPtr
20:47:43  <bnoordhuis>(gdb) p *(class node::StringPtr *)0x4487598
20:47:43  <bnoordhuis>No struct type named node.
20:47:43  <bnoordhuis>(gdb) p *(class StringPtr *)0x4487598
20:47:43  <bnoordhuis>$2 = {
20:47:43  <bnoordhuis> str_ = 0xb209113208 <Address 0xb209113208 out of bounds>,
20:47:44  <bnoordhuis> on_heap_ = 255,
20:47:45  <bnoordhuis> size_ = 281474976776193
20:47:47  <bnoordhuis>}
20:47:58  <bnoordhuis>skip the first two lines :)
20:48:15  <ryah>hm
20:48:58  <ryah>CreateHeaders also needs HandleScope
20:49:02  <ryah>not sure if that's related
20:50:12  <bnoordhuis>there is supposed to be a handlescope in on_headers_complete
20:50:34  <bnoordhuis>i suspect that's the culprit
20:51:07  <bnoordhuis>or at least a culprit
20:51:16  <ryah>we should try to reproduce it
20:51:39  <ryah>like instanciate a http parser and throw a bunch of long headers at it?
20:51:54  <bnoordhuis>there's a couple of tests that do that
20:52:08  <mjr_>Our headers are fairly small compared to real web browser headers.
20:53:02  <ryah>the fact that you crash in Update suggests that you have some long headers
20:53:25  <mjr_>Perhaps unintentionally long.
20:53:26  <bnoordhuis>re handlescope, there's one a few frames below in Execute()
20:55:40  <mjr_>Would a very large query string perhaps also cause this?
20:56:49  <ryah>mjr_: yeah
20:57:16  * luxigoquit (Ping timeout: 276 seconds)
20:57:37  <mjr_>Looking at some other cores, it does seem die on these URLs like message_id=profile_picture_user.ryan.dahl_1235548_3832848
20:58:04  <mjr_>I wonder if we are sticking some extra garbage in there sometimes.
20:59:02  <ryah>https://gist.github.com/1503241 ?
20:59:21  * luxigojoined
21:00:15  <mjr_>Want us to try that on one?
21:00:38  <ryah>i wanted to ask what ben thinks
21:00:43  <mjr_>Oh,OK
21:01:50  <ryah>it seems i changed some return value inadvertently :)
21:02:41  <ryah>gist updated
21:03:01  <bnoordhuis>i was just about to ask about that :)
21:03:26  <bnoordhuis>it won't hurt but i don't think it's the real cause
21:03:55  <bnoordhuis>that segfault in StringPtr::Update() doesn't touch v8 at all
21:04:04  * isaacsquit (Quit: isaacs)
21:04:06  <ryah>yeah
21:04:13  <ryah>i dont feel good about it either
21:06:20  * dshaw_quit (Quit: Leaving.)
21:14:44  <bnoordhuis> fields_ = {{
21:14:45  <bnoordhuis> str_ = 0x84d2901 <Address 0x84d2901 out of bounds>,
21:14:45  <bnoordhuis> on_heap_ = false,
21:14:45  <bnoordhuis> size_ = 4
21:14:45  <bnoordhuis> }, {
21:14:45  <bnoordhuis> str_ = 0x84d2920 <Address 0x84d2920 out of bounds>,
21:14:47  <bnoordhuis> on_heap_ = false,
21:14:51  <bnoordhuis> size_ = 15
21:14:53  <bnoordhuis> }, {
21:14:55  <bnoordhuis> str_ = 0x5ec4c79 "User-Agent: Voxer 2.3.6 rv:0649 (iPhone; iPhone:1\r\n:11\r\n:11\r\n\004\062\062\n a000\nw[\276\307ș\237V\255\305F\357\376\367\374J7\321\361\037\351
21:14:58  <bnoordhuis>h\225d\341\336\354[ʿ4\376\266\377\004\061e\n a014\nw\034m\202R\210S8\373ڶ\321p\022\371:\323R\026x\226\252\352\206\302\355\336y\242/\004\062\062\n a028\ng\337\341\243ex
21:15:01  <bnoordhuis>\233\303\313\062\260un+\345\060\213\354\345M\353\243\066P\377\021\060\025B~o\201E\r\n"...,
21:15:03  <bnoordhuis> on_heap_ = false,
21:15:05  <bnoordhuis> size_ = 10
21:15:07  <bnoordhuis> num_fields_ = 3,
21:15:09  <bnoordhuis> num_values_ = 3,
21:15:11  <bnoordhuis>so that's bad
21:15:19  <bnoordhuis>now the why
21:17:21  <mjr_>wow, that's a really mangled UA string.
21:17:30  <mjr_>I'll send that back to the iOS guys.
21:17:40  * pieternjoined
21:19:04  <bnoordhuis>mjr_: it could be a left-over from the previous request
21:19:53  <bnoordhuis>and in this particular case it's a slice of the first 10 bytes ("User-Agent")
21:21:47  <mjr_>But they bytes after iPhone; iPhone are I think right where the objc code is doing some string manipulation to insert the version number.
21:22:25  <mjr_>And a few bytes later I see what looks like our audio framing data. Hard to say if those are leftover on the server or if the client is sending them up that way I guess.
21:22:58  <ryah>bnoordhuis: what's bad - that the first two elements have str_ to a bad address?
21:23:22  <bnoordhuis>yes
21:23:36  <bnoordhuis>while num_fields_ and and num_values_ equal 3
21:24:32  <bnoordhuis>and while (important detail!) CreateHeaders() is looping over the fields
21:32:40  <ryah>hmm...
21:34:25  <ryah>bnoordhuis: do you have the raw buffer ?
21:34:35  <bnoordhuis>i can look it up
21:34:37  <ryah>bnoordhuis: can you go down to the Execute frame and see wht the packet it
21:34:45  <ryah>*is
21:35:33  <bnoordhuis>(gdb) p {char}0x8a0405e@62
21:35:33  <bnoordhuis>$2 = "message_id=profile_picture_user.karli.gande.1323462443912_6398"
21:36:27  <ryah>that's current_buffer_data ?
21:37:11  <bnoordhuis>that's what's passed to http_parser_execute()
21:37:38  <bnoordhuis>current_buffer = NULL
21:38:02  <bnoordhuis>it's set to NULL right before the call to http_parser_execute()
21:38:03  <ryah>mjr_: is that part of the URL?
21:38:16  <mjr_>yes
21:38:24  <ryah>what about current_buffer_data ?
21:38:45  <mjr_>full url is like this: /get_body?message_id=profile_picture_user.karli.gande.1323462443912_6398
21:38:58  <bnoordhuis>(gdb) p current_buffer_data
21:38:58  <bnoordhuis>$2 = 0x5e63800 "8d\r\n\004\062\061\n 5e4c\np-M0\236͗\370\216\223\345\371^]\021U*RE\006\354\263'\343\064þ\321\377]\315\032?\004\062\062\n 5e60\np*\250\377\263kIA\021\205-\235]\222\264Q\303\322$5h\320(\vw\"\200\254\001\263G\004\062\063\n 5f64\np-\271M\002\065\025N\357G\344\213\320x\223nSh\247o\001m\216f@\342\232\066\326\023\221\234%\212\233\r\n\004\062a\n 4b0\ny\261\304\034\256m\271\037cy\022\275\030\\5\v\252
21:38:58  <bnoordhuis>\244\004\061\200sȠ\302\205*\252\257O\342\306M\242\217\333\066\374V", <incomplete sequence \325>...
21:39:01  <ryah>why would it be getting a packet with just that?
21:39:02  <mjr_>Hmm, there might be another qs elem or two on there sometimes.
21:39:14  * AndreasMadsenquit (Remote host closed the connection)
21:39:34  * indexzeroquit (Quit: indexzero)
21:39:38  <bnoordhuis>let me inspect the other two core dumps
21:41:08  <mjr_>I've got lots of other core dumps I can batch process if you like.
21:41:39  <ryah>im not sure if i trust this:
21:41:40  <ryah> else if (on_heap_ || str_ + size != str) {
21:41:59  <bnoordhuis>mjr_: can you send a few more?
21:42:20  <bnoordhuis>ryah: why not?
21:42:22  * ryahwants a core dump
21:42:23  <ryah>:(
21:42:33  <bnoordhuis>install a decent distro >:)
21:43:11  <mjr_>Which is to say, install the exact same one that I happen to use.
21:43:54  <ryah>bnoordhuis: im not sure why i dont trust it - because it's very clever
21:45:00  <bnoordhuis>well... it was supposed to be fast, right?
21:45:28  <bnoordhuis>it's essentially a check to find out if the new chunk is adjacent to the old chunk
21:45:37  <bnoordhuis>if yes, great - if no, need to make a copy on the heap
21:45:55  <ryah>yeah
21:46:17  <ryah>but what if the next packet somehow aligns in the same area
21:46:33  <mjr_>Is there a way to have gdb dump the stack from a core in some kind of batch mode so I can run it across all of these core files?
21:46:53  <ryah>mjr_: probably - but i dont know how
21:46:55  <bnoordhuis>ryah: why would that matter?
21:47:19  <ryah>bnoordhuis: well the beginning of the str_ could be unallocated
21:47:41  <ryah>say you parse one packet - it ends in the middle of a string
21:47:52  * mikealjoined
21:47:57  <ryah>then you go to parse the next packet - which happens to overlap where the previous packet was
21:47:58  <bnoordhuis>mjr_: `for FILE in *.core; do gdb -X script /path/to/node $FILE; done`?
21:48:02  <ryah>(not sure if that's possible)
21:48:40  <bnoordhuis>if the two packets belong to the same request and they're adjacent in memory, no problem
21:48:52  <bnoordhuis>if they're from separate requests - the parser is reset between requests
21:49:29  <ryah>same request - imagine the first packet is freed
21:49:48  <bnoordhuis>mjr_: sorry, it's -x, not -X
21:50:10  <bnoordhuis>ryah: like that - i'm pretty sure i checked that
21:50:24  <mjr_>https://gist.github.com/7e42c6d805be38576085
21:50:25  <bnoordhuis>but i will check it again just to be sure
21:51:13  <ryah>mjr_: can you apply the handlescope patch
21:51:16  <ryah>mjr_: just to check?
21:51:20  <ryah>or is it a big process?
21:52:30  <mjr_>I think it'll be easy enough
21:53:25  <mjr_>So this one, you feel good about? https://gist.github.com/1503241
21:53:46  <ryah>let me double check that, but yes
21:55:06  <ryah>bnoordhuis: what do you think about landing the handlescope patch?
21:55:11  <ryah>bnoordhuis: i think those are necessary
21:55:48  <bnoordhuis>i don't think they are, Locals end up in the Execute() HandleScope
21:56:09  <ryah>yeah..
21:56:10  <ryah>hm
21:56:46  <ryah>im worried about these stack allocated locals getting destructors called
21:56:47  <bnoordhuis>but i'm checking out your suggestion about buffers being freed prematurely
21:57:11  <ryah>i should learn how v8 works
21:57:11  <bnoordhuis>well, i suppose it won't hurt from a stability / robustness perspective to add HandleScopes
21:57:29  <bnoordhuis>but maybe from a performance perspective...
21:58:45  <ryah>mjr_: yeah, please test that patch
22:06:32  <ryah>we're getting kicked out of the office
22:06:37  <ryah>bb in an hour when i get home
22:07:28  * paddybyersquit (Quit: paddybyers)
22:08:16  * paddybyersjoined
22:13:53  <bnoordhuis>https://gist.github.com/435260955c95d2ca0851 <- if it's a lifecycle issue, this should "fix" it
22:16:40  * isaacsjoined
22:27:05  * mikealquit (Quit: Leaving.)
22:31:14  * mikealjoined
22:35:17  * isaacs_joined
22:37:00  * isaacsquit (Disconnected by services)
22:37:00  * isaacs_changed nick to isaacs
22:39:09  <ryah>mjr_: can you keep us updated on the patch?
22:39:17  <ryah>i feel like a hungry dog
22:39:20  <ryah>wrt to this bug
22:40:57  * mikealquit (Quit: Leaving.)
22:46:02  <mjr_>Sorry, went to lunch. Yes, we'll try that patch
22:46:16  * ericktquit (Quit: erickt)
22:47:04  <bnoordhuis>mjr_: if that doesn't fix it, can you try my patch separately?
22:47:10  <mjr_>sure
22:47:34  <mjr_>Seems like there are two different places/ways it crashes anyway.
22:47:43  <bnoordhuis>there's a 3-4% overhead so don't roll it out on all your systems just yet :)
22:48:05  <mjr_>With yours there's a slowdown you mean?
22:48:20  <bnoordhuis>in pure http parser performance, yes
22:48:35  <bnoordhuis>in the grand scheme of things it's probably unnoticeable
22:52:40  <mjr_>We have an increasingly grand scheme over here.
22:56:07  * paddybyersquit (Quit: paddybyers)
23:05:47  <bnoordhuis>ryah: you should get your wife a bread machine for christmas, i can recommend it
23:06:11  <piscisaureus_>I can't
23:06:25  <piscisaureus_>the thing will occupy space until the end of days
23:06:26  <bnoordhuis>also, the chromium people compile openssl with OPENSSL_NO_ASM :/
23:06:35  <bnoordhuis>yeah, they're pretty big
23:06:55  <bnoordhuis>probably at least a third of ryah's apartment
23:12:16  * felixgequit (Quit: felixge)
23:13:36  * felixgejoined
23:13:37  * felixgequit (Changing host)
23:13:37  * felixgejoined
23:13:41  * felixgequit (Client Quit)
23:14:46  <mjr_>OK, that patch is running on 8 processes now.
23:20:30  <bnoordhuis>http://news.ycombinator.com/item?id=3375379 <- priceless, someone calling poul-henning kamp a newb
23:23:22  <bnoordhuis>mjr_: how is node working out for you guys so far?
23:25:34  <bnoordhuis>apart from a segmentation fault every now and then, i mean
23:25:34  <mjr_>node is kicking ass
23:25:34  <bnoordhuis>any rough edges?
23:25:34  <mjr_>Well, you know the memory leak stuff is still super painful
23:25:34  <mjr_>I think we might have fd leaks in there too that cause slowdowns which eventually fix themselves.
23:25:51  * ryahtopic: http://drewww.github.com/socket.io-benchmarking/
23:26:37  <mjr_>We are moving our whole operation to Joyent soon, so hopefully we'll be able to use some of this awesome stack helper stuff.
23:27:09  <pquerna>bnoordhuis: who are these people on HN now days :=/
23:27:31  <bnoordhuis>pquerna: hah, i know right?
23:27:47  <bnoordhuis>mjr_: yeah, node + dtrace is great
23:28:14  <bnoordhuis>i've been thinking about adding systemtap probe points so you can do something similar on linux
23:28:49  <mmalecki>well, *.nodejitsu.com was once blocked because of "sock-puppeting" on hn.
23:29:00  <rmustacc>bnoordhuis: It should just work out of the box I'm told.
23:29:02  <mmalecki>bnoordhuis: I think I've seen some project trying to port dtrace to linux
23:29:11  <bnoordhuis>also because your boss can be an ass
23:29:29  <mmalecki>bnoordhuis: which one?
23:31:14  <bnoordhuis>marek
23:31:14  <bnoordhuis>re dtrace port - yeah, oracle is apparently working on that
23:31:14  <bnoordhuis>which is good news if it'll work outside of unbreakable linux
23:31:14  <mjr_>But it's going to be for their own commercial version though, right?
23:31:14  <rmustacc>I wouldn't hold your breath on that for a while.
23:31:14  <mmalecki>bnoordhuis: that wasn't the case here. also, everyone can be an ass.
23:31:14  <bnoordhuis>some more than others :)
23:31:14  <mmalecki>I think I was an ass yestarday.
23:31:14  <rmustacc>They displayed that they didn't really understand the code.
23:31:14  <bnoordhuis>rmustacc: yes?
23:31:14  <rmustacc>Plus, they said they weren't going to do usdt.
23:31:14  <bnoordhuis>how so?
23:31:20  <mmalecki>bnoordhuis: and yeah, that'd be Oracle
23:31:26  <mjr_>rmustacc: you guys could totally clean up with smartos if you tried to make most of the user land tools work like they do on Linux.
23:31:29  <rmustacc>bnoordhuis: Uh, you diff the drivers and see what safety portions they ripped out and replaced with comments that said they didn't understand why it was there.
23:31:32  <bnoordhuis>oh, that makes it rather less useful...
23:31:57  <mjr_>I keep trying to go be Mr. Solaris again, but the years of typing commands into Linux have worn deep grooves into my brain.
23:32:00  <rmustacc>Yeah, at least SystemTap didn't reinvent their own USDT method and consume the DTrace one.
23:32:26  <rmustacc>mjr_: If you end up generating a list of things that you hit and are frustrating, that'd be good. On the new stuff by default, the GNU tools should be in your path first for example.
23:32:39  <rmustacc>mjr_: Or just send me a brain dump some day.
23:32:54  <rmustacc>There are a bunch of small things we have as TODOs to make that experience friendlier.
23:32:57  <bnoordhuis>rmustacc: can i have signalfd()?
23:33:08  <mjr_>Well, like htop and top should be there, and ps should not overflow the columns.
23:33:16  <mjr_>If there's a wiki somewhere, I'd be happy to contribute to it as I find things.
23:33:38  <rmustacc>mjr_: Yeah, we've been meaning to do a top compatibility mode to prstat.
23:33:40  * pieternquit (Quit: pietern)
23:33:42  <rmustacc>It'll make everyone happier.
23:33:47  <rmustacc>Because top is a resource hog.
23:34:04  <mjr_>Yes, prstat is completely amazing, but it's just different in surprising ways.
23:34:21  <rmustacc>mjr_: Yeah, we should just beat out a top compatibility mode for that.
23:34:52  <rmustacc>bnoordhuis: So receiving a singla through an event port basically?
23:35:01  <bnoordhuis>rmustacc: yes
23:35:19  <rmustacc>bnoordhuis: Sounds reasonable, I'll file an internal ticket as something for us to look at adding.
23:35:22  * pieternjoined
23:35:23  <mjr_>For me if you just made htop work, I'd sit comfortably by with that in one window and some new Solaris man pages in the other.
23:35:33  <bnoordhuis>single greatest addition to the kernel api in 10 years
23:36:18  <mjr_>FYI, no cores since that patch. We won't know for sure until tomorrow.
23:36:18  * ericktjoined
23:39:54  <bnoordhuis>oh man, would i feel silly if it turns out to be a couple of missing handlescope declarations...
23:40:02  * ryahtopic: http://drewww.github.com/socket.io-benchmarking/
23:40:11  <mjr_>Glad I could provide some high volume QA.
23:42:15  <piscisaureus_>ryah: http://updates.html5rocks.com/2011/12/Transferable-Objects-Lightning-Fast
23:42:15  <bnoordhuis>much appreciated, mjr_ :)
23:42:30  <piscisaureus_>ryah: couldn't find the source code, should be somewhere around http://src.chromium.org/viewvc/chrome/trunk/src/webkit/plugins/ppapi/message_channel.cc?view=markup
23:42:48  <piscisaureus_>but chromium gets just as complex as v8 :-/
23:44:17  <mjr_>If we hadn't built in retry logic at all layers of our app, it'd be basically impossible to fix these sorts of problems.
23:44:50  <mjr_>I guess I should do a blog post about this.
23:45:01  <bnoordhuis>piscisaureus_: that's easy to emulate, no? just detach the malloc'd blob from object A in isolate #1 and attach it to object B in isolate #2
23:45:13  <bnoordhuis>at least that's how i read it
23:46:14  <bnoordhuis>or does the original isolate also retain a reference to the arraybuffer?
23:47:04  * luxigoquit (Remote host closed the connection)