[Haskell-cafe] Project postmortem

Joel Reymont joelr1 at gmail.com
Fri Nov 18 10:31:14 EST 2005


This is not quite the error that I was expecting but they could be  
related, I'm not sure. In any case, you can retrieve the repro  
project thusly:

darcs get http://test.wagerlabs.com/postmortem

You need OpenSSL to build these so don't forget to add -lssl -lcrypto  
to either ghc or ghci.

I would appreciate if we could all collectively look at this as  
things are either wierd or I'm missing something obvious. I will  
apply any patches sent to me.

I run like this:

ghci -fglasgow-exts -lssl -lcrypto
:l Server

ghci -fglasgow-exts -lssl -lcrypto
:l Client

I get in the server window:

interactive: unknown exception

14:51:39: ThreadId 1: Accepted new connection: {handle: <socket: 5>}
14:51:39: ThreadId 1: Verify locations: 1
14:51:39: ThreadId 1: sslGetError: 2
14:51:39: ThreadId 4: Starting SSL handshake...
14:51:39: ThreadId 4: Reading from BIO...
14:51:39: ThreadId 4: Waiting for BIO 0x01108670
14:51:39: ThreadId 4: waitForBio: gotta wait a bit...

If you look at SSL.hs you will see that I'm calling threadDelay right  
after this message. No other messages are produced. This tells me  
that threadDelay is throwing an exception.

Why would it, though? And how can I tell what the exception is? If I  
comment out the threadDelay then I get the exception somewhere in the  
expect code after bytes are sent to the other side.

Overall, my intent is to get this to work for 1 thread and then try,  
say, 5 or 10 thousand.

	Thanks, Joel

More information about the Haskell-Cafe mailing list