yesodweb / yesod

A RESTful Haskell web framework built on WAI.
http://www.yesodweb.com/
MIT License
2.64k stars 373 forks source link

wai-handler-devel segfaults #60

Closed iand675 closed 13 years ago

iand675 commented 13 years ago

I haven't been able to track it down where it's happening exactly, but here's what I do know:

I ran the generator to create a fresh app with a fresh install of GHC 7.0.3. Upon running

wai-handler-devel 3000 Controller withApp --yesod

I received the following output:

Attempting to interpret your app...
Interpreting success, new app loaded
GET /
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Segmentation fault: 11

OS X 10.6 GHC 7.0.3

Packages installed by yesod & cabal install of app:

 JSONb-1.0.4
 RSA-1.0.6.1
 SHA-1.4.1.3
 asn1-data-0.4.6
 attempt-0.3.0
 attoparsec-0.8.5.2
 attoparsec-enumerator-0.2.0.3
 authenticate-0.8.2.2
 base64-bytestring-0.1.0.2
 binary-0.5.0.2
 blaze-builder-0.2.1.4
 blaze-builder-enumerator-0.2.0.2
 blaze-html-0.4.1.0
 bytestring-nums-0.3.2
 bytestring-trie-0.2.3
 cereal-0.3.0.0
 certificate-0.7.0
 clientsession-0.4.1
 control-monad-attempt-0.3.0
 convertible-text-0.3.0.9
 cookie-0.0.0
 crypto-api-0.5.2
 cryptocipher-0.2.8
 cryptohash-0.7.0
 data-default-0.2.0.1
 data-object-0.3.1.6
 data-object-json-0.3.1.6
 dataenc-0.13.0.5
 deepseq-1.1.0.2
 email-validate-0.2.6
 enumerator-0.4.9.1
 failure-0.1.0.1
 file-embed-0.0.3.1
 hamlet-0.7.3
 hjsmin-0.0.14
 http-enumerator-0.3.1
 json-enumerator-0.0.1.1
 json-types-0.1
 language-javascript-0.4.4
 mime-mail-0.1.0.1
 monad-peel-0.1
 mtl-2.0.1.0
 network-2.2.1.10
 network-bytestring-0.1.3.4
 parsec-3.1.1
 persistent-0.4.2
 persistent-sqlite-0.4.0
 pool-0.0.1.1
 primitive-0.3.1
 pureMD5-2.1.0.3
 ranges-0.2.3
 sendfile-0.7.3
 stm-2.2.0.1
 tagged-0.2
 tagsoup-0.12
 text-0.11.0.7
 tls-0.3.3
 transformers-0.2.2.0
 unix-compat-0.2.1.1
 utf8-light-0.4
 utf8-string-0.3.6
 vector-0.7.0.1
 wai-0.3.2
 wai-app-static-0.0.1.4
 wai-extra-0.3.3
 warp-0.3.3
 web-routes-0.23.4
 web-routes-quasi-0.6.3.1
 xml-1.3.7
 xss-sanitize-0.2.6
 yesod-0.7.3
 yesod-auth-0.3.2
 yesod-core-0.7.0.2
 yesod-form-0.0.0.2
 yesod-json-0.0.0.1
 yesod-persistent-0.0.0.1
 yesod-static-0.0.0.1
 zlib-0.5.3.1
 zlib-bindings-0.0.0
iand675 commented 13 years ago

Also of note, running $(appname)-test instead works fine.

snoyberg commented 13 years ago

If it's a segfault, it's almost certainly not code from Yesod. The one exception would be the database backend. Which one are you using?

iand675 commented 13 years ago

sqlite

iand675 commented 13 years ago

However, I've tried it on a database-free app as well and still get a segfault. I'm not saying it's yesod specifically, but just wanted to make you aware.

snoyberg commented 13 years ago

Understood, just trying to diagnose. If you get any more information on this, please let me know. In the meanwhile, I think the major goal for Yesod 0.9 will be to overhaul wai-handler-devel. I have a few ideas of how to do that...

iand675 commented 13 years ago

After a lot of poking around, it seems that it's a bug in Hint. Good call.

snoyberg commented 13 years ago

Can you send a bug report either to the author of the cafe?

iand675 commented 13 years ago

Still doing a little investigation to get more details, will file report soon.

jgreene commented 13 years ago

I'm having the same problem. Running ubuntu 10.10 64bit on VirtualBox with a Windows 7 host.

Fresh install of GHC 7.02 and the haskell-platform-2011.2.0.0.

The error is: Attempting to interpret your app... Interpreting success, new app loaded GET /auth/page/email/register Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8

Segmentation fault

And looking into /var/log/syslog I find this error: Apr 8 08:45:41 ubuntu kernel: [60503.892516] wai-handler-dev[2445] general protection ip:43429d58 sp:7fa68f0f9de0 error:0 in HSnetwork-2.2.1.10.o[4340f000+132000]

snoyberg commented 13 years ago

I know there were a few issues with GHC 7.02. Can you try again with 7.03?

jgreene commented 13 years ago

I upgraded GHC to 7.03 and followed the yesod in 5 minutes steps, also unregistering wai-0.4.0 and I'm still getting a segmentation fault.

snoyberg commented 13 years ago

OK, sounds like more motivation to me to do the overhaul of wai-handler-devel then. I don't think fixing Hint will be an easy task. Thanks for checking on the new version.