Opened 14 months ago

Last modified 3 weeks 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: 5.3
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 (2)

comment:1 Changed 3 months ago by sjamaan

Milestone: someday5.2

comment:2 Changed 3 weeks ago by felix winkelmann

Milestone: 5.25.3
Note: See TracTickets for help on using tickets.