Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 414793 - sys-cluster/maui-3.3.1-r2 - ERROR: cannot setpgrp, errno: 1 (Operation not permitted)
Summary: sys-cluster/maui-3.3.1-r2 - ERROR: cannot setpgrp, errno: 1 (Operation not...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2012-05-05 21:34 UTC by Andrew Savchenko
Modified: 2020-11-22 14:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,5.69 KB, text/plain)
2012-05-05 21:36 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2012-05-05 21:34:50 UTC
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.
Comment 1 Andrew Savchenko gentoo-dev 2012-05-05 21:36:48 UTC
Created attachment 310921 [details]
emerge --info
Comment 2 George Tarasov 2012-08-06 03:49:46 UTC
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.
Comment 3 Larry the Git Cow gentoo-dev 2020-10-24 14:19:56 UTC
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(+)
Comment 4 Larry the Git Cow gentoo-dev 2020-11-22 14:54:42 UTC
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(-)