readRequestBody hangs indefinitely #200

Closed
lukerandall opened this Issue Jun 17, 2014 · 1 comment

Comments

Projects
None yet
2 participants

With a new brand new snap project, add the following:

readHandler :: Handler App App ()
readHandler = do
    val <- readRequestBody 5000
    writeBS $ val ^. strict

Requests to this handler hang: nothing is logged to access.log, the request does not terminate after timeout, no response is received and all further requests likewise hang.

This is with snap HEAD, GHC 7.8.2 on Mac OS X.

Excerpted from cabal

  build-depends:
    base                      >= 4.4     && < 5,
    bytestring                >= 0.10    && < 0.11,
    heist                     >= 1.0     && < 1.1,
    lens                      >= 4.0     && < 4.2,
    monad-control             >= 0.3     && < 0.4,
    mtl                       >= 2       && < 3,
    snap                      >= 1.0     && < 1.1,
    snap-core                 >= 1.0     && < 1.1,
    snap-loader-static        >= 1.0     && < 1.1,
    snap-server               >= 1.0     && < 1.1,
    text                      >= 0.11    && < 1.2,
    transformers              >= 0.3     && < 0.4,
    time                      >= 1.1     && < 1.5,
    xmlhtml                   >= 0.1
Owner

gregorycollins commented Jun 20, 2014

Minimal repro example: https://github.com/snapframework/snap-hang-repro-bug

I can't reproduce this with the Snap monad, it happens only with Snaplets. I think there's an infinite loop in there somewhere. @mightybyte

@imalsogreg imalsogreg referenced this issue in snapframework/snap Jun 25, 2014

Merged

New testsuite #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment