[PATCH] ctdbd_conn: Generalise inaccurate error message
martin at meltin.net
Fri Oct 5 04:26:57 UTC 2018
ctdb_read_packet failed: Cannot allocate memory
[..., 0] ../source3/lib/ctdbd_conn.c:121(cluster_fatal)
cluster fatal event: ctdbd died
The error is due to a memory allocation failure rather than ctdbd
dying. However, the error message makes people wonder why ctdbd died.
Another alternative would be to wrap cluster_fatal() and have the
wrapper interpret the return value from ctdb_read_packet() to choose
from a set of more precise messages to pass to cluster_fatal(). For a
memory allocation it isn't strictly necessary to call cluster_fatal(),
but all is probably lost and it is still probably better to try to
exit cleanly as soon as possible instead of crashing somewhere.
Please review and maybe push...
I won't be offended to see a NACK and be asked to implement plan B as
mentioned above. However, I figure that will lead to a certain amount
of bike-shedding without much gain. The combination of both messages
already gives us all of the available information and I can't see a
case where we can definitely recover without resorting to
cluster_fatal(). Things are seriously wrong when we get to this
peace & happiness,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2553 bytes
Desc: not available
More information about the samba-technical