Skip to content

--dynamic-space-size handling on SBCL is broken #36

@rpgoldman

Description

@rpgoldman

I was having trouble with an application I built with this command line:

buildapp --dynamic-space-size 100000 --output strike-force-one --load game-player.lisp --entry 'cl-user::main' --dumpfile-copy 'strike-force-one-dumpfile.lisp' --logfile 'build-game-player.log'

When I ran the resulting application, it ran out of memory quickly. But when I ran sbcl with --dynamic-space-size 100000 and passed it a script that did the equivalent, it did not run out of memory.

Tracking it down, I found that run-program for SBCL, invoked in main was not getting the --dynamic-space-size 100000 argument:

(RUN-PROGRAM "sbcl"
             '("--noinform" "--disable-debugger" "--no-userinit" "--no-sysinit"
               "--load"
               "/home/rpg/projects/scepter/shop-mcts/strike-force-one/dumper-2SKVI5f7.lisp"))

Further debugging shows that buildapp does not see the --dynamic-space-size argument:

Constructing a dumper from (--output strike-force-one --load game-player.lisp
                            --entry cl-user::main --dumpfile-copy
                            strike-force-one-dumpfile.lisp --logfile
                            build-game-player.log)
After processing the command line arguments, we have the following dumper object:
#<BUILDAPP::DUMPER strike-force-one cl-user::main>
  [standard-object]

Slots with :INSTANCE allocation:
  PACKAGE                        = #:DUMPER124
  ACTIONS                        = ((:LOAD "game-player.lisp"))
  ENTRY                          = cl-user::main
  DISPATCHED-ENTRIES             = NIL
  ASDF-DIRECTIVES                = NIL
  LOAD-PATHS                     = NIL
  SBCL                           = "sbcl"
  CCL                            = "ccl"
  OUTPUT                         = "strike-force-one"
  LOGFILE                        = "build-game-player.log"
  DUMPFILE-COPY                  = "strike-force-one-dumpfile.lisp"
  CORE-ONLY                      = NIL
  COMPRESS-CORE                  = NIL
  DYNAMIC-SPACE-SIZE             = NIL

The "constructing a dumper" message above formats the arguments that are passed to command-line-dumper.

I conjecture that SBCL is stripping out this argument before the buildapp executable can see it.

I will attempt to verify this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions