openbsd: x86_64 the data limit is 1G actually

Bug #2027536 reported by Sebastien Marie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

The data limit of 512M was changed in 2016. It is currently 1G.

Update the default dynamic-space-size value from 444Mb to 767Mb.

I am seeing regular (but not systematic) heap exhaustion error with current value while compiling sbcl.

Revision history for this message
Sebastien Marie (semarie) wrote :
Revision history for this message
Sebastien Marie (semarie) wrote :

I would like also note that it is possible to pre-allocate memory not accounted in the datasize limit, if it is allocated with PROT_NONE protection.

It would be accounted only when used (and the protection changed with mprotect(2)).

But I don't know enough sbcl internals to know if it is a possible way to manage the memory or not.

Revision history for this message
Douglas Katzman (dougk) wrote :

on Linux we pass MAP_NORESERVE to avoid committing swap space until just-in-time. Does openBSD have that and would it help? Passing PROT_NONE is a departure from how #+unix works, though it's slightly similar to how #+win32 works. On #+win32 there is a similar idea by not passing MEM_COMMIT, and then we can commit individual pages on demand.

Revision history for this message
Sebastien Marie (semarie) wrote :

we don't have MAP_NORESERVE (well, it exists but only for userland compat: it is a nop when used).

we change PROT_NONE to not count against resource limits in 2020 to cope with at least Chromium code base which allocate large chunck of memory for javascript and only populates it sparsely.

I will take a look at win32 code.

For now, the attached patch to raise dynamic-space-size is a good compromise.

Revision history for this message
Douglas Katzman (dougk) wrote :
Revision history for this message
Sebastien Marie (semarie) wrote :

yes it should be considered fixed. if I advance for using PROT_NONE, I will open a different report.

Thanks.

Douglas Katzman (dougk)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.