[PATCH] TDB traverse lock changes for massive AD DC perf improvement
Douglas Bagnall
douglas.bagnall at catalyst.net.nz
Fri Apr 7 06:13:43 UTC 2017
On 07/04/17 17:28, Douglas Bagnall via samba-technical wrote:
> I had a go at it. Attached.
One thing I missed (I *was* drinking at the time) is process 1 waitpid()ing
at the end to collect the failure of process 2. That is, it needs something
like:
--- a/fcntl_deadlock.c 2017-04-07 18:08:38.916348365 +1200
+++ b/fcntl_deadlock.c 2017-04-07 18:08:12.696332062 +1200
@@ -1,3 +1,4 @@
+#include <sys/wait.h>
#include <inttypes.h>
#include <stdio.h>
#include <time.h>
@@ -60,7 +61,7 @@
int fd;
char *filename = argv[1];
char *msg;
- int pid;
+ int pid, status;
int pipes_1_2[2];
int pipes_2_1[2];
@@ -128,6 +129,11 @@
if (process == 1) {
expect_char('d');
+ pid = waitpid(pid, &status, 0);
+ if (status) {
+ msg = "process 2 failed";
+ goto err;
+ }
}
printf("process %d has got to the end\n", process);
but I'll leave it to people who actually have an OS where it fails
to decide the details.
Douglas
More information about the samba-technical
mailing list