Issue 8841 - Fix for an assertion error in back-meta
Summary: Fix for an assertion error in back-meta
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.5.4
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-25 13:54 UTC by Nadezhda Ivanova
Modified: 2019-07-24 19:01 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 Nadezhda Ivanova 2018-04-25 13:54:29 UTC
Full_Name: Nadezhda Ivanova
Version: 2.5
OS: 
URL: ftp://ftp.openldap.org/incoming/nadezhda-ivanova-180425-2.patch
Submission from: (NULL) (93.152.134.25)


This patch contains a fix for the following issue, reported by a customer.
When using back-meta, if a network interface towards a target becomes
unavailable (e.g disabling a virtual interface), back-meta fails an assert.


IPR for this patch:

The attached files are derived from OpenLDAP Software. All of the modifications
to OpenLDAP Software represented in the following patch were developed by Symas
Corporation. Symas Corporation has not assigned rights and/or interest in this
work to any party.
I, Nadezhda Ivanova, am authorized by Symas Corporation, my
employer, to release this work under the following terms.

The attached modifications to OpenLDAP Software are subject to the following
notice:

Copyright 2018 Symas Corporation
Redistribution and use in source and binary forms, with or without
modification,
are permitted only as authorized by the OpenLDAP Public License.
Comment 1 Nadezhda Ivanova 2019-02-14 13:27:37 UTC
A new patch with added comments has been added at
ftp://ftp.openldap.org/incoming/nadezhda-ivanova-190214.patch

More details about this issue:
The customer reported that when they simulated a "network unreachable" error, SLAPD exited with the following assertion error:

#0  0x00007fa1d19e4885 in raise () from /lib64/libc.so.6
#1  0x00007fa1d19e5e61 in abort () from /lib64/libc.so.6
#2  0x00007fa1d19dd740 in __assert_fail () from /lib64/libc.so.6
#3  0x0000000000449c17 in slap_send_ldap_result (op=0x1870000, rs=0x7fa17c742930) at result.c:830
#4  0x00000000004b6a53 in meta_back_search (op=0x1870000, rs=0x7fa17c742930) at search.c:1183
#5  0x000000000043aef1 in fe_op_search (op=0x1870000, rs=0x7fa17c742930) at search.c:402
#6  0x00000000004a1a62 in overlay_op_walk (op=0x1870000, rs=0x7fa17c742930, which=op_search, oi=0x88583c0, on=0x0) at backover.c:677
#7  0x00000000004a24dc in over_op_func (op=0x1870000, rs=0x8, which=op_add) at backover.c:730
#8  0x000000000043b73c in do_search (op=0x1870000, rs=0x7fa17c742930) at search.c:247
#9  0x00000000004382af in connection_operation (ctx=0x7fa17c742b30, arg_v=<optimized out>) at connection.c:1316
#10 0x0000000000438edb in connection_read_thread (ctx=0x7fa17c742b30, argv=<optimized out>) at connection.c:1452
#11 0x00000000004f06a0 in ldap_int_thread_pool_wrapper (xpool=<optimized out>) at tpool.c:696
#12 0x00007fa1d1d35806 in start_thread () from /lib64/libpthread.so.0
#13 0x00007fa1d1a9065d in clone () from /lib64/libc.so.6
#14 0x0000000000000000 in ?? ()

This happened because meta used to directly return the ldap_sasl_bind return value to the client, and in this case it is not an LDAP error.
We fixed the issue by mapping it to an LDAP error.

Nadezhda Ivanova

Software Engineer
Symas Corporation                       http://www.symas.com

Comment 2 Quanah Gibson-Mount 2019-04-17 19:35:05 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 Quanah Gibson-Mount 2019-06-13 18:46:33 UTC
changed notes
changed state Test to Release
Comment 4 OpenLDAP project 2019-07-24 19:01:09 UTC
Fixed in master
Fixed in RE24 (2.4.48)
Comment 5 Quanah Gibson-Mount 2019-07-24 19:01:09 UTC
changed notes
changed state Release to Closed