Bug #55546 mysqltest fails to create a new thread on HPUX
Submitted: 26 Jul 2010 7:05 Modified: 14 Nov 2010 2:53
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S7 (Test Cases)
Version:M3 (Celosia), M4 (Dahlia) OS:HP/UX
Assigned to: Bjørn Munch CPU Architecture:Any
Tags: pb2, test failure

[26 Jul 2010 7:05] Alexander Nozdrin
Description:
A few tests fail on HPUX due to mysqltest failing to create
a new thread on HPUX:
------------------------------------------------------------------
main.lock_multi_bug38691 [ fail ]
        Test ended at 2010-07-23 08:45:42

CURRENT_TEST: main.lock_multi_bug38691
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100723  9:45:31  InnoDB: highest supported file format is Barracuda.
mysqltest: At line 54: Cannot start new thread for query
------------------------------------------------------------------

This bug has been made out of Bug#54510.

Daniel pointed out the failure reason:
------------------------------------------------------------------
This appears to be visible in 5.1-bugteam since May 2nd, when a rather large merge fixed
some other problems on hpux that caused test runs to abort. Meaning it likely has been
happening before as well but wasn't caught due to too many other failures.

The failure is in a test case that runs send/reap in a loop, and appears to fail after 32
iterations, meaning 64 send/reap pairs. If I had to hazard a guess I'd say that mysqltest
fails to properly dispose of finished threads after reap. The default thread limit per
process on hpux is 64. It could be increased beyond the 200 required to run this test
case, but only barely (maximum is 255 IIRC). I recommend fixing mysqltest instead.
------------------------------------------------------------------

How to repeat:
Check out PB.
[26 Jul 2010 8:18] Sveta Smirnova
Thank you for the report.

Verified as described using PB logs.
[30 Jul 2010 7:06] Anitha Gopi
Bjorn,
Assigning to you since this is MTR problem
[9 Sep 2010 8:03] Bjørn Munch
I was not able to reproduce with a recent 5.1 which I built on lit01. I even tried running a loop of 2000 and there was no problem. Where did you get the number 32 from?

If this was really the problem, lots of tests would fail, since mysqltest actually uses the send/reap mechanism for all queries.
[9 Sep 2010 8:22] Bjørn Munch
Ah wait, it's with the embedded server. I can reproduce, and it fails after 64 iterations.
[9 Sep 2010 12:58] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/117869

2929 Bjorn Munch	2010-09-09
      Bug #55546 mysqltest fails to create a new thread on HPUX
      Looks like we have to pthread_join().
      Added necessary code but only for HPUX
[14 Sep 2010 8:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/118146

3087 Bjorn Munch	2010-09-14
      Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
      Bug #55546 mysqltest fails to create a new thread on HPUX
      Missing call to pthread_join(), in embedded mode
      This independently solves both problems, see 55426 for details.
[14 Sep 2010 11:20] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/118189

2930 Bjorn Munch	2010-09-14
      Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
      Bug #55546 mysqltest fails to create a new thread on HPUX
      Missing call to pthread_join(), in embedded mode
      This independently solves both problems, see 55426 for details.
[14 Sep 2010 12:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/118196

2930 Bjorn Munch	2010-09-14
      Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
      Bug #55546 mysqltest fails to create a new thread on HPUX
      Missing call to pthread_join(), in embedded mode
      This independently solves both problems, see 55426 for details.
      Addendum: cannot test against a pthread_t, adds boolean flag instead
[14 Sep 2010 12:56] Bjørn Munch
Fix for Bug #55426 also solves this bug (though it's not correct to call it a duplicate), pushed to -mtr branches
[6 Oct 2010 19:41] Paul DuBois
Changes to test suite. No changelog entry needed.
[1 Nov 2010 18:59] Bugs System
Pushed into mysql-5.1 5.1.53 (revid:build@mysql.com-20101101184443-o2olipi8vkaxzsqk) (version source revid:build@mysql.com-20101101184443-o2olipi8vkaxzsqk) (merge vers: 5.1.53) (pib:21)
[9 Nov 2010 19:46] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (version source revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (merge vers: 5.5.7-rc) (pib:21)
[13 Nov 2010 16:24] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:alexander.nozdrin@oracle.com-20101113152450-2zzcm50e7i4j35v7) (merge vers: 5.6.1-m4) (pib:21)
[13 Nov 2010 16:35] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (pib:21)