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

MAX_N_PID should be 4194304 on 64bit machines #27

Open
merkys opened this issue Jun 18, 2020 · 6 comments
Open

MAX_N_PID should be 4194304 on 64bit machines #27

merkys opened this issue Jun 18, 2020 · 6 comments

Comments

@merkys
Copy link

@merkys merkys commented Jun 18, 2020

While using t-coffee on Debian, it has been noticed that on 64bit machines process IDs (PIDs) exceed the default MAX_N_PID setting (currently 260000) and starts acting weird (please see the original Debian bug report). I would suggest either increasing the default value of MAX_N_PID to 4194304, or doing so only when compiled 64bit machines.

@EricDeveaud
Copy link

@EricDeveaud EricDeveaud commented Jul 1, 2020

please do nt set an hard coded value. instead use the value that the OS and kernel may supply

MAX PID can be obtain via 2 calls
eg:
cat /proc/sys/kernel/pid_max
or
sysctl kernel.pid_max

it can also be determined programaticaly

the maxpid value is set by the os and can be edited by admins why 4194304 ? size_t

examples:

maestro-submit:~ > uname -s -p -o -m
Linux x86_64 x86_64 GNU/Linux
maestro-submit:~ > sysctl kernel.pid_max
kernel.pid_max = 65536
tars-submit0:~ > uname -s -p -o -m               
Linux x86_64 x86_64 GNU/Linux
tars-submit0:~ > sysctl kernel.pid_max
kernel.pid_max = 57344

regards

Eric

Loading

@cnotred
Copy link
Contributor

@cnotred cnotred commented Jul 1, 2020

Loading

@merkys
Copy link
Author

@merkys merkys commented Jul 1, 2020

please do nt set an hard coded value. instead use the value that the OS and kernel may supply

Yes, this is a wise solution.

This is very useful. I will implement this ASAP

Do you mean you are going to implement taking the MAX_N_PID from the kernel in tcoffee build system?

Loading

@cnotred
Copy link
Contributor

@cnotred cnotred commented Jul 1, 2020

Loading

@EricDeveaud
Copy link

@EricDeveaud EricDeveaud commented Jul 2, 2020

on my mac (Mojave) man 2 setaudit_addr says:

The ai_asid variable contains the audit session ID which is recorded with
     every event caused by the process.  It can be any value in the range 1 to
     PID_MAX (99999).  

http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/bsd/sys/proc_internal.h
#define PID_MAX 99999

Eric

Loading

@Hirun
Copy link

@Hirun Hirun commented Nov 18, 2020

https://apple.stackexchange.com/questions/51119/whats-the-maximum-pid-for-mac-os-x

Looking at sys/proc_internal.h in xnu-1699.24.23, I find that PID_MAX is 99999. The value is used in kern_fork.c in the function forkproc. Looking at that function, process IDs are not assigned equal to PID_MAX, so the highest possible pid is 99998

Seems like for Mac OS it is ok to hardcode the limit to 99998

Loading

nsoranzo added a commit to nsoranzo/bioconda-recipes that referenced this issue Dec 23, 2020
BiocondaBot pushed a commit to bioconda/bioconda-recipes that referenced this issue Dec 23, 2020
Merge PR #25932, commits were: 
 * Add [de]activate scripts

to workaround cbcrg/tcoffee#27
 * Skip osx

Just running `t_coffee` fails with:
```
04:33:21 BIOCONDA INFO (OUT) -max_n_proc    	D	[0] 	1
04:33:21 BIOCONDA INFO (OUT)
04:33:21 BIOCONDA INFO (OUT)
04:33:21 BIOCONDA INFO (OUT) *************************************************************************************************
04:33:21 BIOCONDA INFO (OUT) *                        FULL TRACE BACK PID: 2901
04:33:21 BIOCONDA INFO (OUT) 2901 -- ERROR: COREDUMP: T-COFFEE Version_13.45.32.7d81f5b (2020-12-18 11:45:26 - Revision 7d7e789 - Build 647)
04:33:21 BIOCONDA INFO (OUT) *************************************************************************************************
04:33:21 BIOCONDA INFO (OUT)
04:33:21 BIOCONDA INFO (OUT) 	******************************************************************
04:33:21 BIOCONDA INFO (OUT) 	* Abnormal Termination
04:33:21 BIOCONDA INFO (OUT) 	* Job NOT Completed:[T-COFFEE, Version_13.45.32.7d81f5b]
04:33:21 BIOCONDA INFO (OUT) 	* Please CHECK:
04:33:21 BIOCONDA INFO (OUT) 	* 	-1 The format of your Input Files
04:33:21 BIOCONDA INFO (OUT) 	* 	-2 The parameters
04:33:21 BIOCONDA INFO (OUT) 	* 	-3 The use of special characters in sequence names:
04:33:21 BIOCONDA INFO (OUT) 	* 		 (@, |, %...)
04:33:21 BIOCONDA INFO (OUT) 	* 	-4 The Online Doc (http://www.tcoffee.org)
04:33:21 BIOCONDA INFO (OUT) 	* 	-5 re-run your CL (see below) with the -debug option. This will produce a debug file you can send us.
04:33:21 BIOCONDA INFO (OUT) 	*
04:33:21 BIOCONDA INFO (OUT) 	*	    NO
04:33:21 BIOCONDA INFO (OUT) 	* to:
04:33:21 BIOCONDA INFO (OUT) 	* 		cedric.notredame@gmail.com
04:33:21 BIOCONDA INFO (OUT) 	* If you run T-Coffee over the WEB:
04:33:21 BIOCONDA INFO (OUT) 	* 	Windows Cut and Paste is sometimes erratic and
04:33:21 BIOCONDA INFO (OUT) 	* 	it can loose carriage returns. If you suspect this,
04:33:21 BIOCONDA INFO (OUT) 	* 	try to cut and paste through an intermediate application
04:33:21 BIOCONDA INFO (OUT) 	* 	(word pad) and inspect the results
04:33:21 BIOCONDA INFO (OUT)
04:33:21 BIOCONDA INFO (OUT)
04:33:21 BIOCONDA INFO (OUT) 	* CONFIDENTIALITY:
04:33:21 BIOCONDA INFO (OUT) 	* 	The File NO may contain your personal DATA
04:33:21 BIOCONDA INFO (OUT) 	* 	Remove ALL confidential DATA from this file BEFORE sending it
04:33:21 BIOCONDA INFO (OUT) 	******************************************************************
04:33:21 BIOCONDA INFO (OUT) # Command Line: t_coffee  [PROGRAM:T-COFFEE]
04:33:21 BIOCONDA INFO (OUT)
04:33:21 BIOCONDA INFO (OUT) # TERMINATION STATUS: FAILURE [PROGRAM: T-COFFEE pid 2901 ppid 2895
04:33:21 BIOCONDA INFO (OUT) #CL: t_coffee
```
 * Update t-coffee to 13.45.0.4846264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants