RUN-SHELL-COMMAND fails in SLURP-INPUT-STREAM on Allegro 8.2

Bug #1170029 reported by Robert P. Goldman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Low
Faré

Bug Description

I have been doing some experimentation with migrating, so tried to load it with the latest ASDF from git, and it crashes on uses of run-shell-command:

(ASDF/BACKWARD-INTERFACE:RUN-SHELL-COMMAND "cd \"/Users/rpg/stratus/stratus-trunk/code/externals/fast-downward/src/\" ; ./build_all" ..)
[grrrr.... sldb is hiding arguments]

      Locals:
        CONTROL-STRING = "cd \"/Users/rpg/stratus/stratus-trunk/code/externals/fast-downward/src/\" ; ./build_all"
        ARGS = "cd \"/Users/rpg/stratus/stratus-trunk/code/externals/fast-downward/src/\" ; ./build_all"
        FASTDOWNWARD-ASD::SYS = #<ASDF/SYSTEM:SYSTEM "fast-downward">
        FASTDOWNWARD-ASD::PATH = "/Users/rpg/stratus/stratus-trunk/code/externals/fast-downward/src/"
        FASTDOWNWARD-ASD::OP = #<ASDF/LISP-ACTION:COMPILE-OP >
        *VERBOSE-OUT* = T
        COMMAND = "cd \"/Users/rpg/stratus/stratus-trunk/code/externals/fast-downward/src/\" ; ./build_all"

The backtrace shows that the crash happens because UIOP's UIOP/RUN-PROGRAM:SLURP-INPUT-STREAM tries to slurp input from the stream T, and gets an error that this is an invalid destination:

Invalid UIOP/RUN-PROGRAM:SLURP-INPUT-STREAM destination T

The first argument to s-i-s is t, and the second is a character input file stream.

Looking at RUN-PROGRAM this shows that the USE-SYSTEM local function is getting T, a bad value, as the value of OUTPUT.

This value comes from ASDF/BACKWARD-INTERFACE::RUN-SHELL-COMMAND.

AFAICT, this is because that function inappropriately passes the value of *VERBOSE-OUT* to the :OUTPUT keyword argument of RUN-SHELL-COMMAND. I am not sure what the output-processor in run-program is supposed to be so I'm afraid I don't know how to fix this.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I flagged this as CRITICAL, because it means that the current version of ASDF cannot be incorporated in an Allegro distribution.

Changed in asdf:
importance: Undecided → Critical
Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Running this again, in Allegro's Emacs Lisp Interface, which does not hide the output of the shell commands, as SLIME does, I see this error:

; $ cd "/Users/rpg/stratus/stratus-trunk/code/externals/fast-downward/src/" ; ./build_all
exec: Too few arguments.
Error: Invalid UIOP/RUN-PROGRAM:SLURP-INPUT-STREAM destination T

EXCL:RUN-SHELL-COMMAND is not in the backtrace, so I guess that it terminated, returning some stream with the output, and we are trying to tap that off.

The value of INTERACTIVE is NIL, so that value is passed to EXCL:RUN-SHELL-COMMAND, meaning that the input and output are inherited from the lisp process, which is probably why I see the output when I run ELI, and not when I run SLIME.

Could this be part of the problem?

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

OK, traced EXCL:RUN-SHELL-COMMAND inside my build. I can clearly see what's the problem:

(RUN-SHELL-COMMAND "exec > /var/folders/xq/ll1d80qs7hnbw3253yc1_x6m0000gn/T/tmpqtucqs ; cd \"/Users/rpg/stratus/stratus-trunk/code/externals/fast-downward/src/\" ; ./build_all"
         :INPUT NIL
         :OUTPUT NIL
         :WAIT T)

Revision history for this message
Faré (fahree) wrote :

Behaviour of run-shell-command was never portable or reliable, but I added T as an alias for *standard-output* in ASDF 2.33.5. Please test.

Also, RUN-SHELL-COMMAND is deprecated and its use is STRONGLY discouraged. Please use UIOP:RUN-PROGRAM instead.

Changed in asdf:
assignee: nobody → Faré (fahree)
importance: Critical → Low
status: New → Fix Committed
Revision history for this message
Faré (fahree) wrote :

Released in ASDF 3.0.1

Changed in asdf:
milestone: none → version3
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.