The Samba-Bugzilla – Attachment 12893 Details for
Bug 12469
CTDB lock helper getting stuck trying to lock a record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Extra patches for v4-5
BZ12469-extra-v4-5.patch (text/plain), 3.42 KB, created by
Amitay Isaacs
on 2017-02-01 05:37:45 UTC
(
hide
)
Description:
Extra patches for v4-5
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2017-02-01 05:37:45 UTC
Size:
3.42 KB
patch
obsolete
>From 8ecaae3481b512f504e8967388e6e1c45701e409 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 31 Jan 2017 14:50:53 +1100 >Subject: [PATCH 1/2] ctdb-tests: Do not build mutex test if robust mutexes are > not supported > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12469 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >(cherry picked from commit 08b4a5f9f1575c882ab7174eb3249b574df6976f) >--- > ctdb/wscript | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/ctdb/wscript b/ctdb/wscript >index 05e1be7..4b58d2f 100644 >--- a/ctdb/wscript >+++ b/ctdb/wscript >@@ -750,10 +750,11 @@ def build(bld): > ib_deps, > install_path='${CTDB_TEST_LIBEXECDIR}') > >- bld.SAMBA_BINARY('test_mutex_raw', >- source='tests/src/test_mutex_raw.c', >- deps='pthread', >- install_path='${CTDB_TEST_LIBEXECDIR}') >+ if bld.env.HAVE_ROBUST_MUTEXES: >+ bld.SAMBA_BINARY('test_mutex_raw', >+ source='tests/src/test_mutex_raw.c', >+ deps='pthread', >+ install_path='${CTDB_TEST_LIBEXECDIR}') > > test_subdirs = [ > 'complex', >-- >2.9.3 > > >From 935ed2e09c1ab089278f4df96afaf4c63148d4ba Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 31 Jan 2017 16:49:14 +1100 >Subject: [PATCH 2/2] ctdb-tests: Use replace headers instead of system headers > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12469 > >This ensures that PTHREAD_MUTEX_ROBUST, pthread_mutexattr_setrobust() >and pthread_mutex_consistent() are always defined. > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Stefan Metzmacher <metze@samba.org> >Autobuild-Date(master): Tue Jan 31 11:57:01 CET 2017 on sn-devel-144 > >(cherry picked from commit 39ac4ae65eb3b8d4d3574987eab47eb7a290f2e4) >--- > ctdb/tests/src/test_mutex_raw.c | 24 +++++++----------------- > 1 file changed, 7 insertions(+), 17 deletions(-) > >diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c >index 8e3cae3..ab7aff9 100644 >--- a/ctdb/tests/src/test_mutex_raw.c >+++ b/ctdb/tests/src/test_mutex_raw.c >@@ -38,21 +38,11 @@ > * If no pid is printed, then no process is holding the mutex. > */ > >-#include <stdio.h> >-#include <unistd.h> >-#include <inttypes.h> >-#include <sys/types.h> >-#include <sys/fcntl.h> >-#include <stdlib.h> >-#include <string.h> >-#include <sys/wait.h> >-#include <sched.h> >-#include <sys/mman.h> >-#include <pthread.h> >-#include <errno.h> >-#include <stdbool.h> >- >-int pthread_mutex_consistent_np(pthread_mutex_t *); >+#include "replace.h" >+#include "system/filesys.h" >+#include "system/wait.h" >+#include "system/shmem.h" >+#include "system/threads.h" > > static void set_realtime(void) > { >@@ -99,7 +89,7 @@ static void run_child(const char *filename) > again: > ret = pthread_mutex_lock(mutex); > if (ret == EOWNERDEAD) { >- ret = pthread_mutex_consistent_np(mutex); >+ ret = pthread_mutex_consistent(mutex); > } else if (ret == EAGAIN) { > goto again; > } >@@ -172,7 +162,7 @@ int main(int argc, const char **argv) > if (strcmp(argv[2], "debug") == 0) { > ret = pthread_mutex_trylock(mutex); > if (ret == EOWNERDEAD) { >- ret = pthread_mutex_consistent_np(mutex); >+ ret = pthread_mutex_consistent(mutex); > if (ret == 0) { > pthread_mutex_unlock(mutex); > } >-- >2.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 12469
:
12830
|
12831
|
12866
|
12870
|
12874
|
12879
|
12892
| 12893