Uploaded image for project: 'TokuFT'
  1. FT-658

ctest - helgrind_helgrind3 reports possible race

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: None
    • Labels:
      None
    • Sprint:

      Description

      Test fails in Percona Jenkins. Stacktrace different from FT-664 Open .

      ==3533== --Thread-Announcement-----------------------------------------
      ==3533==
      ==3533== Thread #1 is the program's root thread
      ==3533==
      ==3533== --Thread-Announcement-----------------------------------------
      ==3533==
      ==3533== Thread #6 was created
      ==3533== at 0x591743E: clone (clone.S:74)
      ==3533== by 0x5606199: do_clone.constprop.3 (createthread.c:75)
      ==3533== by 0x56078BA: pthread_create@@GLIBC_2.2.5 (createthread.c:245)
      ==3533== by 0x4C30C90: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==3533== by 0x5157781: toku_pthread_create(unsigned long*, pthread_attr_t const*, void* (void*), void*) (toku_pthread.h:392)
      ==3533== by 0x51578D9: toku_kibbutz_create(int, kibbutz**) (kibbutz.cc:137)
      ==3533== by 0x509DA66: toku_cachetable_create(cachetable*, long, __toku_lsn, tokulogger) (cachetable.cc:317)
      ==3533== by 0x50612AE: env_open(__toku_db_env*, char const*, unsigned int, int) (ydb.cc:974)
      ==3533== by 0x402C7E: initialize() (helgrind3.cc:113)
      ==3533== by 0x40315D: test_main(int, char* const*) (helgrind3.cc:179)
      ==3533== by 0x402AF9: main (test.h:501)
      ==3533==
      ==3533== ----------------------------------------------------------------
      ==3533==
      ==3533== Lock at 0x53ED2C0 was first observed
      ==3533== at 0x4C31DDA: pthread_mutex_init (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==3533== by 0x50BDA52: toku_mutex_init(toku_mutex*, pthread_mutexattr_t const*) (toku_pthread.h:163)
      ==3533== by 0x50D4040: toku_ft_layer_init() (ft-ops.cc:4544)
      ==3533== by 0x505EBBF: toku_ydb_init() (ydb.cc:232)
      ==3533== by 0x505E883: libtokuft_init() (ydb_lib.cc:102)
      ==3533== by 0x4010139: call_init.part.0 (dl-init.c:78)
      ==3533== by 0x4010222: _dl_init (dl-init.c:36)
      ==3533== by 0x4001309: ??? (in /lib/x86_64-linux-gnu/ld-2.19.so)
      ==3533==
      ==3533== Possible data race during read of size 1 at 0x6B31680 by thread #1
      ==3533== Locks held: 1, at address 0x53ED2C0
      ==3533== at 0x4C2ECB0: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==3533== by 0x4C31E3F: pthread_mutex_destroy (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==3533== by 0x5148D66: toku_mutex_destroy(toku_mutex*) (toku_pthread.h:198)
      ==3533== by 0x5149274: bjm_destroy(background_job_manager_struct*) (background_job_manager.cc:117)
      ==3533== by 0x50A28D1: write_dirty_pairs_for_close(cachetable*, cachefile*) (cachetable.cc:2412)
      ==3533== by 0x50A2AA5: cachetable_flush_cachefile(cachetable*, cachefile*, bool) (cachetable.cc:2499)
      ==3533== by 0x509E241: toku_cachefile_close(cachefile**, bool, __toku_lsn) (cachetable.cc:553)
      ==3533== by 0x50B2387: toku_ft_evict_from_memory(ft*, bool, __toku_lsn) (ft.cc:537)
      ==3533== by 0x50B33CC: toku_ft_remove_reference(ft*, bool, __toku_lsn, void (ft*, void*), void*) (ft.cc:959)
      ==3533== by 0x50CF7AE: ft_handle_close(ft_handle*, bool, __toku_lsn) (ft-ops.cc:3276)
      ==3533== by 0x50CF7E0: toku_ft_handle_close(ft_handle*) (ft-ops.cc:3284)
      ==3533== by 0x506FB48: toku_db_close(__toku_db*) (ydb_db.cc:206)
      ==3533==
      ==3533== This conflicts with a previous write of size 4 by thread #6
      ==3533== Locks held: none
      ==3533== at 0x560A7DA: pthread_mutex_unlock (pthread_mutex_unlock.c:51)
      ==3533== by 0x4C32622: pthread_mutex_unlock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==3533== by 0x5148F73: toku_mutex_unlock(toku_mutex*) (toku_pthread.h:239)
      ==3533== by 0x51493DE: bjm_remove_background_job(background_job_manager_struct*) (background_job_manager.cc:148)
      ==3533== by 0x50A24B9: cachetable_flush_pair_for_close(void*) (cachetable.cc:2333)
      ==3533== by 0x5157A2A: work_on_kibbutz(void*) (kibbutz.cc:184)
      ==3533== by 0x4C30E26: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==3533== by 0x5607181: start_thread (pthread_create.c:312)
      ==3533==
      ==3533== Address 0x6B31680 is 64 bytes inside a block of size 112 alloc'd
      ==3533== at 0x4C2BF00: malloc (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
      ==3533== by 0x53F6394: os_malloc(unsigned long) (os_malloc.cc:267)
      ==3533== by 0x53F55A1: toku_xmalloc(unsigned long) (memory.cc:387)
      ==3533== by 0x53F5C83: toku_xcalloc(unsigned long, unsigned long) (memory.cc:435)
      ==3533== by 0x51491C9: bjm_init(background_job_manager_struct**) (background_job_manager.cc:106)
      ==3533== by 0x50A27FC: write_dirty_pairs_for_close(cachetable*, cachefile*) (cachetable.cc:2389)
      ==3533== by 0x50A2AA5: cachetable_flush_cachefile(cachetable*, cachefile*, bool) (cachetable.cc:2499)
      ==3533== by 0x509E241: toku_cachefile_close(cachefile**, bool, __toku_lsn) (cachetable.cc:553)
      ==3533== by 0x50B2387: toku_ft_evict_from_memory(ft*, bool, __toku_lsn) (ft.cc:537)
      ==3533== by 0x50B33CC: toku_ft_remove_reference(ft*, bool, __toku_lsn, void (ft*, void*), void*) (ft.cc:959)
      ==3533== by 0x50CF7AE: ft_handle_close(ft_handle*, bool, __toku_lsn) (ft-ops.cc:3276)
      ==3533== by 0x50CF7E0: toku_ft_handle_close(ft_handle*) (ft-ops.cc:3284)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              George O. Lorch III George Lorch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: