[Gbbopen-developer] portable threads on sbcl 64bit linux tests fail with pristine source
Dan Corkill
corkill at gbbopen.org
Thu Oct 25 04:11:03 EDT 2007
Antony Sequeira wrote:
> Current tests take too long.
> They show 0 but the actual time taken is quite a few minutes.
> May be it just needs to also show real time
The portable-threads tests are intended to stress/measure the underlying
CL implementation and, for the most part, we are interested in the CPU
expenditures (run times). Nevertheless, running the tests should take
under a minute of real time. So if you are observing much longer
real-time execution, some further investigation is needed. I've added
some real-time reporting (following your suggestion) to help identify
where unexpectedly long real-time delays are encountered.
I also added a portable-threads-level mutex-p check for SBCL in
portable-threads.lisp, as I discovered a case where calling
with-lock-held with a non-lock object could deadlock the OS-level thread
signaling.
Below is the output that I obtained running the latest
portable-threads-test on SBCL Linux using a fairly old x86/32 laptop.
The tests completed in under 30 seconds real time.
> ;; Starting portable threads tests...
> ;; Performing basic lock tests...
> ;; Timing 1000000 nonrecursive-lock acquisitions... 0.902 seconds
> ;; Timing 1000000 recursive-lock acquisitions... 0.912 seconds
> ;; Timing 1000000 condition-variable lock acquisitions... 0.93 seconds
> ;; Checking with a non-lock object...
> ;; Testing recursive locking with a recursive lock...
> ;; Checking recursive locking with a non-recursive lock...
> ;; Testing with-lock-held returned values...
> ;; Basic lock tests completed (2.84 seconds real time).
> ;; Testing atomic-incf/decf...
> ;; Atomic-incf/decf test completed.
> ;; Performing with-timeout tests...
> ;; With-timeout tests completed
> ;; Performing basic thread tests...
> ;; Timing (sleep 0), run time should be zero seconds... 0.0 seconds
> ;; Timing (sleep 10), run time should also be zero seconds... 0.0 seconds
> ;; Timing 100000 (sleep 0)s... 0.319 seconds
> ;; Timing 100000 throwable (sleep 0)s... 0.319 seconds
> ;; Basic thread tests completed (11.21 seconds real time).
> ;; Performing nonrecursive lock contention tests...
> ;; Nonrecursive lock contention tests completed
> ;; Performing recursive lock contention tests...
> ;; Recursive lock contention tests completed
> ;; Performing condition-variable wait & signal tests...
> ;; Also waiting on CV...
> ;; Waiting on CV...
> ;; Signaling CV...
> ;; Also continuing on CV...
> ;; Re-signaling CV...
> ;; Continuing on CV...
> ;; Condition-variable wait & signal tests completed
> ;; Performing condition-variable wait & broadcast tests...
> ;; Also waiting on broadcast CV...
> ;; Waiting on broadcast CV...
> ;; Signaling CV to all...
> ;; Continuing on broadcast CV...
> ;; Also continuing on broadcast CV...
> ;; Condition-variable wait & broadcast tests completed
> ;; Performing condition-variable-wait-with-timeout (non-timeout) tests...
> ;; Also waiting-with-timeout on CV...
> ;; Waiting-with-timeout on CV...
> ;; Signaling waiting-with-timeout CV...
> ;; Also continuing on waiting-with-timeout CV...
> ;; Re-signaling waiting-with-timeout CV...
> ;; Continuing on waiting-with-timout CV...
> ;; Condition-variable wait-with-timeout (non-timeout) tests completed
> ;; Performing condition-variable wait-with-timeout (timeout) tests...
> ;; Waiting-with-timeout (forever) on CV...
> ;; Continuing without CV...
> ;; Condition-variable wait-with-timeout (timeout) tests completed
> ;; Timing 10000 condition-variable wait & signals... 0.073 seconds
> ;; Condition-variable wait & signal timing test completed
> ;; (0.09 seconds real time).
> ;; Performing thread timing tests...
> ;; Timing 10000 spawn-threads... 1.006 seconds
> ;; Timing 10000 spawn and die threads... 1.017 seconds
> ;; Thread timing tests completed (1.59 seconds real time).
> ;; Performing hibernate/awaken thread tests...
> ;; Hibernate ready signal received.
> ;; Hibernating...
> ;; Awakening thread...
> ;; Awakened
> ;; Waiting on proceed message...
> ;; Awake signal received, signaling proceed.
> ;; Waiting for rehibernate signal...
> ;; Proceed signal received, signaling rehibernate.
> ;; Rehibernating...
> ;; Rehibernate ready signal received.
> ;; Trying symbol-value-in-thread on hibernating thread...
> ;; Re-awakening thread...
> ;; Re-awakened
> ;; Trying with-timeout on a hibernating thread...
> ;; Hibernate/awaken thread tests completed
> ;; Performing symbol-value-in-thread tests...
> ;; Binding thread hibernating...
> ;; Binding thread awakened.
> ;; Symbol-value-in-thread tests completed
> ;; Checking for unreclaimed threads...
> ;; Portable threads tests completed (26.41 seconds real time).
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Gbbopen-developer
mailing list