Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Intermittent crash/hang with TLS on Windows under poor network conditions #191
I can get a simple http-conduit program to crash or hang fairly often when the connection has occasional data corruption. I've also observed the hang when only simulating packet loss. Here's a repo with my test case. The program is tiny:
module Main where import Network.HTTP.Conduit import qualified Data.ByteString.Lazy.Char8 as LC8 main :: IO () main = do man <- newManager tlsManagerSettings req <- parseUrl "https://s3.amazonaws.com/hackage.fpcomplete.com/package/lens-4.12.3.tar.gz" response <- httpLbs req man LC8.putStrLn $ responseBody response
Using Clumsy in tamper mode set to 20%, it'll crash or hang maybe half the time.
When I instrument API calls with API Monitor I can see that the crashes happen immediately after a call to
The same thing with a cleartext HTTP connection is no problem. I also set up a simple cleartext HTTP server on a Linux machine and injected RSTs with
I found this in the course of debugging commercialhaskell/stack#1689 (in the course of getting Idris building on AppVeyor). Stack hasn't ever crashed on me, but it seems likely the hangs and crashes in the simple http-conduit program are related to the hangs in Stack.
You may have to run it several times. When it crashes you should see the Windows crash dialog and if you have Visual Studio installed, an offer to open a debugger.
Let me know if there's more I can do to figure this out.
I recently heard about vincenthz/hs-tls#124
On Thu, Apr 21, 2016, 7:11 AM Echo Nolan firstname.lastname@example.org wrote:
It only happens when sockets are converted to handles, so if tls used
On Tue, May 3, 2016, 8:20 PM Michael Snoyman email@example.com
The crash happens before control returns from
On Sun, May 8, 2016, 11:55 AM Vincent Hanquez firstname.lastname@example.org
pushed a commit
May 19, 2016
This is the rabbit hole with no bottom. It's actually fixable in
@vincenthz Your change to
Awesome, thank you!
On Thu, Aug 4, 2016, 6:51 AM Echo Nolan email@example.com wrote: