[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MIT-Scheme-devel] Edwin cannot run `M-x shell' on Mac OS 10.8
From: |
Rich Loveland |
Subject: |
[MIT-Scheme-devel] Edwin cannot run `M-x shell' on Mac OS 10.8 |
Date: |
Sat, 22 Jun 2013 22:00:09 -0400 |
User-agent: |
IMAIL/1.21; Edwin/3.116; MIT-Scheme/9.1.1 |
Date: Sat, 22 Jun 2013 22:18:42 +0000
From: Taylor R Campbell <address@hidden>
M-x set-variable RET debug-on-internal-error RET #t RET
Ah, thanks. Here it is:
The error that started the debugger is:
The primitive channel-nonblocking, while executing the fcntl-setfl system
call, received the error: Inappropriate ioctl for device.
S0 (channel-nonblocking 2)
S1 (channel-nonblocking channel)
S2 (let ((channel (subprocess-input-channel subprocess))) (if channel (be ...
S3 (let ((program (or (%record-ref edwin-variable$explicit-shell-file-nam ...
S4 (apply procedure (interactive-arguments command record?))
S5 (apply procedure (interactive-arguments command record?))
S6 (if (queue-empty? command-reader-override-queue) (let ((input (get-nex ...
S7 (bind-abort-editor-command (lambda () (let do-loop () (reset-command-s ...
S8 (bind-condition-handler (cons condition-type:error (quote ())) interna ...
S9 (bind-abort-restart cmdl (lambda () (deregister-all-events) (with-inte ...
S10 (procedure (car l))
S11 (for-each (lambda (act) (act)) (reverse after-parsing-actions))
S12 (apply (car receivers) (cdr event))
S13 (procedure item)
S14 (procedure (car l))
S15 (ignore-errors (lambda () ((->cmdl-message message) cmdl)))
>S16 (bind-abort-restart cmdl (lambda () (deregister-all-events) (with-inte ...
That's not the error in question -- look for fcntl(..., F_SETFL, ...),
or the numeric value from <sys/fcntl.h> instead of F_SETFL. It looks
like this is probably the failure:
fcntl(0x5, 0x4, 0x6) = -1 Err#25
I've attached some more dtruss output. I think this is the bit (line
1197) where I `M-x shell' for the first time:
access("/bin/bash\0", 0x1, 0x7800000000000000) = 0 0
open("/dev/ptmx\0", 0x20002, 0x0) = 15 0
ioctl(0xF, 0x20007454, 0x0) = 0 0
ioctl(0xF, 0x20007452, 0x0) = 0 0
ioctl(0xF, 0x40807453, 0x7FFF7AB72DC0) = 0 0
stat64("/dev/ttys012\0", 0x7FFF5FBFF890, 0x0) = 0 0
Later (on line 1254), an operation on a file descriptor with the same
number fails (debugger opens):
fcntl(0xF, 0x3, 0x0) = 2 0
fcntl(0xF, 0x4, 0x6) = -1 Err#25
If I keep trying `M-x shell', I fail and fail as expected (Tried
dozens of times in a row to be reasonably sure).
However, when I attach dtruss to the Scheme process, I can retry a few
times, and eventually the inferior shell will start, albeit more
slowly than normal. This is represented around line 4152, when I try
to start the shell again:
access("/bin/bash\0", 0x1, 0x7800000000000000) = 0 0
open("/dev/ptmx\0", 0x20002, 0x0) = 16 0
ioctl(0x10, 0x20007454, 0x0) = 0 0
ioctl(0x10, 0x20007452, 0x0) = 0 0
ioctl(0x10, 0x40807453, 0x7FFF7AB72DC0) = 0 0
stat64("/dev/ttys013\0", 0x7FFF5FBFF890, 0x0) = 0 0
This time, it works and the inferior shell starts up (line 4211):
fcntl(0x10, 0x3, 0x0) = 2 0
fcntl(0x10, 0x4, 0x6) = 0 0
I verified this ``intermittent start with dtruss running'' behavior
several more times. My guess is that for some reason dtruss is
slowing Scheme down enough for this command to work. Of course I don't
know enough to know why, that's why I'm here. :-}
Hope that helps. Thanks for looking into this.
edwin-dmg-dtruss-output2.txt
Description: Text document