[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6103) canceled operations do not respond



Full_Name: Hallvard B Furuseth
Version: HEAD
OS: Linux
URL: 
Submission from: (NULL) (129.240.6.233)
Submitted by: hallvard


RFC 3909 says both the Cancel operation and the canceled operation
shall respond.  However I'm getting tooLate reply from Cancel
and no response from the successfully cancelled operation:

slapd.conf:
  include   servers/slapd/schema/core.schema
  database  null
  suffix   "cn=null"
client:
  DEL cn=null
  sleep 0.1 sec
  CANCEL <previous op>
  sleep 0.2 sec
  UNBIND
receives the folllowing statslog:
  conn=1 fd=9 ACCEPT from IP=127.0.0.1:48774 (IP=127.0.0.1:3890)
  conn=1 op=0 DEL dn="cn=null"
  conn=1 op=1 EXT oid=1.3.6.1.1.8
  conn=1 op=1 CANCEL msg=1
  conn=1 op=0 ABANDONED
  conn=1 op=1 RESULT oid= err=120 text=
  conn=1 op=2 UNBIND
  conn=1 fd=9 closed
and the client gets just ExtendedResponse tooLate before connection closes

with the following patch to slapd:

Index: delete.c
--- delete.c	21 Jan 2009 23:40:26 -0000	1.144
+++ delete.c	9 May 2009 22:06:07 -0000
@@ -75,4 +75,9 @@
 		op->o_log_prefix, op->o_req_dn.bv_val, 0, 0, 0 );
 
+	{
+		struct timeval timeout = { 0, 200000 };
+		select(0, NULL, NULL, NULL, &timeout);
+	}
+
 	if( op->o_req_ndn.bv_len == 0 ) {
 		Debug( LDAP_DEBUG_ANY, "%s do_delete: root dse!\n",
Index: result.c
--- result.c	14 Mar 2009 05:47:43 -0000	1.329
+++ result.c	9 May 2009 22:06:07 -0000
@@ -418,4 +418,6 @@
 	if ( rs->sr_err == SLAPD_ABANDON || op->o_abandon ) {
 		rc = SLAPD_ABANDON;
+		Statslog( LDAP_DEBUG_STATS,
+			"%s ABANDONED\n", op->o_log_prefix, 0, 0, 0, 0 );
 		goto clean2;
 	}