Opened 4 months ago

#1486 new defect

Reading and writing to a pipe set up by process can cause scheduler assertion errors

Reported by: sjamaan Owned by:
Priority: major Milestone: someday
Component: core libraries Version: 4.13.0
Keywords: Cc:
Estimated difficulty: hard

Description

As pointed out in this StackOverflow post:

(use posix)
(let-values (((in out pid) (process "bc")))
  (begin
    (display "2 + 2\n" out)
    (print (read-line in))))

Causes the following crash when evaluated:

thread is registered for I/O on unknown file-descriptor: 4 (expected 3)
[] 
...more...
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<eval>
<eval>
<eval>
<eval>
<eval>  <--

This bug is not easy to trigger. I happened to get "lucky" and it crashed the first time, but after that I tried again several times and it just worked.

Change History (0)

Note: See TracTickets for help on using tickets.