#49765 Async operations can hang when the server is running nunc-stans
Closed: wontfix 6 years ago Opened 6 years ago by tbordaz.

Issue Description

This bug is a side effect of https://pagure.io/389-ds-base/issue/48184

With async operations on the same connection, the connection can be set several times in read_ready. This is done with connection_threadmain scheduling ns_handle_pr_read_ready (connection_make_readable_nolock).

When there is no more activity on the connection (no new req, timeout, closure..) and the server is listening to it (ns_handle_pr_read_ready), then if an async operation tries to schedule ns_handle_pr_read_ready it will hang (before completing the operation).

The consequence is one or more hanging operations on the connection with a stack like

Thread 63 (Thread 0x7f794a711700 (LWP 28798)):
#0  0x00007f7995e75c93 in select () from /lib64/libc.so.6
#1  0x00007f7998e8046b in DS_Sleep (ticks=100) at 389-ds-base/ldap/servers/slapd/util.c:1086
#2  0x0000000000438a6a in ns_connection_post_io_or_closing (conn=0x7f79550fc800) at 389-ds-base/ldap/servers/slapd/daemon.c:1835
#3  0x0000000000427adc in connection_make_readable_nolock (conn=0x7f79550fc800) at 389-ds-base/ldap/servers/slapd/connection.c:1361                                                                                              
#4  0x0000000000429e91 in connection_threadmain () at 389-ds-base/ldap/servers/slapd/connection.c:1724
#5  0x00007f7996a0907b in _pt_root () from /lib64/libnspr4.so
#6  0x00007f79965ab36d in start_thread () from /lib64/libpthread.so.0
#7  0x00007f7995e7fb4f in clone () from /lib64/libc.so.6

A way to mitigate the problem is to set a idletimeout

Package Version and Platform

1.3.7, 1.3.8 and master

Steps to reproduce

test case is not systematic.
On rapid machine, it hangs one out of ten

Actual results

Some operations are not completing (hanging)

Expected results

Should not hang


Metadata Update from @tbordaz:
- Issue assigned to tbordaz

6 years ago

cfb7dc2 -> master

dae67ab..e79dc73 389-ds-base-1.3.8 -> 389-ds-base-1.3.8

8d364e9..8906dcb 389-ds-base-1.3.7 -> 389-ds-base-1.3.7

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

6 years ago

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

6 years ago

Fixing compiler warning. Thanks Mark !!

68cf69c..2a82ad2 master -> master
e79dc73..a2e752b 389-ds-base-1.3.8 -> 389-ds-base-1.3.8
8906dcb..f15396a 389-ds-base-1.3.7 -> 389-ds-base-1.3.7

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

6 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/2824

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)

4 years ago

Log in to comment on this ticket.

Metadata