Bug 15406 - rpc daemons do not honor "debug hires timestamp"
Summary: rpc daemons do not honor "debug hires timestamp"
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: DCE-RPCs and pipes (show other bugs)
Version: 4.18.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2023-06-28 20:34 UTC by Pavel Filipenský
Modified: 2023-06-28 20:34 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Filipenský 2023-06-28 20:34:54 UTC
log.rpcd_classic is using only seconds resolution in log.rpcd_classic log file, even if "debug hires timestamp = yes" is set in smb.conf.

The reason is that setup_logging() calls reopen_logs_internal() which does not call debug_set_settings():

#1  0x00007ffa2e6416d8 in setup_logging (prog_name=0x7fff4a8f58af "rpcd_classic", new_logtype=DEBUG_DEFAULT_STDERR) at ../../lib/util/debug.c:1157
#2  0x00007ffa2d1f7615 in samba_cmdline_init_common (mem_ctx=0x55940166bbc0) at ../../lib/cmdline/cmdline.c:78
#3  0x00007ffa2ed5b3f5 in samba_cmdline_init (mem_ctx=0x55940166bbc0, config_type=SAMBA_CMDLINE_CONFIG_SERVER, require_smbconf=true) at ../../lib/cmdline/cmdline_s3.c:121
#4  0x00007ffa2ed59f6d in rpc_worker_main (argc=6, argv=0x7fff4a8f4788, daemon_config_name=0x5593ffdca4da "rpcd_classic", num_workers=5, idle_seconds=60, get_interfaces=0x5593ffd5837b <classic_interfaces>, get_servers=0x5593ffd5839c <classic_servers>, private_data=0x0) at ../../source3/rpc_server/rpc_worker.c:1043
#5  0x00005593ffd58599 in main (argc=6, argv=0x7fff4a8f4788) at ../../source3/rpc_server/rpcd_classic.c:93

OTOH e.g. smbd calls reopen_logs() instead of reopen_logs_internal() and  reopen_logs() calls debug_set_settings():

#0  0x00007f2b221dd588 in debug_set_settings (settings=0x7fff8a49b9b0, logging_param=0x557a2117e570 "file", syslog_level=1, syslog_only=false) at ../../lib/util/debug.c:1082
#1  0x00007f2b222c88af in reopen_logs () at ../../lib/util/debug_s3.c:49
#2  0x0000557a202a0dd2 in winbindd_reload_services_file (lfile=0x0) at ../../source3/winbindd/winbindd_misc.c:472