Bug #59740 Performance schema test failures on freebsd
Submitted: 26 Jan 2011 14:07 Modified: 10 Feb 2011 15:11
Reporter: Marc ALFF Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.6 OS:FreeBSD
Assigned to: Marc ALFF CPU Architecture:Any

[26 Jan 2011 14:07] Marc ALFF
Description:
Test failures seen only on FreeBSD, and only in release builds:

performance_schema.ortho_iter
performance_schema.table_aggregate_*
performance_schema.table_io_aggregate_*
performance_schema.table_lock_aggregate_*

The symptom is in every case that:
  select ... from events_waits_summary_by_thread_by_event_name where ...
does not print the expected output.

Unclear if this is a test issue or a server issue, this needs to be investigated.

How to repeat:
See Pushbuild 2

Suggested fix:
N/A
[26 Jan 2011 14:45] 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/129669

3553 Marc Alff	2011-01-26
      BUG#59740 Performance schema test failures on freebsd
      
      Not a fix.
      
      Disabled the failing tests, added a test debugging helper.
[26 Jan 2011 14:57] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:marc.alff@oracle.com-20110126145607-0olu09psmormmrub) (version source revid:marc.alff@oracle.com-20110126144143-g30do28imhrmworn) (merge vers: 5.6.2) (pib:24)
[27 Jan 2011 1:59] Anitha Gopi
Marc,
Since the test is failing only on some platforms experimental might be a better state. The test will then continue to run without making PB2 red but we can still detect any new failures in the test
[28 Jan 2011 12:48] 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/129858

3565 Marc Alff	2011-01-28
      Bug#59740 Performance schema test failures on freebsd
      
      Changed the tests status from disabled to experimental,
      to maintain the test coverage on non affected platforms.
[28 Jan 2011 12:50] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:marc.alff@oracle.com-20110128124911-1ddvdz4m8lotyzgw) (version source revid:marc.alff@oracle.com-20110128124603-za7fxwxnm1kq3keo) (merge vers: 5.6.2) (pib:24)
[28 Jan 2011 13:42] 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/129871

3567 Marc Alff	2011-01-28
      BUG#59740 Performance schema test failures on freebsd
      
      Investigation of bug 59740 shows that selects on
      table performance_schema.events_waits_summary_by_thread_by_event_name
      sometime to not return the expected rows.
      
      While the root cause of this is not identified yet,
      the method table_ews_by_thread_by_event_name::rnd_next()
      is suspected to be the origin of the failure.
      
      The code of this method can benefit from simplifications already
      identified with other tables, see for example
      table_setup_instruments::rnd_next().
      
      This fix implements several improvements for the table scan
      of table performance_schema.events_waits_summary_by_thread_by_event_name.
      In particular:
      - code duplication is reduced
      - code complexity is reduced
      - the number of calls to thread_array[i].m_lock.is_populated()
        is reduced by a factor 200+ (the number of instruments)
        This is implemented by changing the iteration on threads from
        the innermost index (index 3) to the outermost index (index 1).
      
      While is it unclear if calling atomic operations too frequently
      can cause end_optimistic_lock() to fail in ::make_row(),
      which could be a possible root cause for the bug found,
      reducing the number of calls to atomic operations will make the code
      more robust and scalable, so implementing this cleanup is required.
      
      This fix also improves the ortho_iter test, for coverage,
      since it also checks table events_waits_summary_by_thread_by_event_name.
[28 Jan 2011 17:53] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:marc.alff@oracle.com-20110128175245-fxqguwen7b57p8ps) (version source revid:marc.alff@oracle.com-20110128134057-i3px1zc1e6t8dgat) (merge vers: 5.6.2) (pib:24)
[9 Feb 2011 16:35] 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/130906

3626 Marc Alff	2011-02-09
      BUG#59740 Performance schema test failures on freebsd
      
      For the performance schema aggregation tests:
      - improved the tests robustness to avoid spurious failures,
      - removed the experimental status.
[9 Feb 2011 16:38] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:marc.alff@oracle.com-20110209163641-nxavjyohm3d3bvbs) (version source revid:marc.alff@oracle.com-20110209163345-4g0x5azw5ky0bvzp) (merge vers: 5.6.2) (pib:24)
[9 Feb 2011 16:53] Christopher Powers
Patch approved.
[9 Feb 2011 16:56] Marc ALFF
As of 2011-02-09, the tests failures initially reported can not be reproduced.

Doc team:
The failing tests are new, added in mysql-5.6.2 with new features, and have never been part of a previous release. As a result, there is no change to document.
[10 Feb 2011 15:11] Paul DuBois
No changelog entry needed.