Bug 12814 - Specifying CTDB_LOGGING=syslog:nonblocking causes ctdbd to crash at startup
Summary: Specifying CTDB_LOGGING=syslog:nonblocking causes ctdbd to crash at startup
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: 4.6.4
Hardware: All All
: P5 regression (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-01 04:50 UTC by Martin Schwenke
Modified: 2017-06-06 07:37 UTC (History)
2 users (show)

See Also:


Attachments
Patches for v4-6 (1.21 KB, patch)
2017-06-02 00:58 UTC, Amitay Isaacs
martins: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schwenke 2017-06-01 04:50:36 UTC
As will syslog:udp and similar.

(gdb) bt
#0  0x00007f04ade0b495 in raise () from /lib64/libc.so.6
#1  0x00007f04ade0cc75 in abort () from /lib64/libc.so.6
#2  0x0000000000462522 in smb_panic_default (why=0x494384 "internal error") at ../lib/util/fault.c:156
#3  smb_panic (why=0x494384 "internal error") at ../lib/util/fault.c:169
#4  0x00000000004626f2 in fault_report (sig=11) at ../lib/util/fault.c:83
#5  sig_fault (sig=11) at ../lib/util/fault.c:94
#6  <signal handler called>
#7  syslog_log_setup_nonblocking (mem_ctx=<value optimized out>, option=<value optimized out>, app_name=<value optimized out>) at ../common/logging.c:373
#8  syslog_log_setup (mem_ctx=<value optimized out>, option=<value optimized out>, app_name=<value optimized out>) at ../common/logging.c:471
#9  0x0000000000407ebb in logging_init (mem_ctx=0x22b6d40, logging=0x22b6550 "syslog:nonblocking", debug_level=<value optimized out>, app_name=0x48aada "ctdbd") at ../common/logging.c:546
#10 0x000000000043b5a0 in ctdb_logging_init (mem_ctx=0x22b6d40, logging=0x22b6550 "syslog:nonblocking", debug_level=0x22b6630 "NOTICE") at ../server/ctdb_logging.c:63
#11 0x000000000040dfb9 in main (argc=<value optimized out>, argv=<value optimized out>) at ../server/ctdbd.c:207
(gdb) up [several times]
#7  syslog_log_setup_nonblocking (mem_ctx=<value optimized out>, option=<value optimized out>, app_name=<value optimized out>) at ../common/logging.c:373
373             state->fd = socket(AF_UNIX, SOCK_DGRAM, 0);
(gdb) print state
$1 = (struct syslog_log_state *) 0x0

The problem is that syslog_log_setup_common() never assigns to *result.

Will post patch to list in a moment.  :-)
Comment 1 Amitay Isaacs 2017-06-02 00:58:24 UTC
Created attachment 13246 [details]
Patches for v4-6
Comment 2 Martin Schwenke 2017-06-02 01:31:35 UTC
Hi Karolin,

This is ready for 4.6.

Thanks...
Comment 3 Karolin Seeger 2017-06-02 08:21:49 UTC
(In reply to Martin Schwenke from comment #2)
Pushed to autobuild-v4-6-test.
Comment 4 Karolin Seeger 2017-06-06 07:37:02 UTC
(In reply to Karolin Seeger from comment #3)
Pushed to v4-6-test.
Closing out bug report.

Thanks!