<div dir="ltr"><div><div><div>Hello dear GHC developers,<br><br></div>I have recently experienced what I believe to be a bug either in GHC or in Warp library (if it is indeed in Warp then sorry for posting to wrong mailing list). I've managed to shrink it to a few lines of code and publish on a GitHub. Here is the link: <a href="https://github.com/anton-dessiatov/warp-ghc-issue">https://github.com/anton-dessiatov/warp-ghc-issue</a><br><br></div>What I wanted to do is to establish network connection in my code and then at some point pass it to Warp for further processing. What I got is that after successfully processing first HTTP request my program consumes 100% CPU and eventually crashes with an error like this:<br><br>*** Error in `/home/farnsworth/work/warp-ghc-issue/.stack-work/install/x86_64-linux/lts-5.5/7.10.3/bin/warp-ghc-issue': double free or corruption (!prev): 0x00000000016214b0 ***<br>Aborted (core dumped)<br><br></div>When compiled with -debug I see another message:<br><div><br>repro: internal error: ASSERTION FAILED: file rts/Schedule.h, line 137<br><br>    (GHC version 7.10.3 for x86_64_unknown_linux)<br>    Please report this as a GHC bug:  <a href="http://www.haskell.org/ghc/reportabug">http://www.haskell.org/ghc/reportabug</a><br>Aborted (core dumped)<br><br></div><div>I tried to debug it by enabling -dcore-lint and -debug in my ~/.stack/config.yaml and what worries me is that in this case Warp itself doesn't compile (tried with 7.10.2 and 7.10.3) giving core lint failure in Network.Wai.Handler.Warp.HTTP2.Worker. Not sure if it is relevant, but looks suspicious.<br><br></div><div>Could anybody please try building my code on x64 Linux, run it, open localhost:8080 in a web browser and confirm that there is indeed a bug?<br><br></div><div>Regards,<br></div><div>  Anton.<br></div></div>