Closed Bug 220806 Opened 22 years ago Closed 7 months ago

timeout not enforced for I/O

Categories

(Directory Graveyard :: LDAP C SDK, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mcs, Assigned: mcs)

Details

If a caller specifies a timeout when calling a function like ldap_search_ext() the timeout is not enforced at the I/O level. This can cause the call to block for a much longer time than the timeout. I think this is a general problem, although I saw the problem when using the ldapsearch utility on Solaris in SSL mode to talk to a hung LDAP server. Here is a stack trace: [1] _poll(0xffbeb7f8, 0x1, 0x1388, 0x0, 0x1bb9c, 0x7f517344), at 0x7f51d2a4 [2] poll(0xffbeb8f0, 0x24cd0, 0x0, 0x0, 0x1bb9c, 0x7f517344), at 0x7fa4aee8 [3] pt_Continue(op = 0xffbeb8f0), line 715 in "ptio.c" [4] pt_Recv(fd = 0x3c330, buf = 0x7290c, amount = 3, flags = 0, timeout = 4294967295U), line 1833 in "ptio.c" [5] ssl_DefRecv(ss = 0x72728, buf = 0x7290c "", len = 3, flags = 0), line 91 in "ssldef.c" [6] ssl2_GatherData(ss = 0x72728, gs = 0x728cc, flags = 0), line 114 in "sslgathr.c" [7] ssl2_GatherRecord(ss = 0x72728, flags = 0), line 390 in "sslgathr.c" [8] ssl_GatherRecord1stHandshake(ss = 0x72728), line 1259 in "sslcon.c" [9] ssl_Do1stHandshake(ss = 0x72728), line 145 in "sslsecur.c" [10] ssl_SecureSend(ss = 0x72728, buf = 0x7231c "0G^B^A^A`#^B^A^C^D^Tcn=directory manager\x", len = 73, flags = 0), line 1024 in "sslsecur.c" [11] ssl_Send(fd = 0x3c350, buf = 0x7231c, len = 73, flags = 0, timeout = 4294967295U), line 1222 in "sslsock.c" [12] PR_Send(fd = 0x3c350, buf = 0x7231c, amount = 73, flags = 0, timeout = 4294967295U), line 221 in "priometh.c" =>[13] prldap_write(s = 1, buf = 0x7231c, len = 73, socketarg = 0x691d8), line 195 in "ldappr-io.c" [14] ber_flush(sb = 0x719f0, ber = 0x721f8, freeit = 0), line 400 in "io.c" [15] nsldapi_ber_flush(ld = 0x71838, sb = 0x719f0, ber = 0x721f8, freeit = 0, async = 1), line 328 in "request.c" [16] nsldapi_send_server_request(ld = 0x71838, ber = 0x721f8, msgid = 1, parentreq = (nil), srvlist = (nil), lc = 0x3dc88, bindreqdn = 0x3c390 "cn=directory manager", bind = 0), line 274 in "request.c" [17] nsldapi_send_initial_request(ld = 0x71838, msgid = 1, msgtype = 96U, dn = 0x72170 "cn=directory manager", ber = 0x721f8), line 134 in "request.c" [18] ldap_sasl_bind(ld = 0x71838, dn = 0x72170 "cn=directory manager", mechanism = (nil), cred = 0xffbec3ec, serverctrls = 0xffbec478, clientctrls = (nil), msgidp = 0xffbec36c), line 151 in "saslbind.c" [19] ldaptool_sasl_bind_s(ld = 0x71838, dn = 0x72170 "cn=directory manager", mechanism = (nil), cred = 0xffbec3ec, serverctrls = 0xffbec478, clientctrls = (nil), servercredp = (nil), msg = 0x29024 "ldap_simple_bind"), line 1230 in "common.c" [20] ldaptool_simple_bind_s(ld = 0x71838, dn = 0x72170 "cn=directory manager", passwd = 0x3c8a0 "secret12", serverctrls = 0xffbec478, clientctrls = (nil), msg = 0x29024 "ldap_simple_bind"), line 1253 in "common.c" [21] ldaptool_bind(ld = 0x71838), line 1076 in "common.c" [22] main(argc = 21, argv = 0xffbec59c), line 220 in "ldapsearch.c" The original ldapsearch command included a -l 60 argument.
Priority: -- → P2
Target Milestone: --- → 5.13
-> TM 5.14
Target Milestone: 5.13 → 5.14
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.