00:03:58  * KennethWilkequit (Remote host closed the connection)
00:05:04  * a_le_quit (Remote host closed the connection)
00:47:17  * a_lejoined
00:54:03  * DarkGodquit (Ping timeout: 264 seconds)
01:51:05  * a_lequit (Remote host closed the connection)
01:51:40  * a_lejoined
01:56:13  * a_lequit (Ping timeout: 264 seconds)
02:05:55  * joconnorquit (Ping timeout: 250 seconds)
02:07:05  * cledevquit (Ping timeout: 250 seconds)
03:52:06  * hdmsquit (Quit: hdms)
03:56:56  * a_lejoined
04:16:09  * imzyxwvujoined
04:17:26  <creationix>rphillips: hmm, I’m getting segfaults using the latest luvi binary making https requests to spark.io
04:17:34  <creationix>I’ll try to debug, just fyi
04:20:15  <rphillips>hmm
04:26:26  <creationix>double free in x509 store looks like
04:27:20  <creationix>https://gist.github.com/creationix/01df8f837adc9fd5d265
04:29:46  <creationix>fwiw, here is the code. https://github.com/creationix/voodoo-spark-lit/blob/master/repl.lua
04:31:04  <rphillips>man... i thought he had fixed that bug
04:32:43  <rphillips>creationix: https://gist.github.com/rphillips/366754150ed884bde1f2
04:32:54  <rphillips>can you try this with luvit:luvi-up?
04:33:00  <rphillips>doesn't crash for me on osx
04:33:21  <rphillips>that was easier than I thought it was going to be to get working
04:33:31  <creationix>wow, you ported my example to luvit
04:33:56  <rphillips>hack job :)
04:34:21  <rphillips>i reject the cert
04:34:26  <rphillips>on line 35
04:34:36  <rphillips>might be different than your example
04:35:28  <rphillips>just for sanity, try to make sure the binary is the latest
04:35:37  <creationix>yep, that runs fine
04:35:56  <rphillips>perhaps a double close somewhere?
04:36:16  <creationix>well, that was spark’s homepage, I imagine it might have a different ssl terminator than the cloud API I was hitting
04:36:27  <rphillips>going through your repl.lua file
04:38:21  <creationix>hmm, now I can’t reproduce it
04:39:23  <creationix>interesting. I can only reproduce it when I leave out all the headers (including Host) and get an error quickly
04:39:31  <rphillips>ah hah
04:39:36  <rphillips>i bet it's a virtual host
04:41:38  <creationix>right, but the segfault or doublefree (I get both, different error each time) seems only to happen if the request is tiny
04:41:48  <creationix>can’t get your version to reproduce it though
04:41:49  <rphillips>hmm
04:42:08  <rphillips>i think my version is always setting the host and accept header within the http codec
04:43:21  <creationix>right, but I removed those
04:45:31  <rphillips>hmm. yeah. helps if I run the correct file
04:46:07  <creationix>it doesn’t help their API server seems to be down
04:46:20  <creationix>when I do input the proper url, it just hangs and eventually gives a timeout response
04:46:23  <creationix>same with curl
04:46:58  <creationix>maybe the timeout is it’s trying to query my spark and I don’t have it online
04:48:08  <creationix>(the API command asks my local spark it’s local internal IP address, part of the voodoospark protocol)
04:48:13  <rphillips>could you PM a valid token and device id?
04:49:13  <creationix>sure, but I’ve only seen the double free with invalid queries leaving off the host header
04:50:43  <creationix>ok, spark is online now
04:51:29  <rphillips>hmm. i don't get a crash... but I get a 400
04:51:31  <rphillips>curl works
04:53:55  <creationix>ok, this code is working now https://github.com/creationix/voodoo-spark-lit/blob/master/repl.lua
04:54:30  <creationix>I’ve still only seen the segfaults and double frees with minimal headers being sent and a 403 being returned right away
04:54:52  <rphillips>that latest commit crashes for me now
04:56:02  <creationix>I can’t reproduce it at all now
04:56:06  <creationix>even if I remove the headers
04:56:17  <creationix>I just get a 400 Bad Request response
04:56:45  <creationix>I wonder if they rate limit
04:59:09  <rphillips>LUVI_APP=. ../@cloudkick/luvi/build/luvi
04:59:13  <rphillips>creationix: ^ that worked for me
04:59:34  <rphillips>i had been running `lit make`
05:00:01  <creationix>“worked” meaning you got the ip/port result?
05:00:07  <creationix>or can reproduce the segfault?
05:00:11  <rphillips>correct... and no segfault
05:00:43  <rphillips>PM'ed you a screenshot
05:01:11  <creationix>yep, my code is working
05:01:25  <creationix>I guess we’ll have to find another use case to reproduce the error
05:01:44  <creationix>seemed to be related to timing
05:02:10  <creationix>that’s an express.js app running behind nginx 1.6.0 fwiw
05:02:35  <creationix>on the bright side, I can continue writing my voodoospark driver in lit
05:02:48  <rphillips>is it hanging for you now?
05:04:31  <rphillips>seems like the service isn't all that stable
05:05:20  <rphillips>interesting... i got a timeout in the vsl binary and then a crash
05:05:23  <rphillips>{ error = 'Timed out.' }
05:09:07  <creationix>yeah, their service doesn’t seem stable
05:10:35  <creationix>it’s going pretty fast at the moment
05:10:55  <creationix>I should probably cache the last known address locally and reuse it between reloads
05:12:08  <creationix>well, I’ve got my app connecting to the local spark over lan. I’m heading to bed
05:15:01  <rphillips>k. nighty
05:18:39  * a_lequit (Read error: Connection reset by peer)
05:19:05  * a_lejoined
05:23:04  * a__quit (Remote host closed the connection)
05:24:38  * a__joined
05:25:59  * imzyxwvuquit (Ping timeout: 256 seconds)
07:10:10  * piernovquit (Ping timeout: 252 seconds)
07:17:52  * a_lequit (Remote host closed the connection)
07:21:02  * a_lejoined
07:42:56  * piernovjoined
08:30:50  * DarkGodjoined
10:10:49  * imzyxwvujoined
12:13:19  * {slurp}1joined
12:13:19  * creationixtopic: Lua + libUV + jiT = pure awesome-sauce | http://luvit.io | https://github.com/luvit/luvit | https://github.com/luvit/luv
12:20:55  * {slurp}quit (*.net *.split)
12:27:08  * creationixtopic: Lua + libUV + jiT = pure awesome-sauce | http://luvit.io | https://github.com/luvit/luvit | https://github.com/luvit/luv
15:31:27  <rphillips>hmm. I would really like to figure out that crash
15:32:32  * dan336joined
15:38:51  <creationix>rphillips: can you reproduce it?
15:39:07  <rphillips>yeah, sometimes on my machine
15:45:31  <creationix>I never caught the segfault in gdb, but this was the stacktrace during a double-free bug https://gist.github.com/creationix/01df8f837adc9fd5d265
16:00:24  * dan3361joined
16:00:24  * dan336quit (Read error: Connection reset by peer)
16:05:27  * hdmsjoined
16:07:55  <rphillips>creationix: can you reliably crash it pretty much every time?
16:09:14  <creationix>no, sorry
16:36:31  <rphillips>creationix: https://github.com/rphillips/lua-openssl/commit/ada3a6e8595bb5e48896603094c42d37b73aff31
16:36:41  <rphillips>man, this patch is working a whole lot better I think
16:37:08  <creationix>nice
16:37:42  <rphillips>i'll PR it, and see what he says
16:39:12  <rphillips>https://github.com/zhaozg/lua-openssl/pull/42
16:39:39  <rphillips>i haven't had a failure to api.spark.io yet <knock on wood>
16:39:44  <rphillips>or a crash
16:42:25  * imzyxwvuquit (Ping timeout: 264 seconds)
16:43:59  <rphillips>api just timed out
16:57:36  <rphillips>hmm. I use that custom luvi and the https client fails with a crash within the unit tests
16:59:04  <rphillips>different crash location
17:00:49  <rphillips>https://gist.github.com/rphillips/2bef85d001cb1d608e6e
17:02:29  * UniOnjoined
17:06:08  <creationix>interesting
17:12:49  <rphillips>man, it looks like the ssl context takes ownership of the x509_store
17:34:00  * joconnorjoined
17:36:19  <rphillips>the reference counts are off
17:37:29  <creationix>that will do it
18:45:03  * a__quit (Ping timeout: 264 seconds)
18:46:15  * a__joined
19:06:10  <rphillips>http://blog.atom.io/2015/02/04/built-in-6to5.html
19:06:45  <creationix>yep, that’s neat
19:42:50  * joconnorquit (Remote host closed the connection)
19:43:08  * joconnorjoined
20:04:10  <creationix>for distributions, we should probably create a libluvi shared library so that lit and luvit in the distro can share the same binary
20:04:16  <creationix>I’ll bet they want that
20:04:25  <creationix>but then any binaries created by it won’t be portable, so I’m not sure
20:04:47  <creationix>or just not put luvit in the distro
20:07:09  <rphillips>what if we placed just luvi and lit into the package
20:07:37  <rphillips>that way any application just installs into /usr/local/share...
20:07:45  <rphillips>and sets LUVI_APP directory
20:08:52  <rphillips>for an executable the package build tool, takes luvi and just creates the executable
20:09:35  <rphillips>shared object might be a nice to have, but it does complicate things
20:21:57  <creationix>maybe with the symlink trick we can set LUVI_APP
20:22:18  <creationix>instead of a custom main, set LUVI_APP to dirname(bin)
20:22:31  <creationix>hmm, or something based on bin
20:29:11  <rphillips>or it can just be a bash script in /usr/bin/
20:31:15  <creationix>I don’t like that because then you have an extra bash process
20:31:20  <creationix>it’s better to run direct if possible
20:31:52  <rphillips>hmm. not sure how you would set the environment variable with a symlink
20:32:21  <creationix>right
20:33:25  <creationix>if we had a shared library, we could still embed a binary head, but it would be much smaller since the bulk of it was dlopen'ed
20:33:37  <rphillips>true
20:34:01  <creationix>there are lots of ways to package this
20:34:31  <creationix>one idea I had was to integrate the lit db into the vfs in the luvi bundle, or at least in the paths searched for by the custom require
20:34:44  <creationix>then dependencies would be virtual files and not be duplicated
20:35:21  <rphillips>what if application X depends on v1.0.0 and application Y depends on v2.0.0... would it support that?
20:35:38  <creationix>yeah, it would map versions to hashes first thing
20:35:59  <creationix>or rather mount certain versions to certain paths
20:36:07  <creationix>but that would be a per-process mapping
21:49:27  * xtquit (Quit: WeeChat 1.1-dev)
21:49:59  * xtjoined
23:41:24  * UniOnquit (Remote host closed the connection)
23:58:44  * dan3361quit (Quit: Leaving.)