flux-core
flux-core copied to clipboard
broker proctitle is truncated at 16 bytes
Problem: The broker attempts to use prctl (PR_SET_NAME, ...) to add the broker rank to the process title name, but prctl(2) documents that this name is truncated at 16 bytes
The name can be up to 16 bytes long, including the terminating null byte.
This leaves space for only 3 digits of the rank, e.g. flux-broker-1000 is truncated to flux-broker-100
e.g.
# flux exec -r 10037 sh -c 'grep Name /proc/$(flux getattr broker.pid)/status'
Name: flux-broker-100
How much do we care about having the rank in the proc title? If we care about it for the system instance we could put the rank in the systemd status which right now prints
Status: "Running as member of 8 node Flux instance"
It is kind of nice for coredumps but not critical. Not much we can do about it anyway.
There is the old sendmail method, e.g.
https://kernel.googlesource.com/pub/scm/utils/util-linux/util-linux/+/v2.23.1/lib/setproctitle.c
But I'm not sure it would have the same effect.