https://bugs.openldap.org/show_bug.cgi?id=9803

--- Comment #5 from [email protected] <[email protected]> ---
Created attachment 879
  --> https://bugs.openldap.org/attachment.cgi?id=879&action=edit
testcase

# g++ t.cpp -Wall -O0 -ggdb3 -std=gnu++17 -lldap -lpthread && ./a.out
6217 searches
6221 searches
ret -2
a.out: io.c:514: ber_get_next: Assertion `ber->ber_buf == NULL' failed.
Aborted (core dumped)

I don't see an immediate API misuse, so maybe this is a race/threading issue.
The ldap_debug outputs text, but not all lines contain "ld 0x" to tell which
thread it comes from.


ldap_search_ext
put_filter: "mail=xx"
put_filter: default
put_simple_filter: "mail=xx"
ldap_build_search_req ATTRS:
ldap_send_initial_request
ldap_send_server_request
ldap_result ld 0x7fff8c003ef0 msgid 7
wait4msg ld 0x7fff8c003ef0 msgid 7 (infinite timeout)
wait4msg continue ld 0x7fff8c003ef0 msgid 7 all 1
** ld 0x7fff8c003ef0 Connections:
* host: x1  port: 389  (default)
* from: IP=192.168.129.200:60382
  refcnt: 2  status: Connected
  last used: Fri Mar  4 00:00:18 2022

** ld 0x7fff8c003ef0 Outstanding Requests:
 * msgid 7,  origid 7, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x7fff8c003ef0 request count 1 (abandoned 0)
** ld 0x7fff8c003ef0 Response Queue:
   Empty
  ld 0x7fff8c003ef0 response count 0
ldap_chkResponseList ld 0x7fff8c003ef0 msgid 7 all 1
ldap_chkResponseList returns ld 0x7fff8c003ef0 NULL
ldap_int_select
read1msg: ld 0x7fff8c003ef0 msgid 7 all 1
wait4msg continue ld 0x7fff8c003ef0 msgid 7 all 1
** ld 0x7fff8c003ef0 Connections:
* host: x1  port: 389  (default)
* from: IP=192.168.129.200:60382
  refcnt: 2  status: Connected
  last used: Fri Mar  4 00:00:18 2022


** ld 0x7fff8c003ef0 Outstanding Requests:
 * msgid 7,  origid 7, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x7fff8c003ef0 request count 1 (abandoned 0)
** ld 0x7fff8c003ef0 Response Queue:
   Empty
  ld 0x7fff8c003ef0 response count 0
ldap_chkResponseList ld 0x7fff8c003ef0 msgid 7 all 1
ldap_chkResponseList returns ld 0x7fff8c003ef0 NULL
ldap_int_select
read1msg: ld 0x7fff8c003ef0 msgid 7 all 1
(ret=-2 occurring)

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to