Bug 11326 - Robust mutex support broken in 1.3.5
Summary: Robust mutex support broken in 1.3.5
Status: RESOLVED FIXED
Alias: None
Product: TDB
Classification: Unclassified
Component: libtdb (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on: 11331
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-10 07:06 UTC by Amitay Isaacs
Modified: 2018-04-24 07:44 UTC (History)
5 users (show)

See Also:


Attachments
Patch (894 bytes, patch)
2015-06-10 11:20 UTC, Volker Lendecke
no flags Details
Possible patches for master (3.58 KB, patch)
2015-06-10 12:38 UTC, Stefan Metzmacher
no flags Details
Backported patches for v4-2 branch (4.17 KB, patch)
2015-06-11 04:58 UTC, Amitay Isaacs
metze: review-
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amitay Isaacs 2015-06-10 07:06:07 UTC
In TDB 1.3.5, tdb_runtime_check_for_robust_mutexes() always returns false on Linux system.  With TDB 1.3.4, this works correctly.

The culprit is this patch:

commit 05b61ea47d1a30e6c37e46c199eb975f79099ed3
Author: Jeremy Allison <jra@samba.org>
Date:   Fri Mar 20 10:59:08 2015 -0700

    lib: tdb: Use sigaction when testing for robust mutexes.
    
    Working fix that copes with oldact.sa_handler == NULL
    if no handler initially set.
    
    Fixes bug #11175 - Lots of winbindd zombie processes on Solaris platform.
    
    https://bugzilla.samba.org/show_bug.cgi?id=11175
    
    Signed-off-by: Jeremy Allison <jra@samba.org>
    Reviewed-by: Michael Adam <obnox@samba.org>
    
Reverting this patch fixes the issue.
Comment 1 Volker Lendecke 2015-06-10 09:44:03 UTC
Just a quick comment: I've just successfully created a mutexed tdb on Ubuntu 12.04. It must be something RHEL specific. Looking deeper.
Comment 2 Stefan Metzmacher 2015-06-10 09:48:44 UTC
Making this bug public...
Comment 3 Volker Lendecke 2015-06-10 10:56:52 UTC
This is only with the standalone tdb build. lib/tdb/wscript does not contain a check for sigaction()
Comment 4 Volker Lendecke 2015-06-10 11:20:19 UTC
Created attachment 11141 [details]
Patch

This patch fixes it for me
Comment 5 Stefan Metzmacher 2015-06-10 12:38:34 UTC
Created attachment 11142 [details]
Possible patches for master
Comment 6 Amitay Isaacs 2015-06-11 04:58:37 UTC
Created attachment 11145 [details]
Backported patches for v4-2 branch
Comment 7 Stefan Metzmacher 2015-06-15 06:44:13 UTC
Comment on attachment 11145 [details]
Backported patches for v4-2 branch

We need to backport tdb 1.3.6 completely...
Comment 8 Volker Lendecke 2015-06-15 06:51:34 UTC
Why do we need to backport the whole thing? This is a very simple bug. We should probably just go with my one-liner that adds the sigaction check.
Comment 9 Stefan Metzmacher 2015-06-15 07:04:29 UTC
(In reply to Volker Lendecke from comment #8)

Because we need to require 1.3.6 in case we're using a system library.

And in case someone does a standalone build in lib/tdb in v4-2-test
we should not generate a 1.3.6 build with a different feature set.
Comment 10 Volker Lendecke 2015-06-15 07:23:25 UTC
Well, why not leave this unfixed then. Isn't a whole new tdb release too much for a Samba point release? Distros are the only ones who will build standalone tdb and they can fix it themselves with my proposed minimal waf build. We will pull much more into an innocent 4.2.next than JUST this bugix if we port back the whole thing.
Comment 11 Stefan Metzmacher 2015-06-15 08:37:43 UTC
(In reply to Volker Lendecke from comment #10)

The full backport doesn't look too risky to me:
https://bugzilla.samba.org/attachment.cgi?id=11154&action=edit

And bug #11319 would also be fixed.
Comment 12 Stefan Metzmacher 2018-04-24 07:44:08 UTC
Should be fixed with  tdb-1.3.6