Consing inside without-gcing on sb-safepoint

Bug #1424031 reported by Robert Brown on 2015-02-20
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
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 ....

Robert Brown (robert-brown) wrote :
Stas Boukarev (stassats) on 2015-02-20
tags: added: sb-safepoint
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) on 2015-02-21
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
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)

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  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments