[omniORB] RE: serious stability problems with omniORB4 snapshots on Solaris 8: bug located!
Bastiaan Bakker
Bastiaan.Bakker@lifeline.nl
Tue, 5 Feb 2002 10:42:48 +0100
This is a multi-part message in MIME format.
------_=_NextPart_001_01C1AE29.78A64B6A
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I've created a small patch to work around the EBADF problem. As I =
suggested yesterday, it simply retries the fd_set creation and select() =
in case of EBADF. In a couple of quick tests, using 20 concurrent =
eg2_clts it retries once every 1000 to 4000 SocketCollection::Select() =
calls. Of course on very busy systems this figure may become =
impractically worse.
Please let me know what you think.
Cheers,
Bastiaan Bakker
LifeLine Networks bv
=20
------_=_NextPart_001_01C1AE29.78A64B6A
Content-Type: application/octet-stream;
name="omniORB4.EBADF.patch"
Content-Transfer-Encoding: base64
Content-Description: omniORB4.EBADF.patch
Content-Disposition: attachment;
filename="omniORB4.EBADF.patch"
SW5kZXg6IHNyYy9saWIvb21uaU9SQi9vcmJjb3JlL1NvY2tldENvbGxlY3Rpb24uY2MKPT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PQpSQ1MgZmlsZTogL2N2c3Jvb3Qvb21uaS9zcmMvbGliL29tbmlPUkIvb3JiY29yZS9BdHRp
Yy9Tb2NrZXRDb2xsZWN0aW9uLmNjLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjEuMi40CmRpZmYg
LXUgLXIxLjEuMi40IFNvY2tldENvbGxlY3Rpb24uY2MKLS0tIFNvY2tldENvbGxlY3Rpb24uY2MJ
MjAwMS8wOC8yNCAxNTo1Njo0NAkxLjEuMi40CisrKyBTb2NrZXRDb2xsZWN0aW9uLmNjCTIwMDIv
MDIvMDUgMDk6MjQ6MjIKQEAgLTIwNiw1NSArMjA2LDYyIEBACiAgIHN0cnVjdCB0aW1ldmFsIHRp
bWVvdXQ7CiAgIGZkX3NldCAgICAgICAgIHJmZHM7CiA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