You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2025/09/24 15:24:21 UTC

[PR] fix(server): data race when accessing the db scan info [kvrocks]

git-hulk opened a new pull request, #3199:
URL: https://github.com/apache/kvrocks/pull/3199

   For the data race details, refer to [GitHub Action Logs](https://github.com/apache/kvrocks/actions/runs/17972329716/job/51119679082?pr=3196):
   
   ```
   WARNING: ThreadSanitizer: data race (pid=90210)
     Write of size 8 at 0x7b1c00017030 by thread T150 (mutexes: write M0):
       #0 Server::AsyncScanDBSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_9::operator()() const /home/runner/work/kvrocks/kvrocks/src/server/server.cc:1636:44 (kvrocks+0x15ddb14) (BuildId: dca9d021cc579ae4)
       #1 void std::__invoke_impl<void, Server::AsyncScanDBSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_9&>(std::__invoke_other, Server::AsyncScanDBSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_9&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/invoke.h:61:14 (kvrocks+0x15ddb14)
   
   
   ...
   
     Previous read of size 8 at 0x7b1c00017030 by thread T145 (mutexes: read M1):
       #0 Server::GetLastScanTime(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const /home/runner/work/kvrocks/kvrocks/src/server/server.cc:1652:25 (kvrocks+0x15bc3aa) (BuildId: dca9d021cc579ae4)
       #1 Server::GetKeyspaceInfo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/runner/work/kvrocks/kvrocks/src/server/server.cc:1418:57 (kvrocks+0x15bc3aa)
       #2 Server::GetInfo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)::$_5::operator()(Server*) const /home/runner/work/kvrocks/kvrocks/src/server/server.cc:1454:91 (kvrocks+0x15cafbc) (BuildId: dca9d021cc579ae4)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(server): data race when accessing the db scan info [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk merged PR #3199:
URL: https://github.com/apache/kvrocks/pull/3199


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(server): data race when accessing the db scan info [kvrocks]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3199:
URL: https://github.com/apache/kvrocks/pull/3199#issuecomment-3330557484

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3199) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [2 New issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=3199&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=3199&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=3199&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [70.8% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3199&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [1.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3199&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3199)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org