diff --git a/lib/ipc_socket.c b/lib/ipc_socket.c index db8676b45..ae94d0ade 100644 --- a/lib/ipc_socket.c +++ b/lib/ipc_socket.c @@ -164,13 +164,18 @@ dgram_verify_msg_size(size_t max_msg_size) char buf[max_msg_size]; if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets) < 0) { + qb_util_perror(LOG_DEBUG, "error calling socketpair()"); goto cleanup_socks; } if (set_sock_size(sockets[0], max_msg_size) != 0) { + qb_util_log(LOG_DEBUG, "error set_sock_size(sockets[0],%#x)", + max_msg_size); goto cleanup_socks; } if (set_sock_size(sockets[1], max_msg_size) != 0) { + qb_util_log(LOG_DEBUG, "error set_sock_size(sockets[1],%#x)", + max_msg_size); goto cleanup_socks; } diff --git a/tests/check_ipc.c b/tests/check_ipc.c index da8c96661..9aafc4178 100644 --- a/tests/check_ipc.c +++ b/tests/check_ipc.c @@ -1495,7 +1495,17 @@ static void test_max_dgram_size(void) fail_if(init <= 0); for (i = 0; i < 100; i++) { int try = qb_ipcc_verify_dgram_max_msg_size(1000000); +#if 0 ck_assert_int_eq(init, try); +#else + /* extra troubleshooting, report also on i and errno variables; + related: https://github.com/ClusterLabs/libqb/issues/234 */ + if (init != try) { + ck_abort_msg("Assertion 'init==try' failed:" + " init==%#x, try==%#x, i=%d, errno=%d", + init, try, i, errno); + } +#endif } qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD,