Issue 8423 - Slapd hang when modifying the configuration and an accesslog purge is going on
Summary: Slapd hang when modifying the configuration and an accesslog purge is going on
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.43
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-13 16:21 UTC by elecharny@openldap.org
Modified: 2017-06-01 22:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description elecharny@openldap.org 2016-05-13 16:21:59 UTC
Full_Name: Emmanuel Lecharny
Version: 2.4.43
OS: RH7
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (92.169.142.218)


When the accessLog is being purged, a change in cn=config will wait until the
purge is done, which may take a while.

A typical trace :

...
Thread 7 (Thread 0x7f431bfff700 (LWP 57043)):D0D
#0  0000007f4863858fdd in fdatasync () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f48619db98d in mdb_env_sync (env=0xc63d20, force=0) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/back-mdb/../../../libraries/liblmdb/mdb.c:2474
#2  0x00007f48619de46e in mdb_txn_commit (txn=0xc36ed0) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/back-mdb/../../../libraries/liblmdb/mdb.c:3572
#3  0x00007f48619c06c6 in mdb_delete (op=0x7f431bffe4c0, rs=0x7f431bffe450) at
/home/build/sol_R_2.4.43.1/openldap/servs%s/slapd/back-mdb/delete.c:415
#4  0x00000000004d2b87 in overlay_op_walk (op=0x7f431bffe4c0, rs=0x7f431bffe450,
which=op_delete, oi=0xc96a80, on=0x0) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/backover.c:677
#5  0x00000000004d2db4 in over_op_func (op=0x7f431bffe4c0, rs=0x7f431bffe450,
which=op_delete) at /home/build/sol_R_2.4.43.1/openldap/servers/slapd/backover.c:730
#6  0x00000000004d2f6e in over_op_delete (op=0x7f431bffe4c0, rs=0x7f431bffe450)
at /home/build/sol_R_2.4.43.1/openldap/servers/slapd/backover.c:787
#7  0x00007f486136dfb2 in accesslog_purge (ctx=0x7f431bffebb0, arg=0xc8ee00) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/overlays/accesslog.c:700
#8  0x00007f48656ff7f3 in ldap_int_thread_pool_wrapper (xpool=0xbd5d80) at
/home/build/sol_R_2.4.43.1/openldap/libraries/libldap_r/tpool.c:956
#9  0x00007f4864e89182 in start_thread (arg=0x7f431bfff700) at
pthread_create.c:312
#10 0x00007f486386147d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111

...

Thread 4 (Thread 0x7f1a7f7fc700 (LWP 57046)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f4865700ed3 in ldap_pvt_thread_cond_wait (cond=0xbd5ce0,
mutex=0xbd5c88) at /home/build/sol_R_2.4.43.1/openldap/libraries/libldap_r/thr_posix.c:277
#2  0x00007f48656ffcb6 in handle_pause (tpool=0x76b500 <connection_pool>,
pause_type=96) at /home/build/sol_R_2.4.43.1/openldap/libraries/libldap_r/tpool.c:1106
#3  0x00007f48656ffdb6 in ldap_pvt_thread_pool_pause (tpool=0x76b500
<connection_pool>) at
/home/build/sol_R_2.4.43.1/openldap/libraries/libldap_r/tpool.c:1152
#4  0x0000000000428c3b in config_back_modify (op=0x7f43040008e0,
rs=0x7f431a7fba80) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/bconfig.c:5943
#5  0x0000000005e5e87e in fe_op_modify (op=0x7f43040008e0, rs=0x7f431a7fba80) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/modify.c:303
#6  0x000000000045e150 in do_modify (op=0x7f43040008e0, rs=0x7f431a7fba80) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/modify.c:177
#7  0x000000000043dcff in connection_operation (ctx=0x7f431a7fbbb0,
arg_v=0x7f43040008e0) at
/home/build/sol_R_2.4.43.1/openldap/servers/slapd/connection.c:1158
#8  0x000000000043e2a0 in connection_read_thread (ctx=0x7f431a7fbbb0, argv=0x63)
at /home/build/sol_R_2.4.43.1/openldap/servers/slapd/connection.c:1294
#9  0x00007f48656ff7f3 in ldap_int_thread_pool_wrapper (xpool=0xbd5d80) at
/home/build/sol_R_2.4.43.1/openldap/libraries/libldap_r/tpool.c:956
#10 0x00007864e4e89182 in start_thread (arg=0x7f431a7fc700) at
pthread_create.c:312
#11 0x00007f486386147d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111

The access_log purge should honor cn=config pause requests.
Comment 1 Howard Chu 2016-05-14 23:53:15 UTC
elecharny@apache.org wrote:
> Full_Name: Emmanuel Lecharny
> Version: 2.4.43
> OS: RH7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (92.169.142.218)
>
>
> When the accessLog is being purged, a change in cn=config will wait until the
> purge is done, which may take a while.
>

> The access_log purge should honor cn=config pause requests.
>
Fixed now in git master.
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2016-05-17 20:06:12 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 Quanah Gibson-Mount 2016-10-17 17:57:10 UTC
changed notes
changed state Test to Release
Comment 4 OpenLDAP project 2017-06-01 22:09:05 UTC
fixed in master
fixed in RE25
fixed in RE24 (2.4.45)
Comment 5 Quanah Gibson-Mount 2017-06-01 22:09:05 UTC
changed notes
changed state Release to Closed