network programming with GHC 7

Hello, When I compiled a network server with GHC 7 without the "-threaded" option and ran it, I got the following error. file descriptor 5496824 out of range for select (0--1024). I have read the paper "Scalable Event Handling for GHC" and understand that this new IO manger assumes the "-threaded" option. Does this mean that we need the "-threaded" option to GHC 7 for networking programming and GHC 7 does not maintain backward compatibility? If so, this should be documented. --Kazu

On Thu, Oct 28, 2010 at 2:16 AM, Kazu Yamamoto
When I compiled a network server with GHC 7 without the "-threaded" option and ran it, I got the following error.
file descriptor 5496824 out of range for select (0--1024).
I have read the paper "Scalable Event Handling for GHC" and understand that this new IO manger assumes the "-threaded" option.
The unthreaded runtime has a completely different I/O manager from the threaded one. We didn't touch the unthreaded runtime. Does your app work under earlier versions of GHC without -threaded?
Does this mean that we need the "-threaded" option to GHC 7 for networking programming and GHC 7 does not maintain backward compatibility?
No.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/28/10 05:16 , Kazu Yamamoto (山本和彦) wrote:
When I compiled a network server with GHC 7 without the "-threaded" option and ran it, I got the following error.
file descriptor 5496824 out of range for select (0--1024).
I would be extremely suspicious of memory corruption with an fd that large; it would indicate a kernel file table several tens of megabytes in size and a minimum 10MB per-process file table associated with every process (on Unix, but similar concerns probably apply on Windows). (Also, I thought the new I/O manager didn't use select(), specifically because it has annoying limitations like the above.) - -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzNwcsACgkQIn7hlCsL25V10ACdE6JOxEcTqbSarM0xnff3Bg7d 9Z0AoLPNWTCfJSF8BG7IDU6/Vghwcr/Q =Onzb -----END PGP SIGNATURE-----
participants (3)
-
Brandon S Allbery KF8NH
-
Bryan O'Sullivan
-
Kazu Yamamoto