Opened 6 years ago

Last modified 5 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: 6.0.0
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 (4)

comment:1 Changed 5 years ago by sjamaan

Milestone: someday5.2

comment:2 Changed 5 years ago by felix winkelmann

Milestone: 5.25.3

comment:3 Changed 3 years ago by felix winkelmann

Milestone: 5.35.4

comment:4 Changed 5 months ago by felix winkelmann

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