[PATCH] s3-messaging/ctdb is broken in master

Volker Lendecke vl at samba.org
Sun Jul 10 12:04:35 UTC 2016

On Sun, Jul 10, 2016 at 01:36:31PM +0200, Ralph Boehme wrote:
> It seems s3-messaging/ctdb is broken in master. After an smbd is
> forked to handle a session it crashed when trying to do messaging with
> ctdb but the IPC fd gives EBADF.
> Turns out the commits
>   3fe3226daa8488e0fa787c40359c3401b6f05fc0 and
>   3fe3226daa8488e0fa787c40359c3401b6f05fc0^
> introduced a regression.


> With those two commits we now pass the ctdb-messaging object conn to
> db_open() and save a reference to it to the private db_ctdb_ctx for
> later use. Unfortunately, reinit_after_fork() destroys conn, leaving
> us with an invalid reference.

Thanks for finding this!!

> Attached patchset fixes the issue for me, it adds proper
> ctdb-messaging reinit functions that preserve the conn object and just
> reinitialize the IPC fd.
> Please review and push if ok.

Of course it looks good, however -- why do you remove the error
information by always doing "return EIO;" instead of "return ret;"?

Except for that question -- r-b me.


More information about the samba-technical mailing list