You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zclllyybb (via GitHub)" <gi...@apache.org> on 2023/05/06 04:04:37 UTC
[GitHub] [doris] zclllyybb opened a new pull request, #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
zclllyybb opened a new pull request, #19331:
URL: https://github.com/apache/doris/pull/19331
# Proposed changes
```
F0505 22:46:41.875746 497986 vdata_stream_recvr.cpp:87] Check failed: _num_remaining_senders == 0 (26 vs. 0)
*** Check failure stack trace: ***
@ 0x55c8198dc95d google::LogMessage::Fail()
@ 0x55c8198dee99 google::LogMessage::SendToLog()
@ 0x55c8198dc4c6 google::LogMessage::Flush()
@ 0x55c8198df509 google::LogMessageFatal::~LogMessageFatal()
@ 0x55c81814cccb doris::vectorized::VDataStreamRecvr::SenderQueue::_inner_get_batch()
@ 0x55c81815fa74 doris::vectorized::VDataStreamRecvr::PipSenderQueue::get_batch()
@ 0x55c818155072 doris::vectorized::VDataStreamRecvr::get_next()
@ 0x55c808360620 doris::vectorized::VExchangeNode::get_next()
@ 0x55c80071a114 doris::ExecNode::pull()
```
## Problem summary
the check of emptiness should be locked in the same lock of real use to ensure correctness. usage before is defective. now fixed it.
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [x] Is this PR support rollback (If NO, please explain WHY)
## Further comments
the lock may could be split for the usage of the specific object.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #19331:
URL: https://github.com/apache/doris/pull/19331#discussion_r1186637931
##########
be/src/vec/runtime/vdata_stream_recvr.cpp:
##########
@@ -161,9 +162,11 @@ void VDataStreamRecvr::SenderQueue::add_block(const PBlock& pblock, int be_numbe
COUNTER_UPDATE(_recvr->_deserialize_row_batch_timer, deserialize_time);
COUNTER_UPDATE(_recvr->_decompress_timer, block->get_decompress_time());
COUNTER_UPDATE(_recvr->_decompress_bytes, block->get_decompressed_bytes());
-
- _block_queue.emplace_back(std::move(block), block_byte_size);
- _update_block_queue_empty();
+ {
+ std::lock_guard<std::mutex> l(_lock);
+ _block_queue.emplace_back(std::move(block), block_byte_size);
+ _update_block_queue_empty_in_lock();
Review Comment:
Maybe we can wrap this piece of code into a function
```
lock
push block to queue
update emtpy flag
```
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] HappenLee commented on a diff in pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on code in PR #19331:
URL: https://github.com/apache/doris/pull/19331#discussion_r1186659288
##########
be/src/vec/runtime/vdata_stream_recvr.cpp:
##########
@@ -83,19 +82,20 @@ Status VDataStreamRecvr::SenderQueue::_inner_get_batch(Block* block, bool* eos)
return Status::Cancelled("Cancelled");
}
- if (_block_queue.empty()) {
+ std::unique_lock<std::mutex> l(_lock);
Review Comment:
should not only add a mutex here. please review the whloe logic to find problem
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19331:
URL: https://github.com/apache/doris/pull/19331#issuecomment-1537039597
clang-tidy review says "All clean, LGTM! :+1:"
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zclllyybb closed pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb closed pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
URL: https://github.com/apache/doris/pull/19331
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zclllyybb commented on a diff in pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on code in PR #19331:
URL: https://github.com/apache/doris/pull/19331#discussion_r1186643031
##########
be/src/vec/runtime/vdata_stream_recvr.cpp:
##########
@@ -161,9 +162,11 @@ void VDataStreamRecvr::SenderQueue::add_block(const PBlock& pblock, int be_numbe
COUNTER_UPDATE(_recvr->_deserialize_row_batch_timer, deserialize_time);
COUNTER_UPDATE(_recvr->_decompress_timer, block->get_decompress_time());
COUNTER_UPDATE(_recvr->_decompress_bytes, block->get_decompressed_bytes());
-
- _block_queue.emplace_back(std::move(block), block_byte_size);
- _update_block_queue_empty();
+ {
+ std::lock_guard<std::mutex> l(_lock);
+ _block_queue.emplace_back(std::move(block), block_byte_size);
+ _update_block_queue_empty_in_lock();
Review Comment:
that‘s right. will do.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19331:
URL: https://github.com/apache/doris/pull/19331#issuecomment-1537139965
clang-tidy review says "All clean, LGTM! :+1:"
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zclllyybb commented on pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #19331:
URL: https://github.com/apache/doris/pull/19331#issuecomment-1537139058
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zclllyybb commented on pull request #19331: [bugfix](vectorization) fix data racing of VDataStreamRecvr
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #19331:
URL: https://github.com/apache/doris/pull/19331#issuecomment-1537039126
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org