Bug 15479 - ctdbd: setproctitle not initialized messages flooding logs
Summary: ctdbd: setproctitle not initialized messages flooding logs
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: 4.19.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-20 07:53 UTC by Martin Schwenke
Modified: 2023-11-29 14:38 UTC (History)
1 user (show)

See Also:


Attachments
Patch for v4-19-test and v4-18-test (1.50 KB, patch)
2023-09-21 01:09 UTC, Martin Schwenke
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schwenke 2023-09-20 07:53:43 UTC
Not sure why this only happens in some Linux distributions/build environments, but in a Rocky Linux 8.8 container, messages like this are flooding the logs:

  ctdbd: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.

This is because commit 19c82c19c009eefe975ae95c8b709fc93f5f4c39 changed the behaviour of prctl_set_comment() so it now calls setproctitle(3bsd) by default.

The simplest fix is, like smbd and winbind, to call setproctitle_init().  This is safe because the libreplace replacement function exists and is a no-op.

This looks related to BZ9863, which appears to never have been resolved.  However, that one is a build failure.

Here's we'll just fix it for CTDB.  MR to come...
Comment 1 Samba QA Contact 2023-09-21 00:47:03 UTC
This bug was referenced in samba master:

8b9f464420b66cebaf00654cf8b19165b301b8b6
Comment 3 Martin Schwenke 2023-09-21 01:09:51 UTC
Created attachment 18115 [details]
Patch for v4-19-test and v4-18-test

Patch cherry-picks cleanly into both branches.  Build and smoke-tested.

Patch is also tested in the original Rocky 8.8 container and solves the problem there.
Comment 4 Ralph Böhme 2023-10-06 14:16:25 UTC
Reassigning to Jule for inclusion in 4.18 and 4.19
Comment 5 Jule Anger 2023-10-10 16:35:59 UTC
Pushed to autobuild-v4-{19,18}-test.
Comment 6 Samba QA Contact 2023-10-10 17:43:03 UTC
This bug was referenced in samba v4-19-test:

147050697e1a2f6908826eaab4d70808fd484c3f
Comment 7 Samba QA Contact 2023-10-11 10:58:03 UTC
This bug was referenced in samba v4-18-test:

653984f4a6d3af16597ccb70f23d09e6ed87d1f9
Comment 8 Jule Anger 2023-10-11 11:06:36 UTC
Closing out bug report.

Thanks!
Comment 9 Samba QA Contact 2023-10-16 14:20:08 UTC
This bug was referenced in samba v4-19-stable (Release samba-4.19.2):

147050697e1a2f6908826eaab4d70808fd484c3f
Comment 10 Samba QA Contact 2023-11-29 14:38:46 UTC
This bug was referenced in samba v4-18-stable (Release samba-4.18.9):

653984f4a6d3af16597ccb70f23d09e6ed87d1f9