Bug 15479 - ctdbd: setproctitle not initialized messages flooding logs
Summary: ctdbd: setproctitle not initialized messages flooding logs
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
Depends on:
Reported: 2023-09-20 07:53 UTC by Martin Schwenke
Modified: 2023-11-29 14:38 UTC (History)
1 user (show)

See Also:

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

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:

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:

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

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

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):

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):