Issue 7799 - Crash in servers/slapd/backover.c / Solaris
Summary: Crash in servers/slapd/backover.c / Solaris
Status: UNCONFIRMED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.39
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-07 18:48 UTC by marty@maui.co.uk
Modified: 2020-09-21 22:53 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 marty@maui.co.uk 2014-02-07 18:48:26 UTC
Full_Name: Marty Lee
Version: 2.4.39
OS: Solaris 10 / 11
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (81.149.129.52)


With a global overlay set, slapd is crashing in servers/slapd/backover.c at line
703, with a SEGV.

Seems someone else has seen the same issue and put an asset in there:

(703) BackendDB *be = op->o_bd, db;
      slap_callback cb = {NULL, over_back_response, NULL, NULL}, **sc;
      int rc = SLAP_CB_CONTINUE;

      /* FIXME: used to happen for instance during abandon
       * when global overlays are used... */
      assert( op->o_bd != NULL );

However, the assert is after the first use of op->o_bd, so slapd has already
crashed!

The overlay I was using globally was
  overlay         memberof
  memberof-refint true

After reading the comment above the assert, I checked my config and I am indeed
using a global overlay. When I put it into each database block instead,
everything works ok. I guess there is a more fundamental issue with global
overlays and this assert isn't actually catching the error.

I can quickly replicate the problem, so if you need me to look at anything
specific, let me know.

Maybe I've missed something that says global overlays are bad; but if so, then
I'd expect slapd to complain about it in the messages....
Comment 1 Howard Chu 2014-02-07 21:07:19 UTC
marty@maui.co.uk wrote:
> Full_Name: Marty Lee
> Version: 2.4.39
> OS: Solaris 10 / 11
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (81.149.129.52)
>
>
> With a global overlay set, slapd is crashing in servers/slapd/backover.c at line
> 703, with a SEGV.
>
> Seems someone else has seen the same issue and put an asset in there:

> Maybe I've missed something that says global overlays are bad; but if so, then
> I'd expect slapd to complain about it in the messages....

Global overlays are generally a bad idea. They were not part of the original 
overlay design, they were added ad hoc and require explicit support in the 
overlay code. Most overlays have not been written to support global use. In 
fact only two overlays even mention support for global use in their manpage; 
you should assume none of the others do.

-- 
   -- 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 Quanah Gibson-Mount 2020-03-20 18:35:39 UTC
Need review here to determine what to do for 2.5, if anything, vs what's currently done in RE24.

i.e., can we:

a) reject attempts to add non-global overlays in a global fashion?

b) can the overlays detect if they are global, and if so refuse to do anything but spit out a warning and/or error?

etc.