Bug #47825 Unit test mysys/waiting_threads-t hangs
Submitted: 5 Oct 2009 8:14 Modified: 4 Feb 2013 11:14
Reporter: Olav Sandstå Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:6.0.14 OS:Any
Assigned to: CPU Architecture:Any

[5 Oct 2009 8:14] Olav Sandstå
Description:
When running the unit tests on Solaris 10 on SPARC the test mysys/waiting_threads-t hangs. A process named "waiting_threads" is running and using all CPU cycles on one of the CPUs.

Output from running the unit tests:

os136802@techra29:~/<2>repo/6.0-bugfix-sparc> make test
cd unittest; make test
make[1]: Entering directory `/home/os136802/mysql/develop/repo/6.0-bugfix-sparc/unittest'
perl unit.pl run mytap mysys backup  ../storage/archive ../storage/blackhole ../storage/csv ../storage/example ../storage/federated ../storage/heap ../storage/innobase ../storage/myisammrg ../storage/myisam ../plugin/audit_null ../plugin/daemon_example ../plugin/fulltext ../plugin/semisync ../dbug
Running tests: mytap mysys backup ../storage/archive ../storage/blackhole ../storage/csv ../storage/example ../storage/federated ../storage/heap ../storage/innobase ../storage/myisammrg ../storage/myisam ../plugin/audit_null ../plugin/daemon_example ../plugin/fulltext ../plugin/semisync ../dbug
mytap/t/basic-t.................ok                                           
        2/5 skipped: Sensa fragoli
mysys/bitmap-t..................ok                                           
mysys/base64-t..................ok                                           
mysys/safe_cleanup_cat_path-t...ok                                           
mysys/my_atomic-t...............ok                                           
mysys/lf-t......................ok                                           
mysys/waiting_threads-t.........ok 11/12

How to repeat:
1. Use the source from a 6.0 tree
2. ./BUILD/autorun.sh
3. Run configure like this:

./configure CC=/opt/studio12/SUNWspro/bin/cc CXX=/opt/studio12/SUNWspro/bin/CC CFLAGS="-Xa -m64 -mt -g" CXXFLAGS="-m64 -mt -g" --prefix=/home/os136802/install/mysql6 --with-client-ldflags=-static --with-plugins=myisam,innobase --enable-dtrace --with-debug 

4. make
5. Run the unit tests:

    make test

The test run should "hang" when getting to "mysys/waiting_threads-t.........ok 11/12" (for me it hang for over an hour before I killed the test).
[5 Oct 2009 8:22] Olav Sandstå
* The test passes when configuring and compiling MySQL the exact same way on Solaris 10 running on an AMD machine 

* The test passes on Linux
[6 Oct 2009 14:50] Sveta Smirnova
Thank you for the report.

Verified as described.
[27 Nov 2009 21:55] Olav Sandstå
On Solaris 10 on SPARC this seems to be repeatable on every run. But I do not think it is limited to Solaris/SPARC. I have seen this test at least once hang "forever" using all CPU on my laptop which runs Ubuntu on a single-core AMD processor:

mytap/t/basic-t.................ok                                           
        2/5 skipped: various reasons
mysys/safe_cleanup_cat_path-t...ok                                           
mysys/my_rdtsc-t................ok                                           
mysys/lf-t......................ok                                           
mysys/waiting_threads-t.........ok 11/12 

At this time the waiting_threads process has used 172 CPU minutes (and is still running).
[4 Feb 2013 11:14] Dmitry Lenev
Hello!

waiting_threads-t is a unit test for code from mysys/waiting_threads.c.
Apart from now now abandoned 6.0 tree the latter is present in sources for 5.6 releases but is not really invoked from anywhere.

mysys/waiting_threads.c was removed from server sources in 5.7.1, and corresponding unit test is not even present in current version of 5.6.

Due to this the bug is no longer relevant and I am closing it as "Won't fix."