Merge ~lucaskanashiro/ubuntu/+source/openldap:ubuntu/disco/fix-slapd-seg-fault-1838370 into ubuntu/+source/openldap:ubuntu/disco-devel

Proposed by Lucas Kanashiro
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 3b21948eeb214141d6a9ddaf7eb2e98e1fb36de6
Merged at revision: 3b21948eeb214141d6a9ddaf7eb2e98e1fb36de6
Proposed branch: ~lucaskanashiro/ubuntu/+source/openldap:ubuntu/disco/fix-slapd-seg-fault-1838370
Merge into: ubuntu/+source/openldap:ubuntu/disco-devel
Diff against target: 70 lines (+48/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/rwm-do-not-free-original-filter.patch (+41/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+371147@code.staging.launchpad.net

Description of the change

The upstream patch to fix slapd crash reported in [1] was applied. It fixes the rwm overlay module which was freeing some memory when it was still needed, causing segmentation faults. More info about it in d/p/rwm-do-not-free-original-filter.patch and in the bug report itself [1], including how to test it. There is also a PPA for testing purpose available [2].

[1] https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1838370
[2] https://launchpad.net/~lucaskanashiro/+archive/ubuntu/disco-openldap-slapd-segfault-1838370/

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I'll review all branches at once, on a first look they seem good!

Build logs:
D - ok
B - ok, but has a self-test failing (before your patch as well)
X - ok, but has the selftest issue and some compiler errors, yet it passes and it isn't due to your changes.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Changelog entries and version numbers are ok on all branches

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Patch is identical on all three branches,
patch headers seem fine to me.
(FYI I added the Debian bug to our bug as tracking reference)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Matches upstream patch.
No issues in some (very superficial) testing

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

On the SRU test I first got
root@d:~# ldapsearch -x -h localhost -b dc=example,dc=com -LLL uid=root
No such object (32)

That above was Disco.
On Binoic it "worked"

root@b:~# ldapsearch -x -h localhost -b dc=example,dc=com -LLL uid=root
Server is unwilling to perform (53)
Additional information: searchFilter/searchFilterAttrDN massage error

I found that it was due to the reconfigure (on Disco) already taking place on install.
I had to use
Omit OpenLDAP server configuration? -> No
DNS domain name - example.com
Organization name - example.com
I needed to set a PW
Backend - MDB
Remove on Purge (irelevant)
Move old DB - yes

Only with this reconfigure sequence I got the error, maybe extend the SRU template with it?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

After the upgrade it was still broken for me:

apt update
...
root@d:~# apt-cache policy slapd
slapd:
  Installed: 2.4.47+dfsg-3ubuntu2.2~ppa1
  Candidate: 2.4.47+dfsg-3ubuntu2.2~ppa1
  Version table:
 *** 2.4.47+dfsg-3ubuntu2.2~ppa1 500
        500 http://ppa.launchpad.net/lucaskanashiro/disco-openldap-slapd-segfault-1838370/ubuntu disco/main amd64 Packages
        100 /var/lib/dpkg/status
     2.4.47+dfsg-3ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu disco-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu disco-security/main amd64 Packages
     2.4.47+dfsg-3ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu disco/main amd64 Packages
root@d:~# ldapsearch -x -h localhost -b dc=example,dc=com -LLL uid=root
Server is unwilling to perform (53)
Additional information: searchFilter/searchFilterAttrDN massage error

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Even after a I reset to a new DB (dpkg-reconfigure) on the new version I ran into the issue:

root@d:~# sudo dpkg-reconfigure slapd
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.47+dfsg-3ubuntu2.2~ppa1... done.
  Moving old database directory to /var/backups:
  - directory unknown... done.
  Creating initial configuration... done.
  Creating LDAP directory... done.
root@d:~#
root@d:~# ldapsearch -x -h localhost -b dc=example,dc=com -LLL uid=root
root@d:~# sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f add-rwm.ldif
modifying entry "cn=module{0},cn=config"

adding new entry "olcOverlay=rwm,olcDatabase={1}mdb,cn=config"

root@d:~# ldapsearch -x -h localhost -b dc=example,dc=com -LLL uid=root
Server is unwilling to perform (53)
Additional information: searchFilter/searchFilterAttrDN massage error

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

It might be just me and my usage of the test, but please give this another try and polish the steps to be less misleading.

Once that is resolved the rest LGTM

review: Needs Information
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

> It might be just me and my usage of the test, but please give this another try
> and polish the steps to be less misleading.
>
> Once that is resolved the rest LGTM

I improved the test case steps, making them more straightforward. Now, I am using debconf-set-selections to pre-seed the slapd package, this should avoid ambiguity.

I also added a "Expected behavior" section describing what should be the outcome of this test case. You will have the described behavior if you install the package available in the PPA.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for both, now I think this is ready +1

review: Approve
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the approval, please upload it.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

tagged and sponsored to -unapproved

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches