--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: cmucl: RUN-PROGRAM hangs sometimes (with :OUTPUT :STREAM)
- From: Don Geddis <don@geddis.org>
- Date: Mon, 04 Aug 2003 11:22:37 -0700
- Message-id: <E19jjyf-0006tS-00@sidious.geddis.org>
Package: cmucl
Version: 3.1.4
Severity: normal
A very, very odd combination of features is causing RUN-PROGRAM to hang for
me. I'm having trouble debugging it further, so I thought I'd ask for
suggestions.
I'm running on Debian (testing), using the CMUCL packages v3.1.4, although the
header when I start lisp says "3.1.2 18d+ 24 September 2002". I've confirmed
this behavior with both the "cmucl-small" core as well as the "cmucl-safe"
core.
It happens that I'm trying to run the program "identify" from the
imagemagick (5.4.4.5-1) package, but I suspect that isn't critical.
What _is_ important (?) is that identify usually returns a single line of
output, but on some files (animated GIFs) will return multiple output lines.
OK, enough preable. Here's the call the fails:
(run-program "identify" '("/home/geddis/file123456789.gif") :output :stream)
Attempting to execute this results in a call that never returns. I can
^C out of it, however. The backtrace is:
0: ("Foreign function call land")
1: ("Foreign function call land")
2: ("Foreign function call land")
3: ("Foreign function call land")
4: ("Foreign function call land")
5: (#:G144)[:CLEANUP]
6: (COMMON-LISP::SUB-SERVE-EVENT 1 0)
7: (SYSTEM:SERVE-ALL-EVENTS 1)
8: (PROCESS-WAIT #<process 18791 :RUNNING> NIL)
9: (RUN-PROGRAM "identify"
("identify" "/home/geddis/file123456789.gif")
:ENV
NIL
...)
10: (INTERACTIVE-EVAL
(RUN-PROGRAM "identify"
'("/home/geddis/file123456789.gif")
:OUTPUT
:STREAM))
11: (COMMON-LISP::%TOP-LEVEL)
12: (COMMON-LISP::RESTART-LISP)
Now comes the odd part. Most "similar" calls work just fine. I have
discovered that _all_ of the following features are critical:
1. The file path must be at least that long. Simply renaming the file to
"file12345678.gif" (or anything shorter) results in everything working just
fine. But if I make it as long as the example above, or longer, using
either the file name or additional subdirectories, then the call hangs.
2. The file itself must be an animated GIF. I suspect the significance of
this is that "identify" returns a single line of output for most GIF images,
but multiple lines of output for animated GIFs.
3. :OUTPUT :STREAM is required. If I do :OUTPUT T instead, for example, then
the call completes just fine.
_Something_ really odd sure is going on. From the behavior, dependent on
the length of a string argument, it sure leads me to suspect some kind of
C buffer overflow.
Any ideas? Patches? Workarounds?
Much appreciated,
-- Don
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux sidious 2.4.20-3-686 #1 Sat Jun 7 22:34:55 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C
Versions of packages cmucl depends on:
ii common-lisp-controller 3.67 This is a Common Lisp source and c
ii libc6 2.3.1-16 GNU C Library: Shared libraries an
-- no debconf information
--- End Message ---