Hello, If maui is started via init script, it outputs the following error to the console: # rc-config start maui Starting init script maui | * Starting Maui scheduler ... maui |cannot set process group: Operation not permitted [ ok ] | And maui.log shows: 05/06 01:29:19 ServerDemonize() 05/06 01:29:19 ERROR: cannot setpgrp, errno: 1 (Operation not permitted) 05/06 01:29:19 INFO: parent is exiting 05/06 01:29:19 INFO: child process in background If maui is started from the shell as: # maui There are no error messages in both console and maui.log file. If # start-stop-daemon maui is used from the console, error appear again in the same way. My openrc version is 0.9.9.3.
Created attachment 310921 [details] emerge --info
Same behavior on my clusters. I thinks it's not a Gentoo || OpenRC problems at all. Problem inside maui itself. They use setpgrp call when maui-process (before fork) already session leader when it was started by start-stop-daemon. See small example: #include <sys/types.h> #include <unistd.h> #include <stdio.h> int main(int argc, char* argv[]) { pid_t sid = getsid(0); pid_t pgid = getpgid(0); pid_t pid = getpid(); printf("Session ID = %i\n", sid); printf("\tGroup ID = %i\n", pgid); printf("\t\tProcess ID = %i\n", pid); if (setpgrp() == -1) { perror("setpgrp failed"); return 1; } return 0; } myhost maui.problem # ./a.out Session ID = 36627 <--- (my bash session here) Group ID = 46152 Process ID = 46152 myhost maui.problem # start-stop-daemon --exec ./a.out Session ID = 46154 Group ID = 46154 Process ID = 46154 setpgrp failed: Operation not permitted * start-stop-daemon: failed to start `./a.out' I think it is safe to comment these lines in OServer.c source code for modern kernel & openrc versions. Parent-Maui-process is session and group leader by the system conditions. Or just ignore this error.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05c24f0122b62cae823c3123b545014eefd9189 commit a05c24f0122b62cae823c3123b545014eefd9189 Author: David Seifert <soap@gentoo.org> AuthorDate: 2020-10-24 14:19:47 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2020-10-24 14:19:47 +0000 package.mask: Last rite sys-cluster/maui Bug: https://bugs.gentoo.org/365713 Bug: https://bugs.gentoo.org/405277 Bug: https://bugs.gentoo.org/405437 Bug: https://bugs.gentoo.org/414793 Bug: https://bugs.gentoo.org/415699 Bug: https://bugs.gentoo.org/422799 Bug: https://bugs.gentoo.org/479288 Bug: https://bugs.gentoo.org/740928 Signed-off-by: David Seifert <soap@gentoo.org> profiles/package.mask | 6 ++++++ 1 file changed, 6 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23c2fcae268d01a7bcb593febcd963875a822b7c commit 23c2fcae268d01a7bcb593febcd963875a822b7c Author: David Seifert <soap@gentoo.org> AuthorDate: 2020-11-22 14:54:12 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2020-11-22 14:54:12 +0000 sys-cluster/maui: Remove last-rited package Closes: https://bugs.gentoo.org/365713 Closes: https://bugs.gentoo.org/405277 Closes: https://bugs.gentoo.org/405437 Closes: https://bugs.gentoo.org/414793 Closes: https://bugs.gentoo.org/415699 Closes: https://bugs.gentoo.org/422799 Closes: https://bugs.gentoo.org/479288 Closes: https://bugs.gentoo.org/740928 Signed-off-by: David Seifert <soap@gentoo.org> profiles/package.mask | 6 --- sys-cluster/maui/Manifest | 1 - sys-cluster/maui/files/maui-3.3.1-torque_4.patch | 14 ------ sys-cluster/maui/files/maui.initd | 23 --------- sys-cluster/maui/maui-3.3.1-r3.ebuild | 61 ------------------------ sys-cluster/maui/metadata.xml | 12 ----- 6 files changed, 117 deletions(-)