09:00:27 <etarasov> Hi
09:02:44 <etarasov> I have a small issue with happstack-server-tls. Sometimes then I make a request to a program, it crashes with message "SSL_accept: resource vanished (Connection reset by peer)"
09:02:54 <etarasov> can you please help me?
09:05:43 <donri> etarasov: IIRC that was a useless error that was silenced in a later version. are you using latest versions?
09:11:57 <etarasov> it seems I'm not
09:12:22 <etarasov> thanks, I'll try to recompile it using 7.0.1
09:14:44 <etarasov> no, it was builded with the latest package
09:19:32 <etarasov> looks like the issue appeared in happstack-server-tls-7.0.1, because old builds of my program with happstack-server-tls-7.0.0 work fine
09:19:37 <etarasov> i'll check it again
11:16:26 <etarasov> crashed both with happstack-server-tls-7.0.0 and 7.0.1
18:31:26 <Palmik> Hmm, this looks interesting https://github.com/jonsterling/Data.Records
18:58:04 <stepcut> etarasov: what do you mean by crashes? Most of the time that 'error' simply means that the browser abruptly closed its end of the connection (which it is allowed to do) and is completely harmless
18:58:25 <stepcut> etarasov: so.. I am wondering what other symptoms, if any, you are seeing
19:06:36 <stepcut> Palmik: yeah. I ♥ extensible records. I wonder what the type errors are like though.. that is usually the problem with systems built on top of the current type-checker. The upside, though, is that if you can build it using the current type checker, it is easier to add official support
19:12:33 <etarasov> stepcut: I mean that a program is just stopping when the error happens
19:12:54 <stepcut> well, that soundsbad
19:14:12 <etarasov> there are other similar 'errors' and they are really harmless
19:14:45 <stepcut> any idea what is different about the times that it hangs?
19:16:02 <etarasov> the error with substing 'SSL_accept' always leads to crash
19:17:18 <stepcut> ah
19:17:30 <stepcut> that makes sense
19:17:51 <stepcut> SSL.accept is raising an error that we don't catch, so it aborts the accept loop
19:18:09 <stepcut> actually.. we catch it and reraise it
19:18:10 <stepcut> one moment
19:18:28 <etarasov> sounds reasonable
19:18:42 <stepcut> http://hub.darcs.net/stepcut/happstack/browse/happstack-server-tls/src/Happstack/Server/Internal/TLS.hs
19:18:47 <stepcut> look at line 91
19:19:17 <etarasov> yes
19:20:06 <stepcut> and also line 147
19:21:23 <stepcut> in line 153 is where we should catch some exceptions and ignore others
19:22:50 <stepcut> so maybe in 177 should ignore some additional exceptions
19:23:24 <stepcut> oh, hmm, we ignore all ssl errors in line 178
19:23:35 <etarasov> so, I encountered an exception which is not SomeSSLException ?
19:23:54 <stepcut> though, resource vanished is probably not an SSL error here, just the normal error
19:24:34 <stepcut> I feel like line 182 needs to be:
19:24:55 <stepcut> if isFullError e || isDoesNotExistError e || isResourceVanishedError e
19:25:42 <etarasov> it's defined but never used?
19:25:45 <stepcut> yeah..
19:26:24 <stepcut> in some ways it seems like we want to ignore all exceptions and try to keep going
19:27:27 <stepcut> the current code implies that for some exceptions, we want to stop trying to handle requests because that is somehow going to be better
19:28:09 <etarasov> I can handle the exception in my code, no problem
19:28:16 <stepcut> another option would be to change line 181 so that it just ignores all IO exceptions and keeps going
19:29:08 <stepcut> but, we could start by just ignoring the resource vanished in line 182 and see if that fixes your issue
19:29:16 <stepcut> if so, I can patch it and release an updated version
19:30:29 <etarasov> ok, I'll try to test the patch
19:30:41 <etarasov> I mean 'if isFullError e || isDoesNotExistError e || isResourceVanishedError e'
19:31:51 <etarasov> btw, I get the error on centos 5, and the same code works well on centos 6
19:32:27 <stepcut> k
19:35:06 <stepcut> I am going to make breakfast, bbiab.
22:57:44 <etarasov> stepcut: thanks for help, but I'll test the patch tomorrow or later, it's 5 am here