RUN-PROGRAM is not multi-thread safe

Bug #1810856 reported by Ilya Perminov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
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.

Revision history for this message
Ilya Perminov (iperminov) wrote :
Revision history for this message
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]

Revision history for this message
Stas Boukarev (stassats) wrote :

Can't reproduce on 1.4.15.38

Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Ilya Perminov (iperminov) wrote :

Thanks a lot!

Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.