#50636 Crash during sasl bind
Closed: wontfix 4 years ago by tbordaz. Opened 4 years ago by tbordaz.

Issue Description

Sasl bind push on the connection an IO layer (sasl_IoMethods) on top of the TCP methods.
This is done in two phases. On phase during the sasl bind is to register the methods to push.
The next incoming operation will push the new methods and use them to read the operation.

The synchronization between push and register phases should be improved as in some cases the set of registered methods is not complete when an operation can push it.

Package Version and Platform

all version

Steps to reproduce

Still working on it but should be difficult

Actual results

server crashes

Expected results

Should not crash


The typical conflicting threads are looking like

# Thread trying to send bind result
Thread 1 (...):
#0  0x00007efed93ca357 in pl_DefPoll (...) at ../../../nspr/pr/src/io/prlayer.c:290
#1  0x00007efed93dfa58 in _pr_poll_with_poll (...) at ../../../nspr/pr/src/pthreads/ptio.c:3919
#2  0x00007efed93e28d5 in PR_Poll (...) at ../../../nspr/pr/src/pthreads/ptio.c:4426
#3  0x000055888103f6ad in slapd_poll (...) at ldap/servers/slapd/daemon.c:1960
#4  0x000055888103f6ad in write_function (...) at ldap/servers/slapd/daemon.c:2001
#5  0x000055888103f6ad in openldap_write_function (...) at ldap/servers/slapd/daemon.c:2078
#6  0x00007efed9f9492e in ber_int_sb_write (...) at sockbuf.c:445
#7  0x00007efed9f90c0b in ber_flush2 (...) at io.c:246
#8  0x00007efed9f90d1d in ber_flush (...) at io.c:211
#9  0x00007efedb642c2c in flush_ber (...) at ldap/servers/slapd/result.c:1761
#10 0x00007efedb644e30 in send_ldap_result_ext (...) at ldap/servers/slapd/result.c:600
#11 0x00007efedb644ff1 in send_ldap_result (...) at ldap/servers/slapd/result.c:199
#12 0x000055888104eddd in ids_sasl_check_bind (...) at ldap/servers/slapd/saslbind.c:1125
#13 0x0000558881036ad1 in do_bind (...) at ldap/servers/slapd/bind.c:363

# Thread handling a new incoming event on the same connection (...)
Thread 108 (...):
#0  0x00007efed8d8a54d in __lll_lock_wait (...) at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007efed8d85ed1 in _L_lock_1093 (...) at /lib64/libpthread.so.0
#2  0x00007efed8d85e72 in __GI___pthread_mutex_lock (...) at ../nptl/pthread_mutex_lock.c:133
#3  0x00007efed93dde59 in PR_Lock (...) at ../../../nspr/pr/src/pthreads/ptsynch.c:171
#4  0x000055888103c347 in connection_read_operation (...) at ldap/servers/slapd/connection.c:1211
#5  0x000055888103c997 in connection_threadmain (...) at ldap/servers/slapd/connection.c:1628
#6  0x00007efed93e3bfb in _pt_root (...) at ../../../nspr/pr/src/pthreads/ptthread.c:201
#7  0x00007efed8d83ea5 in start_thread (...) at pthread_create.c:307
#8  0x00007efed842f8cd in clone (...) at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Metadata Update from @tbordaz:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None

4 years ago

Metadata Update from @tbordaz:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1756182

4 years ago

Metadata Update from @tbordaz:
- Issue assigned to tbordaz

4 years ago

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.3.8

4 years ago

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.3.9 (was: 1.3.8)

4 years ago

3be2a20..66cfa2a 389-ds-base-1.3.10 -> 389-ds-base-1.3.10

This needs to go into 1.4.1 and 1.4.0 as well

This fix is already in master, 1.4.2 and 1.3.10

backport in 1.4.1
7a0be4e..2f193eb 389-ds-base-1.4.1

Metadata Update from @tbordaz:
- Issue set to the milestone: 1.3.10 (was: 1.3.9)

4 years ago

Metadata Update from @tbordaz:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3691

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

3 years ago

Login to comment on this ticket.

Metadata