You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/01 07:31:25 UTC
[GitHub] [doris] levy5307 opened a new pull request, #12257: [fix](memory): fix coredump when list poinster is nullC
levy5307 opened a new pull request, #12257:
URL: https://github.com/apache/doris/pull/12257
# Proposed changes
Issue Number: [close #xxx](https://github.com/apache/doris/issues/5664)
## Problem summary
To fix the coredump memtioned in above issue, adding the validation of pointer before using it.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] No
2. Has unit tests been added:
- [ ] No Need
3. Has document been added or modified:
- [ ] No Need
4. Does it need to update dependencies:
- [ ] No
5. Are there any changes that cannot be rolled back:
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
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] levy5307 commented on a diff in pull request #12257: [fix](memory): fix coredump when list poinster is null
Posted by GitBox <gi...@apache.org>.
levy5307 commented on code in PR #12257:
URL: https://github.com/apache/doris/pull/12257#discussion_r960355235
##########
be/src/runtime/free_pool.hpp:
##########
@@ -128,9 +128,14 @@ class FreePool {
#ifndef NDEBUG
check_valid_allocation(list);
#endif
- // Add node to front of list.
- node->next = list->next;
- list->next = node;
+ if (nullptr == list) {
Review Comment:
> Why is `list` nullptr?
Maybe it was released somewhere
--
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] weizuo93 commented on pull request #12257: [fix](memory): avoid coredump when list pointer is null
Posted by GitBox <gi...@apache.org>.
weizuo93 commented on PR #12257:
URL: https://github.com/apache/doris/pull/12257#issuecomment-1234110874
Normally, the pointer `list` here should not be `nullptr`. I think we'd better to explore the reason why the `list` is nullptr and fix it instead of skipping nullptr, otherwise it might hide the potential 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] weizuo93 commented on a diff in pull request #12257: [fix](memory): fix coredump when list poinster is null
Posted by GitBox <gi...@apache.org>.
weizuo93 commented on code in PR #12257:
URL: https://github.com/apache/doris/pull/12257#discussion_r960354265
##########
be/src/runtime/free_pool.hpp:
##########
@@ -128,9 +128,14 @@ class FreePool {
#ifndef NDEBUG
check_valid_allocation(list);
#endif
- // Add node to front of list.
- node->next = list->next;
- list->next = node;
+ if (nullptr == list) {
Review Comment:
Why is `list` nullptr?
--
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] levy5307 commented on pull request #12257: [fix](memory): avoid coredump when list pointer is null
Posted by GitBox <gi...@apache.org>.
levy5307 commented on PR #12257:
URL: https://github.com/apache/doris/pull/12257#issuecomment-1234185526
> Normally, the pointer `list` here should not be `nullptr`. I think we'd better to explore the reason why the `list` is nullptr and fix it instead of skipping nullptr, otherwise it might hide the potential problem.
Good idea. But in my opinion, it's better to ensure the quality of online service, so we should avoid to produce too many coredump. And I added a log error here to catch this 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] levy5307 closed pull request #12257: [fix](memory): avoid coredump when list pointer is null
Posted by GitBox <gi...@apache.org>.
levy5307 closed pull request #12257: [fix](memory): avoid coredump when list pointer is null
URL: https://github.com/apache/doris/pull/12257
--
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] xinyiZzz commented on pull request #12257: [fix](memory): avoid coredump when list pointer is null
Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on PR #12257:
URL: https://github.com/apache/doris/pull/12257#issuecomment-1239427694
@levy5307 p0 case failed
--
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] levy5307 commented on a diff in pull request #12257: [fix](memory): fix coredump when list poinster is null
Posted by GitBox <gi...@apache.org>.
levy5307 commented on code in PR #12257:
URL: https://github.com/apache/doris/pull/12257#discussion_r960355235
##########
be/src/runtime/free_pool.hpp:
##########
@@ -128,9 +128,14 @@ class FreePool {
#ifndef NDEBUG
check_valid_allocation(list);
#endif
- // Add node to front of list.
- node->next = list->next;
- list->next = node;
+ if (nullptr == list) {
Review Comment:
> Why is `list` nullptr?
It's hard to say, maybe it was released somewhere.
--
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] xinyiZzz commented on pull request #12257: [fix](memory): avoid coredump when list pointer is null
Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on PR #12257:
URL: https://github.com/apache/doris/pull/12257#issuecomment-1239426859
`FreePool` will be removed in the future. simple fixes to try.
--
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