(setf *backend-page-bytes* 262144) breaks build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Dimitar Kenanov via lists.sourcefor
Hi,
firstly i am working on 64 bit Slackware linux with 64Gb RAM. Version of
SBCL is 1.0.57. Page size of my system is 4096.
I do not know how to program in SBCL but I have a program that uses SBCL
and after a while SBCL exits with the known error:
------------
fatal error encountered in SBCL pid 10894(tid 140737353926400):
An mprotect call failed with ENOMEM. This probably means that the
maximum amount
of separate memory mappings was exceeded. To fix the problem, either
increase
the maximum with e.g. 'echo 262144 > /proc/sys/
recompile
SBCL with a larger value for GENCGC-CARD-BYTES in
'src/compiler/
------------
So i went to the specified file and changed the value there to:(setf
*backend-
compiler exits with the following error:
-----------
obj/from-
[building initial core file in "output/
writing 2097152 bytes [1 page] from #<SB!FASL::GSPACE :READ-ONLY>
unhandled SB-INT:
RUNNING
Index 1 out of bounds for (SIMPLE-VECTOR 1), should be nonnegative
and <1.
0: (SB-DEBUG:
#<CLOSURE (LAMBDA # :IN SB-DEBUG:BACKTRACE) {10664CC54B}>
:START
0
:COUNT
128)
1: (SB-DEBUG:BACKTRACE
128
#<SYNONYM-
2: (SB-DEBUG:
#<SB-
datum: 1>
#<unavailable argument>)
3: (SB-DEBUG::RUN-HOOK
SB-
#<SB-
datum: 1>)
4: (INVOKE-DEBUGGER
#<SB-
datum: 1>)
5: (ERROR
SB-
:ARRAY
#(#(45 6 0 0 0 ...))
:AXIS
NIL
:DATUM
1
:EXPECTED-TYPE
(INTEGER 0 (1)))
6: (SB-INT:
7: (SB-KERNEL:
#<unavailable argument>
#.(
#<SB-
(SB-ALIEN:STRUCT
SB-VM::
(213 404 84))
8: (SB-KERNEL:
#.(
#<unavailable argument>)
9: ("foreign function: call_into_lisp")
10: ("foreign function: funcall2")
11: ("foreign function: interrupt_
12: ("foreign function: #x41458A")
13: (SB!FASL::BVREF
#S(
65536)
14: (SB!FASL:
#S(
#<
for "file /home/domine/
:START
0
:END
2097152)
15: (SB!FASL:
16: (SB!FASL:
17: (SB!VM:GENESIS
:OBJECT-
(#
#
#
#
#
:SYMBOL-
"src/
:CORE-
"output/
:MAP-FILE-NAME
"output/
:C-
"output/
18: (SB-INT:
(SB!VM:GENESIS :OBJECT-FILE-NAMES *TARGET-
#<
19: (EVAL
(SB!VM:GENESIS :OBJECT-FILE-NAMES *TARGET-
20: (SB-EXT:
(SB!VM:GENESIS :OBJECT-FILE-NAMES *TARGET-
:EVAL
NIL)
21: (SB-IMPL::REPL-FUN NIL)
22: ((LAMBDA () :IN SB-IMPL:
23: (SB-IMPL:
#<CLOSURE (LAMBDA # :IN SB-IMPL:
24: (SB-IMPL:
25: (SB-IMPL:
26: ((FLET #:WITHOUT-
27: ((LABELS SB-IMPL:
unhandled condition in --disable-debugger mode, quitting
------------
I tried many values but compiling fails with the error above. Compiling
was only success with the default value and 65536. But even with 65536
SBCL exits with the ENOMEM error when i use the program which i have.
Unfortunately its for my work and i cant go around.
How can i solve that problem with the compiling?
Any help or hint will be appreciated!
Thank you
Dimitar
The code to write big vectors to a stream only works by accident. The patch below fixes that issue, but there are other problems, including at least that of finding a memory map for static and read-only spaces.