RUN-PROGRAM is not multi-thread safe

Bug #1810856 reported by Ilya Perminov on 2019-01-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

RUN-PROGRAM produces random IO-related errors when it is used concurrently from several threads. 1.4.15 is broken, but 1.4.12 works fine. So, the bug is probably caused by the recent RUN-PROGRAM changes.
Environment: Ubuntu 18.04, Linux 3.13.0-161-generic #211-Ubuntu SMP x86_64.

Ilya Perminov (iperminov) wrote :
Ilya Perminov (iperminov) wrote :

Errors:

(#<SB-IMPL::HANDLER INPUT on BOGUS descriptor 5: #<CLOSURE (LAMBDA
                                                               (
                                                                SB-IMPL::FD)
                                                             :IN
                                                             SB-IMPL::SETUP-SERVE-EVENT-PIPE) {10049FD83B}>>) has a bad file descriptor.
[Condition of type SIMPLE-ERROR]

Restarts:
0: [REMOVE-THEM] Remove bogus handlers.
1: [RETRY-THEM] Retry bogus handlers.
2: [CONTINUE] Go on, leaving handlers marked as bogus.
3: [ABORT] abort thread (#<THREAD RUNNING {10049E2D13}>)

Backtrace:
0: (SB-IMPL::HANDLER-DESCRIPTORS-ERROR (#<SB-IMPL::HANDLER INPUT on BOGUS descriptor 5: #<CLOSURE (LAMBDA (SB-IMPL::FD) :IN SB-IMPL::SETUP-SERVE-EVENT-PIPE) {10049FD83B}>>))
1: (SB-IMPL::SUB-SERVE-EVENT 10 0 NIL)
2: (SB-SYS:SERVE-ALL-EVENTS 10)
3: (PROCESS-WAIT #<SB-IMPL::PROCESS :EXITED 0> NIL)

Couldn't write to #<SB-SYS:FD-STREAM for "descriptor 7" {10040833B3}>:
Bad file descriptor
[Condition of type SB-INT:SIMPLE-STREAM-ERROR]

Restarts:
0: [ABORT] abort thread (#<THREAD RUNNING {100406CC03}>)

Backtrace:
0: (SB-IMPL::FLUSH-OUTPUT-BUFFER #<SB-SYS:FD-STREAM for "descriptor 7" {10040833B3}>)
1: (SB-IMPL::FINISH-FD-STREAM-OUTPUT #<SB-SYS:FD-STREAM for "descriptor 7" {10040833B3}>)
2: (SB-IMPL::FD-STREAM-MISC-ROUTINE #<SB-SYS:FD-STREAM for "descriptor 7" {10040833B3}> :CLOSE NIL #<unused argument>)
3: ((:METHOD CLOSE (SB-KERNEL:ANSI-STREAM)) #<SB-SYS:FD-STREAM for "descriptor 7" {10040833B3}> :ABORT NIL) [fast-method]

Stas Boukarev (stassats) wrote :

Can't reproduce on 1.4.15.38

Changed in sbcl:
status: New → Fix Committed
Ilya Perminov (iperminov) wrote :

Thanks a lot!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments