Bug 184425 - lang/sbcl 1.1.12,1 fails to build with THREADS option
Summary: lang/sbcl 1.1.12,1 fails to build with THREADS option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-02 04:30 UTC by Joseph Mingrone
Modified: 2015-12-02 08:22 UTC (History)
7 users (show)

See Also:


Attachments
disable all threaded mailbox tests in sb-concurrency (501 bytes, patch)
2015-01-15 19:59 UTC, sean
no flags Details | Diff
Update to 1.2.9 (18.97 KB, patch)
2015-03-02 12:26 UTC, Ashish SHUKLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Mingrone freebsd_committer freebsd_triage 2013-12-02 04:30:00 UTC
Attempting to build the port with threads turned on gives the error
below.

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/frlock-ASDF-TMP.fasl written
; compilation finished in 0:00:00.048
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/queue.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :SB-CONCURRENCY)
; compiling (DEFCONSTANT +DUMMY+ ...)
; compiling (DEFCONSTANT +DEAD-END+ ...)
; compiling (DECLAIM (INLINE %MAKE-QUEUE))
; compiling (DEFSTRUCT (QUEUE # ...) ...)
; compiling (SETF (DOCUMENTATION # ...) ...)
; compiling (DEFUN MAKE-QUEUE ...)
; compiling (DEFUN ENQUEUE ...)
; compiling (DEFUN DEQUEUE ...)
; compiling (DEFUN TRY-WALK-QUEUE ...)
; compiling (DEFUN LIST-QUEUE-CONTENTS ...)
; compiling (DEFUN QUEUE-COUNT ...)
; compiling (DEFUN QUEUE-EMPTY-P ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/queue-ASDF-TMP.fasl written
; compilation finished in 0:00:00.023
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/mailbox.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :SB-CONCURRENCY)
; compiling (DEFSTRUCT (MAILBOX # ...) ...)
; compiling (SETF (DOCUMENTATION # ...) ...)
; compiling (DEFUN MAKE-MAILBOX ...)
; compiling (DEFMETHOD PRINT-OBJECT ...)
; compiling (DEFUN MAILBOX-COUNT ...)
; compiling (DEFUN MAILBOX-EMPTY-P ...)
; compiling (DEFUN LIST-MAILBOX-MESSAGES ...)
; compiling (DEFUN SEND-MESSAGE ...)
; compiling (DEFUN RECEIVE-MESSAGE ...)
; compiling (DEFUN RECEIVE-MESSAGE-NO-HANG ...)
; compiling (DEFUN RECEIVE-PENDING-MESSAGES ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/mailbox-ASDF-TMP.fasl written
; compilation finished in 0:00:00.055
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/gate.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :SB-CONCURRENCY)
; compiling (DEFSTRUCT (GATE # ...) ...)
; compiling (SETF (DOCUMENTATION # ...) ...)
; compiling (DEFMETHOD PRINT-OBJECT ...)
; compiling (DEFUN MAKE-GATE ...)
; compiling (DEFUN OPEN-GATE ...)
; compiling (DEFUN CLOSE-GATE ...)
; compiling (DEFUN WAIT-ON-GATE ...)
; compiling (DEFUN GATE-OPEN-P ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/gate-ASDF-TMP.fasl written
; compilation finished in 0:00:00.042
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/sb-concurrency.lisp" (written 01 DEC 2013 10:13:52 PM):
; compiling (UNLESS (MEMBER "ASDF" ...) ...)
; compiling (LET (#) ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/sb-concurrency.fasl written
; compilation finished in 0:00:00.002
echo "(pushnew :sb-testing-contrib *features*)" \
     "(asdf:operate (quote asdf:load-op) :sb-concurrency)" \
     "(asdf:operate (quote asdf:test-op) :sb-concurrency)" | \
  /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/src/runtime/sbcl --noinform --core /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/output/sbcl_core --lose-on-corruption --disable-debugger --no-sysinit --no-userinit --eval '(load "../asdf/asdf")'
* 
(:SB-TESTING-CONTRIB :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P
 :ASDF-UNICODE :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS :BSD
 :C-STACK-IS-CONTROL-STACK :COMMON-LISP :COMPARE-AND-SWAP-VOPS
 :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :ELF :FLOAT-EQL-VOPS :FREEBSD :GCC-TLS
 :GENCGC :IEEE-FLOATING-POINT :INLINE-CONSTANTS :LINKAGE-TABLE :LITTLE-ENDIAN
 :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS :OS-PROVIDES-BLKSIZE-T
 :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :OS-PROVIDES-GETPROTOBY-R
 :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T
 :PACKAGE-LOCAL-NICKNAMES :RAW-INSTANCE-INIT-VOPS :SB-CORE-COMPRESSION :SB-DOC
 :SB-EVAL :SB-LDB :SB-PACKAGE-LOCKS :SB-QSHOW :SB-SIMD-PACK
 :SB-SOURCE-LOCATIONS :SB-TEST :SB-THREAD :SB-UNICODE :SBCL
 :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS
 :STACK-GROWS-DOWNWARD-NOT-UPWARD :UNIX :UNWIND-TO-FRAME-AND-CALL-VOP :X86-64)
* 
#<ASDF/LISP-ACTION:LOAD-OP >
#<ASDF/PLAN:SEQUENTIAL-PLAN {10036D6F53}>
* 
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/package.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :CL-USER)
; compiling (DEFPACKAGE :SB-CONCURRENCY-TEST ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/package-ASDF-TMP.fasl written
; compilation finished in 0:00:00.003
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-utils.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :SB-CONCURRENCY-TEST)
; compiling (DEFPARAMETER +TIMEOUT+ ...)
; compiling (DEFUN MAKE-THREADS ...)
; compiling (DEFUN TIMED-JOIN-THREAD ...)
; compiling (DEFUN HANG ...)
; compiling (DEFUN KILL-THREAD ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-utils-ASDF-TMP.fasl written
; compilation finished in 0:00:00.019
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-frlock.lisp" (written 01 DEC 2013 10:09:41 PM):
; compiling (IN-PACKAGE :SB-CONCURRENCY-TEST)
; compiling (DEFMACRO DEFTEST* ...)
; compiling (DEFUN TEST-FRLOCKS ...)
; compiling (DEFTEST* (FRLOCK.1 :FAILS-ON ...) ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-frlock-ASDF-TMP.fasl written
; compilation finished in 0:00:00.043
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-queue.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :SB-CONCURRENCY-TEST)
; compiling (DEFTEST QUEUE.1 ...)
; compiling (DEFTEST QUEUE.2 ...)
; compiling (DEFTEST QUEUE.3 ...)
; compiling (DEFTEST QUEUE.4 ...)
; compiling (DEFTEST QUEUE.5 ...)
; compiling (DEFTEST QUEUE.T.1 ...)
; compiling (DEFTEST QUEUE.T.2 ...)
; compiling (DEFTEST QUEUE.T.3 ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-queue-ASDF-TMP.fasl written
; compilation finished in 0:00:00.005
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-mailbox.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :SB-CONCURRENCY-TEST)
; compiling (DEFTEST MAILBOX-TRIVIA.1 ...)
; compiling (DEFTEST MAILBOX-TRIVIA.2 ...)
; compiling (DEFTEST MAILBOX-TRIVIA.3 ...)
; compiling (DEFTEST MAILBOX-TIMEOUTS ...)
; compiling (DEFSTRUCT COUNTER ...)
; compiling (DEFUN RECEIVER-DISTRIBUTION ...)
; compiling (DEFUN TEST-MAILBOX-PRODUCERS-CONSUMERS ...)
; compiling (DEFTEST MAILBOX.SINGLE-PRODUCER-SINGLE-CONSUMER ...)
; compiling (DEFTEST MAILBOX.SINGLE-PRODUCER-MULTIPLE-CONSUMERS ...)
; compiling (DEFTEST MAILBOX.MULTIPLE-PRODUCERS-SINGLE-CONSUMER ...)
; compiling (DEFTEST MAILBOX.MULTIPLE-PRODUCERS-MULTIPLE-CONSUMERS ...)
; compiling (DEFTEST MAILBOX.INTERRUPTS-SAFETY.1 ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-mailbox-ASDF-TMP.fasl written
; compilation finished in 0:00:00.062
; compiling file "/ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-gate.lisp" (written 30 SEP 2013 10:15:42 AM):
; compiling (IN-PACKAGE :SB-CONCURRENCY-TEST)
; compiling (DEFTEST GATE.0 ...)
; compiling (DEFTEST GATE.1 ...)
; compiling (DEFTEST GATE.2 ...)
; compiling (DEFTEST GATE-DEADLINE.1 ...)
; compiling (DEFTEST GATE-DEADLINE.2 ...)
; compiling (DEFTEST GATE-TIMEOUT.1 ...)
; compiling (DEFTEST GATE-TIMEOUT.2 ...)

; /ram/usr/ports/lang/sbcl/work/sbcl-1.1.12/contrib/sb-concurrency/tests/test-gate-ASDF-TMP.fasl written
; compilation finished in 0:00:00.004
Doing 25 pending tests of 25 tests total.
Test SB-CONCURRENCY-TEST::FRLOCK.1 failed
Form: (HANDLER-CASE
       (WITH-TIMEOUT 60
         (SB-CONCURRENCY-TEST::TEST-FRLOCKS))
       (TIMEOUT (SB-CONCURRENCY-TEST::C) (ERROR "~A" SB-CONCURRENCY-TEST::C)))
Expected values: NIL
                 NIL
Actual value: #<SIMPLE-ERROR "~A" {1005FE8773}>.
 SB-CONCURRENCY-TEST::QUEUE.1 SB-CONCURRENCY-TEST::QUEUE.2
 SB-CONCURRENCY-TEST::QUEUE.3 SB-CONCURRENCY-TEST::QUEUE.4
 SB-CONCURRENCY-TEST::QUEUE.5 SB-CONCURRENCY-TEST::QUEUE.T.1
 SB-CONCURRENCY-TEST::QUEUE.T.2 SB-CONCURRENCY-TEST::QUEUE.T.3
 SB-CONCURRENCY-TEST::MAILBOX-TRIVIA.1 SB-CONCURRENCY-TEST::MAILBOX-TRIVIA.2
 SB-CONCURRENCY-TEST::MAILBOX-TRIVIA.3
Test SB-CONCURRENCY-TEST::MAILBOX-TIMEOUTS failed
Form: (LET* ((SB-CONCURRENCY-TEST::MBOX (SB-CONCURRENCY:MAKE-MAILBOX))
             (SB-CONCURRENCY-TEST::WRITERS
              (LOOP SB-CONCURRENCY-TEST::FOR SB-CONCURRENCY-TEST::I SB-CONCURRENCY-TEST::FROM 1 SB-CONCURRENCY-TEST::UPTO 20
                    SB-CONCURRENCY-TEST::COLLECT (SB-THREAD:MAKE-THREAD
                                                  (LAMBDA
                                                      (SB-CONCURRENCY-TEST::X)
                                                    (LOOP SB-CONCURRENCY-TEST::REPEAT 50
                                                          DO (SB-CONCURRENCY:SEND-MESSAGE
                                                              SB-CONCURRENCY-TEST::MBOX
                                                              SB-CONCURRENCY-TEST::X) (SLEEP
                                                                                       0.001)))
                                                  :ARGUMENTS
                                                  SB-CONCURRENCY-TEST::I)))
             (SB-CONCURRENCY-TEST::READERS
              (LOOP SB-CONCURRENCY-TEST::REPEAT 10
                    SB-CONCURRENCY-TEST::COLLECT (SB-THREAD:MAKE-THREAD
                                                  (LAMBDA ()
                                                    (LOOP SB-CONCURRENCY-TEST::WHILE (SB-CONCURRENCY:RECEIVE-MESSAGE
                                                                                      SB-CONCURRENCY-TEST::MBOX
                                                                                      :TIMEOUT
                                                                                      0.1)
                                                          COUNT T))))))
        (MAPC #'SB-THREAD:JOIN-THREAD SB-CONCURRENCY-TEST::WRITERS)
        (APPLY #'+
               (MAPCAR #'SB-THREAD:JOIN-THREAD SB-CONCURRENCY-TEST::READERS)))
Expected value: 1000
Actual value: 998.
Test SB-CONCURRENCY-TEST::MAILBOX.SINGLE-PRODUCER-SINGLE-CONSUMER failed
Form: (SB-CONCURRENCY-TEST::TEST-MAILBOX-PRODUCERS-CONSUMERS :N-SENDERS 1
                                                             :N-RECEIVERS 1
                                                             :N-MESSAGES 1000)
Expected values: (:RECEIVED . 1000)
                 (:GARBAGE . 0)
                 (:ERRORS . 0)
                 (:TIMEOUTS . 0)
Actual values: (:RECEIVED . 69)
               (:GARBAGE . 0)
               (:ERRORS . 0)
               (:TIMEOUTS . 1).
 SB-CONCURRENCY-TEST::MAILBOX.SINGLE-PRODUCER-MULTIPLE-CONSUMERS
 SB-CONCURRENCY-TEST::MAILBOX.MULTIPLE-PRODUCERS-SINGLE-CONSUMER
 SB-CONCURRENCY-TEST::MAILBOX.MULTIPLE-PRODUCERS-MULTIPLE-CONSUMERS
 SB-CONCURRENCY-TEST::MAILBOX.INTERRUPTS-SAFETY.1 SB-CONCURRENCY-TEST::GATE.0
 SB-CONCURRENCY-TEST::GATE.1 SB-CONCURRENCY-TEST::GATE.2
 SB-CONCURRENCY-TEST::GATE-DEADLINE.1 SB-CONCURRENCY-TEST::GATE-DEADLINE.2
 SB-CONCURRENCY-TEST::GATE-TIMEOUT.1 SB-CONCURRENCY-TEST::GATE-TIMEOUT.2
3 out of 25 total tests failed: SB-CONCURRENCY-TEST::FRLOCK.1, 
   SB-CONCURRENCY-TEST::MAILBOX-TIMEOUTS, 
   SB-CONCURRENCY-TEST::MAILBOX.SINGLE-PRODUCER-SINGLE-CONSUMER.
2 unexpected failures: SB-CONCURRENCY-TEST::MAILBOX-TIMEOUTS, 
   SB-CONCURRENCY-TEST::MAILBOX.SINGLE-PRODUCER-SINGLE-CONSUMER.
WARNING: ignoring expected failures in test-op
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                    {1002AB42F3}>:
  test-op failed with unexpected failures

..
..
..

WARNING! Some of the contrib modules did not build successfully or pass
their self-tests. Failed contribs:"
  sb-concurrency
      261.90 real       159.84 user       677.89 sys
*** [do-build] Error code 1

Stop in /usr/ports/lang/sbcl.
*** [build] Error code 1

Stop in /usr/ports/lang/sbcl.

===>>> make failed for lang/sbcl
===>>> Aborting update

===>>> Killing background jobs
Terminated

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> lang/sbcl 

===>>> Exiting
Script done on Sun Dec  1 22:17:53 2013

How-To-Repeat: Build with threads.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-02 06:04:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bf

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-14 23:24:05 UTC
This port currently has no maintainer, throwing PR on the heap
Comment 3 John Marino freebsd_committer freebsd_triage 2014-08-15 09:17:42 UTC
Jimmy might be interested, I put him in CC
Comment 4 sean 2015-01-15 19:59:39 UTC
Created attachment 151704 [details]
disable all threaded mailbox tests in sb-concurrency

This patch was added, and then later removed from the ports tree before. http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2011-January/204751.html

When I have some time I will find out why it is removed, but for now it allows SBCL to be compiled with threads.
Comment 5 Ashish SHUKLA freebsd_committer freebsd_triage 2015-03-02 12:26:01 UTC
Created attachment 153660 [details]
Update to 1.2.9

Hi there,

I'm working on updating lang/sbcl port and willing to maintain it as well. Could you please try the attached diff, which updates port to 1.2.9, and let me know your thoughts/suggestions if any ?

Thanks
Ashish
Comment 6 Joseph Mingrone freebsd_committer freebsd_triage 2015-03-02 15:03:58 UTC
Hi Ashish,

If you want to save yourself some time and energy, you could wait until 1.2.9.1. There was a bug, which broke building with threads, that was fixed after 1.2.9.

Joseph
Comment 7 Ashish SHUKLA freebsd_committer freebsd_triage 2015-03-09 08:54:29 UTC
(In reply to Joseph Mingrone from comment #6)

Hi Joseph,

Sorry for the delay in reply. Thanks for letting me know about this. I've checked with kib@ who submitted the fix, and maybe when updating port, we can kill an existing diff in lang/sbcl port.

I'm waiting for new SBCL release to happen before working on it further.

Thanks
Ashish
Comment 8 Ben Woods freebsd_committer freebsd_triage 2015-03-22 02:04:02 UTC
Port lang/sbcl has just been updated to version 1.2.9. Can you please confirm if this has fixed this issue?
Comment 9 Joseph Mingrone freebsd_committer freebsd_triage 2015-03-22 02:31:51 UTC
Unfortunately it doesn't build: http://pkg.trp.ftfl.ca/data/10amd64-default/2015-03-21_23h05m53s/logs/errors/sbcl-1.2.9,1.log

See my comment above about 1.2.9.  Building with threads with the latest code in the repo finishes without errors.  Hopefully there will be a new release from upstream soon.

Thanks for updating the port.
Comment 10 John Marino freebsd_committer freebsd_triage 2015-03-22 08:07:28 UTC
well, it is "experimental".
Let's just comment out the option so it doesn't show until it does build.
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-03-22 08:17:06 UTC
A commit references this bug:

Author: marino
Date: Sun Mar 22 08:16:56 UTC 2015
New revision: 381890
URL: https://svnweb.freebsd.org/changeset/ports/381890

Log:
  lang/sbcl: remove experimental THREADS option; it doesn't build

  PR:	184425, 198590

Changes:
  head/lang/sbcl/Makefile
Comment 12 Bartek Rutkowski freebsd_committer freebsd_triage 2015-03-29 11:37:37 UTC
The fix has been already committed, so I am closing this PR.