Bug 12455 - tdb mutexes don't work on FreeBSD.
Summary: tdb mutexes don't work on FreeBSD.
Alias: None
Product: TDB
Classification: Unclassified
Component: libtdb (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
Depends on:
Reported: 2016-11-29 18:38 UTC by Jeremy Allison
Modified: 2020-12-11 08:26 UTC (History)
2 users (show)

See Also:

git-am fix for 4.5.next, 4.4.next. (3.37 KB, patch)
2016-11-30 00:57 UTC, Jeremy Allison
metze: review-

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2016-11-29 18:38:04 UTC
From: Volker Lendecke <vl@samba.org>
Date: Mon, 21 Nov 2016 21:00:01 +0100
Subject: [PATCH 3/3] tdb: Fix mutexes on FreeBSD

susv4 on mmap has the following snippet:

> The state of synchronization objects such as mutexes, semaphores,
> barriers, and conditional variables placed in shared memory mapped
> with MAP_SHARED becomes undefined when the last region in any process
> containing the synchronization object is unmapped.

This means we can't keep the mutex mmap area unmapped at any point
in time.
Comment 1 Jeremy Allison 2016-11-30 00:57:44 UTC
Created attachment 12703 [details]
git-am fix for 4.5.next, 4.4.next.

Cherry-picked from master.
Comment 2 Stefan Metzmacher 2016-11-30 15:12:08 UTC
Comment on attachment 12703 [details]
git-am fix for 4.5.next, 4.4.next.

Jeremy, we need to backport tdb 1.3.12 as a whole in order to have it reliable
Comment 3 Jeremy Allison 2016-11-30 16:53:37 UTC
OK, fair enough - the patch from master cherry-picked cleanly into 4.5.x, 4.4.x so I assumed the rest was already there.


Comment 4 Stefan Metzmacher 2018-04-24 07:03:01 UTC
Fixed in in >= 4.6