flux-core icon indicating copy to clipboard operation
flux-core copied to clipboard

broker proctitle is truncated at 16 bytes

Open grondo opened this issue 1 year ago • 2 comments

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

grondo avatar Mar 29 '24 20:03 grondo

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"

garlick avatar Apr 08 '24 17:04 garlick

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.

grondo avatar Apr 08 '24 18:04 grondo