Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-2165

LP #1609422: Unit test lf-t unstable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Laurynas Biveinis last update 04-08-2016 12:56:17

      11/14 Test #11: lf ...............................***Failed 7.12 sec

      1. N CPUs: 4, atomic ops: gcc-builtins-smp
        1..7
        ok 1 - my_atomic_initialize() returned 0
      2. Testing lf_pinbox (with my_thread_init) with 30 threads, 3000 iterations...
        ok 2 - tested lf_pinbox (with my_thread_init) in 0.0131241 secs (0)
      3. Testing lf_alloc (with my_thread_init) with 30 threads, 3000 iterations...
      4. 0 mallocs, 4 pins in stack
        ok 3 - tested lf_alloc (with my_thread_init) in 0.0163577 secs (0)
      5. Testing lf_hash (with my_thread_init) with 30 threads, 300 iterations...
      6. 0 mallocs, 2 pins in stack, 1 hash size, 0 inserts
        ok 4 - tested lf_hash (with my_thread_init) in 0.0053816 secs (0)
      7. Testing lf_pinbox (without my_thread_init) with 30 threads, 3000 iterations...
        ok 5 - tested lf_pinbox (without my_thread_init) in 0.0096111 secs (0)
      8. Testing lf_alloc (without my_thread_init) with 30 threads, 3000 iterations...
      9. 0 mallocs, 5 pins in stack
        ok 6 - tested lf_alloc (without my_thread_init) in 0.0579291 secs (0)
      10. Testing lf_hash (without my_thread_init) with 30 threads, 300 iterations...
      11. 0 mallocs, 2 pins in stack, 1 hash size, 0 inserts
        ok 7 - tested lf_hash (without my_thread_init) in 0.0042839 secs (0)
        Error in my_thread_global_end(): 1 threads didn't exit

      =================================================================
      ==1810==ERROR: LeakSanitizer: detected memory leaks

      Direct leak of 280 byte(s) in 1 object(s) allocated from:
      #0 0x7fb21177579a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
      #1 0x4089cc in my_thread_init /mnt/workspace/percona-server-5.5-asan-param/BUILD_TYPE/debug-asan/Host/ubuntu-xenial-64bit/mysys/my_thr_init.c:344
      #2 0x40321e in test_lf_hash /mnt/workspace/percona-server-5.5-asan-param/BUILD_TYPE/debug-asan/Host/ubuntu-xenial-64bit/unittest/mysys/lf-t.c:124
      #3 0x7fb2114c76f9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76f9)

      SUMMARY: AddressSanitizer: 280 byte(s) leaked in 1 allocation(s).

      This is caused by a race: the last test thread with my_thread_init=1 reads with_my_thread_init 2nd time to determine whether it should call my_thread_end, after signaling the main thread that the test is complete. And the main thread sets my_thread_init from 1 to 0 after the first three tests, resulting in my_thread_init/my_thread_end mismatch.

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: