Camelia, the Perl 6 bug

IRC log for #mojo, 2011-12-08

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

All times shown according to UTC.

Time Nick Message
00:45 jwang joined #mojo
00:51 MojoGuest233 joined #mojo
00:52 MojoGuest233 Hit the bong, bang a gong.
01:37 andrefs joined #mojo
01:46 mire joined #mojo
01:56 metaperl joined #mojo
02:12 noganex joined #mojo
02:41 tempire I got bored with Smalltalk
02:41 tempire 1/2 through the book, but it's just a chore now
02:42 tempire even the pharo interface just seems clunky to me
02:42 tempire lot of nifty insight and tools, though
02:42 tempire I'm in love with Haskell, though.
02:42 tempire though I'm in the honeymoon period.
02:42 tempire we'll see what deep dark secrets it reveals once I meet Haskell's mother.
02:46 marty Audrey Tang does Haskell and she does some pretty cool stuff with it.  So my guess is (never used it) that it cannot be all that bad.  :)
02:46 newbie joined #mojo
02:54 amoore joined #mojo
03:13 amoore joined #mojo
03:46 jnap joined #mojo
03:47 cfedde most of the time I just want to leverage what I already know.
05:36 stephan48 joined #mojo
05:38 crab joined #mojo
05:38 augensalat joined #mojo
05:38 memowe joined #mojo
05:38 random joined #mojo
05:38 Nickeeh joined #mojo
05:39 sri joined #mojo
05:41 Hinrik joined #mojo
05:41 plu joined #mojo
05:41 gabb joined #mojo
05:42 rhaen joined #mojo
05:42 Kallisti joined #mojo
06:29 marcus moin
06:32 Vandal joined #mojo
06:34 newbie does Morbo has internal timeout equals to 5s?
06:36 xaka the problem is that if request longer than 5s, it drops the connection, but in log still says responded with 200 OK
06:50 koban joined #mojo
06:54 xaka ok, figured out. it was timeout which is increased up to 15s in 2.3.6, but still not enough for the first caching request. I can affect on it using --keepalive option
06:54 xaka there is bigger issue - log says "200 OK", but actually connection was closed and no one word in log about it.
06:54 xaka bug?
07:04 xaka i think there is some mistake in understanding what keepalive timeout should do. Independ on how long your response comes up, the timeout shouldn't affect on it, only on request. If we're in handling stage (request passed) - timeout has to be dropped off
07:09 xaka does anybody has his own vision on this case?
07:17 sugar joined #mojo
07:26 dryman joined #mojo
07:37 tl joined #mojo
07:38 espent joined #mojo
07:58 sugar_ joined #mojo
08:34 berov joined #mojo
09:29 berov hello,
09:30 berov I use Mojolicious::Plugin::AlloyRenderer in my app MYDLjE.
09:30 berov A friend tryed to run it on WIndows 7
09:31 berov There is a very strange error ...
09:31 berov Something like C:\dev\app\templates\cpane​l\auth\loginscreen.html.tt NOT FOUND
09:32 berov the problem is taht the file is there exactly
09:32 berov what could be causing the problem
09:32 berov Unfortunately I do not have Windows at hand to test
09:33 berov any hint?
09:34 berov I am sure it is not Template::Alloy
09:55 berov also there is no any kind of notice where this happens . no fil no line etc....
09:57 spleenjack joined #mojo
10:20 cosmincx joined #mojo
11:28 cosmincx joined #mojo
11:28 MojoGuest622 joined #mojo
11:28 MojoGuest622 From: http://networkedblogs.com/33Knp (13 hits)
11:29 MojoGuest419 joined #mojo
11:29 MojoGuest419 From: http://networkedblogs.com/33Knp (14 hits)
11:45 spleenjack joined #mojo
12:05 sri oh my, this channel keeps leaking ops
12:05 Alias joined #mojo
12:19 Foxcool joined #mojo
12:22 andrefs joined #mojo
12:31 cosmincx joined #mojo
12:52 cosmincx joined #mojo
12:54 marcus joined #mojo
12:57 alpha6 joined #mojo
13:05 batman joined #mojo
13:20 koban left #mojo
14:07 [R] joined #mojo
14:35 gabiruh joined #mojo
14:39 amoore joined #mojo
14:58 sri https://github.com/kraih/mojo/pull/235 # any thoughts about this?
14:59 jnap joined #mojo
14:59 andrefs joined #mojo
15:01 sri btw. chances of getting a patch that weakens a security feature without providing any tests or documentation are less than zero
15:01 sri *+applied
15:30 andrefs joined #mojo
15:36 Psyche^ joined #mojo
15:46 crab what security feature?
15:48 MojoGuest554 joined #mojo
15:48 MojoGuest554 From: http://www.google.se/url?sa=t&rct=j&​q=extjs%20websocket&source=web&cd=7&​amp;ved=0CFcQFjAG&url=http%3A%2F%2Fdev.x​antus.org%2F&ei=29vgTpuMCe3Z4QTCwfHoBg&a​mp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
15:48 MojoGuest554 hejsan
15:48 sri crab: see pull request link above
15:48 andrefs joined #mojo
15:48 MojoGuest930 joined #mojo
15:48 MojoGuest930 From: http://www.google.se/url?sa=t&rct=j&​q=extjs%20websocket&source=web&cd=7&​amp;ved=0CFcQFjAG&url=http%3A%2F%2Fdev.x​antus.org%2F&ei=29vgTpuMCe3Z4QTCwfHoBg&a​mp;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (2 hits)
15:56 sri currently we time out connections whenever there is no wire activity for 15 seconds, the proposed patch (which is imo total bullshit) implies that it is a bug not to consider buffer writes as connection activity
15:57 mercutioviz joined #mojo
15:58 sri so if a longpoll connection for example doesn't become writable for whatever reason the buffer will keep filling up and the connection could never time out
15:59 sri it creates many new attack vectors
16:01 crab ah.
16:01 kaare joined #mojo
16:15 diogo joined #mojo
16:31 Foxcool joined #mojo
16:48 diogo joined #mojo
16:52 jwang joined #mojo
16:53 xaka joined #mojo
16:56 mire joined #mojo
17:13 xaka sri: you rejected the pull request, ok. i said in comment that using new event is probably not the best idea, but i couldn't find better solution. the bug, as is, still exists. long-running requests mark client's connection as inactive that shouldn't happen. After request is sent, user can't be active by definition because he's waiting for response
17:14 sri xaka: there is no bug
17:15 sri you're just making false assumptions
17:15 xaka sri: mb it isn't bug, ok, but what to do then?
17:15 sri you do absolutely nothing, because it works perfectly fine
17:17 sri if your application needs more than 15 seconds you set a higher timeout
17:17 xaka ok, then let's look from another side - in logs i see "200 OK" which isn't true, at least it should say "we're timedout". what do  you think?
17:18 sri i don't think that is possible
17:18 xaka hm...introduce "timeout" event and it will?
17:19 sri and what i really think is that you should read up on the code and actually understand it before making suggestions like that
17:19 xaka with such event you can log whatever you want on higher level w/o touching low-level
17:19 sri your pull request was a security nightmare
17:21 sri adding harmless new events for logging is a different topic, get others on your side and we can talk about it
17:30 xaka ok, let's go back to keepalive, because it's still illogically. Looking at code we see that "active" state is for client's connection, not even request/response link. "active" updates during read/write operations. during request handling it can't be updated and in this case ioloop thinks that client is inactive, false-positive reaction. all clients have their own timeout for responses
17:30 xaka but now their timeout doesn't because morbo decides
17:30 xaka *doesn't work
17:31 xaka i said morbo because the same won't happen in case of CGI for an example
17:31 batman joined #mojo
17:32 xaka i checked apache, nginx, lighthttpd - none has "server response timeout" term
17:37 xaka it leads me to conclude that changing keepalive parameter is a workaround.  the solution either fix ioloop a bit or switch to CGI-like stuff
17:38 sri that's the problem, you're looking for terms instead of trying to understand the underlying concepts, of course nginx has these kinds of hard timeouts...
17:38 gshank joined #mojo
17:38 sri and there's your attitude again, this is why i avoid conversations
17:40 * sri goes back to working on the mongodb driver
17:40 xaka i said nothing bad, just opinion. i'm trying to check other http servers, how they work and where we are. i don't want to say "mojo is bad" w/o arguments so i'm finding them
17:42 xaka and yes, i haven't heard your vision on this situation yet, only "it works as it should". Could you please describe it in few words?
17:42 sri so your goal is to be able to say "mojo is bad"?
17:43 sri seriously, i'm done talking to you
17:43 xaka my goal is find the solution
17:43 sri convince another op in this channel first before coming back to me please
17:45 xaka dear ops, what is your vision on the situation?
17:46 sri tempire, marcus and crab for example are much better qualified to deal with this
17:49 xaka ok, will see what they think. looks like nobody is online that time
17:59 nuba joined #mojo
18:01 marcus hi
18:01 purl bonjour, marcus.
18:01 marcus xaka: What's your issue?
18:01 xaka marcus: hi, you're welcome to join to discussion
18:04 crab xaka: i agree with you that it's unfortunate that we see only 200 ok in the logs when a client connection is closed due to a timeout
18:04 xaka marcus: morbo has keepalive timeout option. if server generates response longer than that timeout (for an example backend is super-slow), client's connection is marked as inactive and dropped w/o sending the response which is ready to be send
18:04 crab xaka: but, i don't agree that the code should be changed so that the client connection is not closed.
18:04 marcus I agree with crab
18:04 marcus I also think you can set a really high timeout if you want to work around this
18:05 crab xaka: i also don't think it's a workaround to set a higher timeout.
18:05 marcus crab: as in it won't work, or as in it's not a hack?
18:05 xaka the question is why long-running requests affect on active/inactive client's state?
18:05 crab xaka: yes, what we call a keepalive timeout is different from a pure client-idleness-timeout, but that's just the way it is.
18:05 crab marcus: as in, it's not a hack (and it's what xaka should do)
18:05 marcus agree
18:06 crab the connection is kept-alive until the timeout expires. yes, the timeout is short. yes, sometimes you need more time. so you increase the timeout. yes, it's a bit surprising if you haven't encountered it before.
18:06 xaka while request is being handled client just waiting for response, there no way to be active
18:07 marcus xaka: and?
18:08 xaka marcus: and again, long-running request should not affect on "active" state, clients have their own timeout for this case
18:08 marcus xaka: Mojo can't rely on the client timing out..
18:08 marcus as sri suggests, that would create potential for denial of service attacks
18:10 xaka wait wait wait guys. morbo is async, there is no threads/processes, morbo can't cancel request inside itself. it waits for controller to finish the job (which means i stil can generate any-size-response), appends response to buffer and then drops connection.
18:11 crab ok.
18:13 sri and back to the beginning, your proposal is to make one use case slightly better by making a dozen others worse
18:14 sri big blob response after blocking DBI call is one small cog in a big machine
18:14 xaka no, i don't want to make anything worse, i'm just finding the true operating by facts, not my wills or only-my-case
18:15 sri you simply can't make a proposal without understanding the big picture
18:15 xaka few days ago some guy had the same issue with hypno server and that why timeout was increased up to 15s
18:16 xaka sri: it the issue, agree, so i'm asking you tell a bit about the concept, what's wrong with my understanding
18:17 sri we have too many communication problems, i don't want to explain it to you
18:18 sri and prolly can't
18:19 xaka crab: marcus: ok, if your last word is no, i'll just close the topic, my arguments are left
18:20 marcus xaka: I think having the timeout is a good security valve, and I don't think you've given a sufficient good reason to change it. But I agree with crab that it should emit a timeout event.
18:20 bob40302 joined #mojo
18:20 marcus sri: Would you consider such a patch from xaka?
18:21 sri marcus: the stream object already emits a close event
18:21 marcus sri: so why do we only see a 200 ok in the logs?
18:22 sri because the topic is really fucking complicated
18:22 xaka but close can happen in case client doesn't support Keep-Alive so it'll be false-positive again
18:22 sri and nobody so far borthered to really dig in
18:22 xaka i mean it'd be normal close, not because of timeout
18:23 sri then you can check if a transaction is active on the connection
18:23 sri heck, you could build the whole thing as a mojolicious plugin
18:23 sri the transaction could register and unregister the close event to log
18:25 xaka marcus: btw, what the security hole? you can't handle more than 1 client at the time, your handler still can generate 1PB response, normal clients still have to wait for it anyway, but connection is closed so every normal client is marked as DDOSer
18:26 xaka hypno could handle such issue, agree, because it has workers and can kill the child
18:27 marcus xaka: but your patch is to the ioloop, not morbo?
18:28 marcus I assumed you only used morbo as a way to reproduce this easily
18:28 marcus it's not like morbo is for production anyways
18:29 xaka i'm not sure, sri please correct me, but hypno use separate ioloop inside each worker so it's affected too
18:30 sri if you block in hypnotoad for 15 seconds it will kill the worker remorselessly
18:31 marcus MURDER
18:31 xaka "They killed Kenny (worker)! Bastards!"
18:31 sri the keep alive timeout is primarily for longpolling and actual keep alive
18:34 mercutioviz joined #mojo
18:39 sri in fact, morbo closing the connection in that case could be considered a feature, since it basically emulates hypnotoads kill worker behavior
18:40 sri should the connection close be delayed by buffering there would be different behavior
18:43 abra joined #mojo
18:48 xaka i think there is one more case. anyway controller generates the completed response, any size. Then it's buffered and flushed at the end. Does it mean we need 2x more memory to keep the response befure the buffer will be flushed?
18:54 marcus xaka: 2x more than what?
18:55 xaka marcus: response object holds the copy of response and client's connection holds the copy of response in the buffer
18:55 xaka *response body
18:55 Foxcool joined #mojo
18:55 marcus xaka: So you mean 'do we need 2x more than the response body'?
18:56 sri the buffer only contains one chunk at a time
18:56 sri it is roughly length($big_blob_response) + CHUNK_SIZE
18:57 sri unless the asset is stored in a file, then it's just CHUNK_SIZE
19:04 jnap joined #mojo
19:04 marcus Seems like there's a discussion about splitscreens in TM2 alpha going on.
19:04 marcus apparently Allan doesn't see the need
19:05 sri he needs to release it!
19:05 marcus https://gist.github.com/1448081
19:06 marcus it's coming before christmas, apparently
19:06 sri lets hope
19:09 sri http://it.slashdot.org/story/11/12/​08/1341224/another-dutch-ca-hacked # lol
19:11 marcus yay ssl
19:11 marcus yay phpmyadmin
19:12 marcus yay syadmin retards
19:12 marcus sysadmin even
19:12 sri yay mysql
19:18 marcus damn you, peer
19:18 xaka joined #mojo
19:19 xaka joined #mojo
19:25 vervain joined #mojo
19:27 jnap joined #mojo
19:56 yaxar joined #mojo
20:42 marcus sri: Any chance you could review http://www.google-melange.com/gci​/task/view/google/gci2011/7134464 to see if it's a decent translation?
20:42 marcus my german skillz are way too puny.
20:47 MojoGuest315 joined #mojo
20:47 MojoGuest315 From: http://blog.kraih.com/perl-is-ready-for-html5 (55 hits)
20:48 MojoGuest598 joined #mojo
20:49 MojoGuest598 hkjfhf
20:50 MojoGuest804 joined #mojo
20:50 MojoGuest804 From: http://blog.kraih.com/perl-is-ready-for-html5 (56 hits)
21:23 sri marcus: not gonna do anything that's not mongodb related for a bit
21:24 marcus anyone else in here with german skills that are more concerned with cute perl hacking kids than sri is?
21:24 sri quite a few actually
21:24 marcus WON'T SOMEONE THINK OF THE CHILDREN?
21:25 * sri pokes DaTa, rhaen, gabb, fhelmber_, Patterner, plu and all the other germans lurking around here
21:26 Patterner this isn't facebook, sri :P
21:26 sri WHY NOT?
21:26 Patterner because it's IRC
21:26 sri i see
21:27 vervain I don't think facebook invented poking. ;-)
21:27 marcus but it sure made it creepy
21:27 sri then please carry on with cybering and posting cute cat pictures
21:27 Patterner but they patented it and now sri has to pay a gazillion dollars.
21:28 * marcus puts on his hat and wizard robe
21:28 sri \o/
21:29 vervain Please help.. what am I doing wrong here: $self->ua->get('http://www.census.gov/main/www/popclock.html')->res->dom->at('span#usclocknum');
21:29 vervain $self = MJ::Lite.
21:30 vervain I've tried several different methods and incantations but I"m missing something here.
21:30 vervain It works up to ->at
21:31 sri purl: it doesn't work
21:31 purl It's a Y2K error!  Panic!  Sue!
21:31 sri that used to be a better one :/
21:31 sri purl: doesn't work
21:31 purl Look buddy, doesn't work is a strong statement. Does it sit on the couch all day? Is it making faces at you? Does it want more money? Is it sleeping with your girlfriend? Please be specific!
21:31 vervain ;-)
21:31 sri ah!
21:32 vervain Hey!  I did ask 'what am _I_ doing wrong. :-P
21:33 marcus vervain: Well, what are you expecting to happen, and what happens?
21:33 vervain I expect it to return something I can then call ->text on... but it's undefined.
21:35 vervain I'm just trying to play with at and other dom methods to get more of an idea what they do.
21:35 sri mojo get http://www.census.gov/main/www/popclock.html 'span#usclocknum'
21:36 sri that part seems fine
21:36 marcus perl -Mojo -E'say g("http://www.census.gov/main/www/popclock.html")->dom->at("span#usclocknum")->text'
21:36 marcus works fine here
21:37 * sri loves playing with selectors
21:37 vervain I'll be... the cmd line version works for me too.
21:42 vervain Swatting at imaginary flys again.
21:48 andrefs joined #mojo
22:04 yaxar joined #mojo
22:16 j3nnn1 joined #mojo
22:31 yaxar i am getting this error http://pastie.org/2988313 how should i fix it?
22:35 andrefs joined #mojo
22:38 tempire http://procatinator.com
22:38 tempire http://procatinator.com/?cat=48
22:40 marcus yaxar: Install Mojolicious?
22:40 yaxar okay thanks
22:40 yaxar :)
22:40 sri tempire: lol
22:46 jnap joined #mojo
23:02 D4RK-PH0ENiX joined #mojo
23:50 yaxar is their a irc lib for mojo

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