Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect resize behavior with first_block #735

Merged

Conversation

pavelkumbrasev
Copy link
Contributor

@pavelkumbrasev pavelkumbrasev commented Jan 17, 2022

Description

Fixed resize behavior for case when new size lesser than old size. There is a bug in concurrent_vector that was reproduced when resize marked segment (that owned by my_first_block) as deleted (code) and segment allocation thread is stuck waiting this segment to be published by other thread that allocated first block (code).

Fixes #733

  • - git commit message contains appropriate signed-off-by string (see CONTRIBUTING.md for details)

Type of change

  • bug fix - change which fixes an issue
  • new feature - change which adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and for some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

@kboyarinov @anton-potapov

include/oneapi/tbb/concurrent_vector.h Outdated Show resolved Hide resolved
test/tbb/test_concurrent_vector.cpp Show resolved Hide resolved
test/tbb/test_concurrent_vector.cpp Show resolved Hide resolved
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
@pavelkumbrasev pavelkumbrasev merged commit a36bf9c into master Jan 20, 2022
@pavelkumbrasev pavelkumbrasev deleted the dev/pavelkumbrasev/fix_incorrect_resize_with_firstblock branch January 20, 2022 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deadlock in tbb::concurrent_vector when resizing + growing.
2 participants