You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "wangjialing218 (via GitHub)" <gi...@apache.org> on 2023/02/22 06:28:04 UTC

[GitHub] [pulsar] wangjialing218 opened a new pull request, #19593: [improve] Print stack trace when got excpetion in ServerCnx

wangjialing218 opened a new pull request, #19593:
URL: https://github.com/apache/pulsar/pull/19593

   ### Motivation
   
   I meet a issue that NPE happend in ServerCnx.handleSend() but the debug log does not print stack trace.
   ![servercnx](https://user-images.githubusercontent.com/65590138/220540592-77fd107a-99c4-4eb3-ae84-6e6ceba96dfd.png)
   
   
   ### Modifications
   
   print stack trace when got excpetion in ServerCnx
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


-- 
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@pulsar.apache.org

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


[GitHub] [pulsar] michaeljmarshall commented on pull request #19593: [improve] Print stack trace when got excpetion in ServerCnx

Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall commented on PR #19593:
URL: https://github.com/apache/pulsar/pull/19593#issuecomment-1441249601

   /pulsarbot rerun-failure-checks


-- 
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@pulsar.apache.org

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


[GitHub] [pulsar] michaeljmarshall commented on a diff in pull request #19593: [improve] Print stack trace when got excpetion in ServerCnx

Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall commented on code in PR #19593:
URL: https://github.com/apache/pulsar/pull/19593#discussion_r1114909669


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -397,7 +397,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E
             // At default info level, suppress all subsequent exceptions that are thrown when the connection has already
             // failed
             if (log.isDebugEnabled()) {
-                log.debug("[{}] Got exception: {}", remoteAddress, cause);
+                log.debug("[{}] Got exception: {}", remoteAddress, cause.getMessage(), cause);

Review Comment:
   Is it worth using `ClientCnx.isKnownException(cause) ? cause : ExceptionUtils.getStackTrace(cause)` link we do on line 391?



-- 
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@pulsar.apache.org

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


[GitHub] [pulsar] michaeljmarshall merged pull request #19593: [improve][broker] Print stack trace when got excpetion in ServerCnx

Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall merged PR #19593:
URL: https://github.com/apache/pulsar/pull/19593


-- 
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@pulsar.apache.org

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


[GitHub] [pulsar] wangjialing218 commented on a diff in pull request #19593: [improve] Print stack trace when got excpetion in ServerCnx

Posted by "wangjialing218 (via GitHub)" <gi...@apache.org>.
wangjialing218 commented on code in PR #19593:
URL: https://github.com/apache/pulsar/pull/19593#discussion_r1115261249


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -397,7 +397,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E
             // At default info level, suppress all subsequent exceptions that are thrown when the connection has already
             // failed
             if (log.isDebugEnabled()) {
-                log.debug("[{}] Got exception: {}", remoteAddress, cause);
+                log.debug("[{}] Got exception: {}", remoteAddress, cause.getMessage(), cause);

Review Comment:
   Done



-- 
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@pulsar.apache.org

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


[GitHub] [pulsar] codecov-commenter commented on pull request #19593: [improve] Print stack trace when got excpetion in ServerCnx

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19593:
URL: https://github.com/apache/pulsar/pull/19593#issuecomment-1441313407

   # [Codecov](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19593](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (14206e6) into [master](https://codecov.io/gh/apache/pulsar/commit/02b25a3b2461b975b46afdca4130cdba876721c0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02b25a3) will **decrease** coverage by `0.45%`.
   > The diff coverage is `30.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/pulsar/pull/19593/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19593      +/-   ##
   ============================================
   - Coverage     62.35%   61.91%   -0.45%     
   + Complexity    25873    25647     -226     
   ============================================
     Files          1844     1844              
     Lines        135280   135343      +63     
     Branches      14875    14886      +11     
   ============================================
   - Hits          84352    83793     -559     
   - Misses        43183    43789     +606     
   - Partials       7745     7761      +16     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | inttests | `24.68% <13.75%> (+0.05%)` | :arrow_up: |
   | systests | `25.27% <18.75%> (-0.12%)` | :arrow_down: |
   | unittests | `59.17% <20.00%> (-0.38%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...va/org/apache/pulsar/broker/service/ServerCnx.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NlcnZlckNueC5qYXZh) | `55.61% <0.00%> (+0.93%)` | :arrow_up: |
   | [...java/org/apache/pulsar/admin/cli/CmdFunctions.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC10b29scy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2FkbWluL2NsaS9DbWRGdW5jdGlvbnMuamF2YQ==) | `47.20% <0.00%> (-0.51%)` | :arrow_down: |
   | [...rg/apache/pulsar/broker/service/BrokerService.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL0Jyb2tlclNlcnZpY2UuamF2YQ==) | `59.22% <7.84%> (-0.85%)` | :arrow_down: |
   | [...che/bookkeeper/mledger/impl/ManagedLedgerImpl.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWFuYWdlZC1sZWRnZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2Jvb2trZWVwZXIvbWxlZGdlci9pbXBsL01hbmFnZWRMZWRnZXJJbXBsLmphdmE=) | `78.97% <92.85%> (+0.09%)` | :arrow_up: |
   | [...okkeeper/mledger/impl/ShadowManagedLedgerImpl.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWFuYWdlZC1sZWRnZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2Jvb2trZWVwZXIvbWxlZGdlci9pbXBsL1NoYWRvd01hbmFnZWRMZWRnZXJJbXBsLmphdmE=) | `51.23% <100.00%> (ø)` | |
   | [...apache/pulsar/common/functions/FunctionConfig.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC1hZG1pbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9jb21tb24vZnVuY3Rpb25zL0Z1bmN0aW9uQ29uZmlnLmphdmE=) | `96.49% <100.00%> (+0.12%)` | :arrow_up: |
   | [...he/pulsar/functions/utils/FunctionConfigUtils.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWZ1bmN0aW9ucy91dGlscy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Z1bmN0aW9ucy91dGlscy9GdW5jdGlvbkNvbmZpZ1V0aWxzLmphdmE=) | `63.23% <100.00%> (+0.23%)` | :arrow_up: |
   | [...g/apache/pulsar/client/api/ServiceUrlProvider.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9jbGllbnQvYXBpL1NlcnZpY2VVcmxQcm92aWRlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...r/client/impl/UnAckedMessageRedeliveryTracker.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1VuQWNrZWRNZXNzYWdlUmVkZWxpdmVyeVRyYWNrZXIuamF2YQ==) | `0.00% <0.00%> (-88.29%)` | :arrow_down: |
   | [...ache/pulsar/client/impl/UnackMessageIdWrapper.java](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1VuYWNrTWVzc2FnZUlkV3JhcHBlci5qYXZh) | `0.00% <0.00%> (-65.52%)` | :arrow_down: |
   | ... and [130 more](https://codecov.io/gh/apache/pulsar/pull/19593?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   


-- 
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@pulsar.apache.org

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