Consing inside without-gcing on sb-safepoint

Bug #1424031 reported by Robert Brown
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Medium
Unassigned

Bug Description

Recently built SBCL binaries on Linux x64 are hanging when running the
backtrace test in threads.impure.lisp.

Attached are the C and Lisp backtraces ....

Tags: sb-safepoint
Revision history for this message
Robert Brown (robert-brown) wrote :
Stas Boukarev (stassats)
tags: added: sb-safepoint
Revision history for this message
Stas Boukarev (stassats) wrote :

Test case:
(format t "~a~%" (sb-unix:unix-getpid))

(defun test ()
  (let ((threads
          (loop repeat 15
                collect (sb-thread:make-thread
                         (lambda ()
                           (let ((threads (sb-thread:list-all-threads)))
                             (dotimes (i 100000)
                               (with-output-to-string (stream)
                                 (let ((*print-pretty* nil)
                                       (*print-circle* t))
                                   (princ threads stream))))))))))
    (mapc #'sb-thread:join-thread threads)))

Changed in sbcl:
importance: Undecided → Medium
status: New → Triaged
Stas Boukarev (stassats)
summary: - hang running thread.impure backtrace test
+ Consing inside without gcing on sb-safepoint
summary: - Consing inside without gcing on sb-safepoint
+ Consing inside without-gcing on sb-safepoint
Revision history for this message
Stas Boukarev (stassats) wrote :

New test-case:
(format t "~a~%" (sb-unix:unix-getpid))

(defun do-something (x)
  (sb-sys:without-gcing
    (copy-seq x)))

(defun test ()
  (mapc #'sb-thread:join-thread
        (loop repeat 8
              collect
              (sb-thread:make-thread
               (lambda ()
                 (dotimes (i 100000000)
                   (let ((vector (make-array 1000)))
                     (loop for i to 1000
                           do
                           (do-something vector)))))))))

(test)

Revision history for this message
Alastair Bridgewater (alastair-bridgewater) wrote :

Commits 229d6eb7478904ad5228ea6a6bd3fa67053e2198, 5338e756b46022ef748b969cfc56f9053fe46b2e, and bcc6a2d83b6cd64322ab63600e2af6db103c5d49 all address various deadlock scenarios exercised by the test case in comment #3.

Changed in sbcl:
status: Triaged → Fix Committed
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.