Issue 8677 - back-sock segfaults on CONTINUE (database sock)
Summary: back-sock segfaults on CONTINUE (database sock)
Status: IN_PROGRESS
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: backends (show other issues)
Version: 2.4.45
Hardware: All All
: --- normal
Target Milestone: 2.7.0
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-21 17:21 UTC by Michael Ströder
Modified: 2023-11-02 17:55 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 Michael Ströder 2017-06-21 17:21:10 UTC
Full_Name: 
Version: 2.4.45
OS: Linux
URL: 
Submission from: (NULL) (213.240.182.98)


When using back-sock (database sock) and the external sock listener returns
CONTINUE then slapd seg faults.

Yes, returning CONTINUE is only allowed when using back-sock as overlay.
But slapd should not seg fault and rather return as LDAP result:

result: 80 Other (e.g., implementation specific) error
text: CONTINUE not allowed for back-sock
Comment 1 Howard Chu 2017-06-21 18:27:18 UTC
michael@stroeder.com wrote:
> Full_Name:
> Version: 2.4.45
> OS: Linux
> URL:
> Submission from: (NULL) (213.240.182.98)
>
>
> When using back-sock (database sock) and the external sock listener returns
> CONTINUE then slapd seg faults.
>
> Yes, returning CONTINUE is only allowed when using back-sock as overlay.
> But slapd should not seg fault and rather return as LDAP result:
>
> result: 80 Other (e.g., implementation specific) error
> text: CONTINUE not allowed for back-sock

No. This is a configuration error and it's appropriate to halt the server and 
force it to be fixed.

-- 
   -- 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 Michael Ströder 2017-06-21 18:59:10 UTC
hyc@symas.com wrote:
>> When using back-sock (database sock) and the external sock listener returns
>> CONTINUE then slapd seg faults.
>>
>> Yes, returning CONTINUE is only allowed when using back-sock as overlay.
>> But slapd should not seg fault and rather return as LDAP result:
> 
> No. This is a configuration error and it's appropriate to halt the server and 
> force it to be fixed.

Even if I follow your argument this message does not look like the server was
deliberately halted:

slapd: result.c:83: sock_read_and_send_results: Assertion `si->si_ops != 0' failed.
./start-slapd.sh: line 21: 30179 Aborted                 (core dumped) ${OPENLDAP_EXEC}
-d stats,shell -h "ldap://0.0.0.0:9876 ${LDAPI_URI}" -n slapd-sock-test -f slapd.conf

Also the args and PID files are not cleaned up. I guess database environment(s) of other
backend(s) is/are also not closed in a controlled manner.

So at least it should properly log a message and shutdown cleanly.

Ciao, Michael.