Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

job-manager: history plugin fails for root #4991

Open
grondo opened this issue Mar 10, 2023 · 3 comments
Open

job-manager: history plugin fails for root #4991

grondo opened this issue Mar 10, 2023 · 3 comments

Comments

@grondo
Copy link
Contributor

grondo commented Mar 10, 2023

Kind of a corner case, but I was testing in a container and was running as root and saw these errors:

# flux run hostname
2023-03-10T16:04:11.546543Z job-manager.err[0]: jobtap: job.new: callback returned error
b93e807bb66e
2023-03-10T16:04:11.606407Z job-manager.err[0]: jobtap: job.inactive-add: callback returned error

With some printf debugging, I tracked the error down to EINVAL returned from hola_list_insert() in the history plugin since int2ptr(0) returns NULL.

I'm not exactly sure what to do about it (maybe use a special value for root), and it does not seem like a critical issue, but thought I'd report it in case another container user runs across the error.

@garlick
Copy link
Member

garlick commented Mar 10, 2023

Doh! Good catch. Maybe mapping root to "nobody" would be the least surprising thing to do? According to this wikipedia article, 65534 is usually the uid assigned to nobody these days.

@grondo
Copy link
Contributor Author

grondo commented Mar 10, 2023

Would it work instead to use int2ptr ((uid_t) -1)?

@garlick
Copy link
Member

garlick commented Mar 10, 2023

Oh I read right past this in the wikipedia article:

−1: The value (uid_t) -1 is reserved by POSIX to identify an omitted argument

Yeah, good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants