Opened 3 years ago
Closed 3 years ago
#17612 closed bug (fixed)
Evaluate maximum process argument limits
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta4 |
Component: | System/runtime_loader | Version: | R1/beta3 |
Keywords: | MAX_ARG | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
The maximum length of arguments under Linux is 2,097,152:
getconf ARG_MAX
The maximum length under FreeBSD is 262,144:
/usr/include/sys/syslimits.h:#define ARG_MAX 262144 /* max bytes for an exec function */
The maximum length of arguments under Haiku is 131,072:
headers/private/system/user_runtime.h:#define MAX_PROCESS_ARGS_SIZE (128 * 1024)
While abuse of arguments is a bad thing, it cropped up while building ICU70: https://unicode-org.atlassian.net/browse/ICU-21920
There is seemingly a large difference between the maximum argument length on Haiku vs Linux vs FreeBSD. We should evaluate if we want to raise it.
Change History (8)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Another data point. FreeBSD's discussion of moving to a larger value (aka matching Linux's HUGE ARG_MAX.
comment:5 by , 3 years ago
I have also hit this when trying to build the documentation for LilyPond (I still haven't written the recipe for it yet, but it needs a working TeXLive anyway). They use a few perl one-liners in the Makefile. I had to change this one so that perl does the globbing itself instead of the shell.
comment:6 by , 3 years ago
I've confirmed updating to 256 * 1024 resolves the icu build issues.
I think jumping to the huge Linux MAX_ARGS is overkill, however keeping up with FreeBSD's is likely a more prudent step.
comment:7 by , 3 years ago
https://review.haiku-os.org/c/haiku/+/4991 has been submitted.
This isn't technically a bug, however having the shortest max arg length means a lot of random things with huge numbers of args won't work on Haiku but will work on FreeBSD, Linux, etc.
Matching FreeBSD should make the situation better and fixes in ports more likely. (To be real for a moment, "Doesn't work on FreeBSD and Haiku" is a lot easier to digest and get upstream patches accepted over "Doesn't work on Haiku")
comment:8 by , 3 years ago
Milestone: | Unscheduled → R1/beta4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
fixed in master via hrev55899. After some testing in nightly images, lets also merge https://review.haiku-os.org/c/haiku/+/4996 into r1beta3.
A good middle ground may be migrating to (256 * 1024) to meet the same value as FreeBSD.