You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/26 02:12:04 UTC

[GitHub] [dubbo] zrlw opened a new issue #8923: 建议github构建workflow增加unit-test失败上传log4j日志的配置

zrlw opened a new issue #8923:
URL: https://github.com/apache/dubbo/issues/8923


   有些单元测试构建失败时只在log4j日志输出了错误信息,console上没有任何提示,无法排除定位问题,比如:
   ```
   2021-09-25T10:17:40.0085194Z [INFO] -------------------------------------------------------
   2021-09-25T10:17:40.0086161Z [INFO]  T E S T S
   2021-09-25T10:17:40.0086846Z [INFO] -------------------------------------------------------
   2021-09-25T10:17:41.5136723Z [INFO] Running org.apache.dubbo.remoting.exchange.support.header.HeartbeatHandlerTest
   2021-09-25T10:17:42.8678103Z Server bind successfully
   2021-09-25T10:17:42.9604489Z connect count 1
   2021-09-25T10:17:44.9882458Z Server bind successfully
   2021-09-25T10:17:44.9965565Z ++++++++++++++ disconnect count 0
   2021-09-25T10:17:44.9966140Z ++++++++++++++ connect count 1
   2021-09-25T10:17:47.0152440Z Server bind successfully  <== 从此处开始等待了27分钟,但是相关情况只在log4j日志有,github看不到
   2021-09-25T11:44:45.0661784Z Terminate batch job (Y/N)?   
   2021-09-25T11:44:50.4730720Z ##[error]The action has timed out.
   ```
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] zrlw commented on issue #8923: 建议github构建workflow增加unit-test失败上传log4j日志的配置

Posted by GitBox <gi...@apache.org>.
zrlw commented on issue #8923:
URL: https://github.com/apache/dubbo/issues/8923#issuecomment-927315477


   testServerHeartbeat方法挂起不动弹这个现象可以手工重现:
   修改HeartbeatHandlerTest测试类,把testServerHeartbeat方法复制一下搞两个测试方法,代码完全相同,将其中一个方法名改掉,比如改成testServerHeartbeatClone,然后把这个测试类的其他测试方法注释掉,然后执行HeartbeatHandlerTest测试,这两个方法,谁在后面运行谁就会hang住,跟踪了一下发现是处理connected事件时,并没有去调用HeartbeatHandler的connected方法,channel对象的ReadTimestamp和WriteTimestamp属性一直都是null,CloseTimerTask每次执行doTask任务时lastRead和lastWrite方法都是返回null,导致无法判断空闲时间是否超时。
   感觉是HeartbeatHandler只能bind成功一次,这个代码还是2年前提交的,不知道原来就是这个样,还是多实例触发的问题。
   @AlbumenJ @chickenlj 


-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] zrlw edited a comment on issue #8923: 建议github构建workflow增加unit-test失败上传log4j日志的配置

Posted by GitBox <gi...@apache.org>.
zrlw edited a comment on issue #8923:
URL: https://github.com/apache/dubbo/issues/8923#issuecomment-927315477


   testServerHeartbeat方法挂起不动弹这个现象可以手工重现:
   修改HeartbeatHandlerTest测试类,把testServerHeartbeat方法复制一下搞两个测试方法,代码完全相同(改不改端口号,结果都是如此),将其中一个方法名改掉,比如改成testServerHeartbeatClone,然后把这个测试类的其他测试方法注释掉,然后执行HeartbeatHandlerTest测试,这两个方法,谁在后面运行谁就会hang住,跟踪了一下发现是处理connected事件时,并没有去调用HeartbeatHandler的connected方法,channel对象的ReadTimestamp和WriteTimestamp属性一直都是null,CloseTimerTask每次执行doTask任务时lastRead和lastWrite方法都是返回null,导致无法判断空闲时间是否超时。
   
   更新:
   如果执行两遍testServerHeartbeat, 需要在```@AfterEach```调用FakeChannelHandlers.resetChannelHandlers()复位ChannelHandlers类的INSTANCE。testServerHeartbeat方法中间调用了FakeChannelHandlers.setTestingChannelHandlers()把ChannelHandlers类的INSTANCE给改掉之后没有复原,之后构造NettyServer对象时都会受影响。


-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] zrlw edited a comment on issue #8923: 建议github构建workflow增加unit-test失败上传log4j日志的配置

Posted by GitBox <gi...@apache.org>.
zrlw edited a comment on issue #8923:
URL: https://github.com/apache/dubbo/issues/8923#issuecomment-927315477


   testServerHeartbeat方法挂起不动弹这个现象可以手工重现:
   修改HeartbeatHandlerTest测试类,把testServerHeartbeat方法复制一下搞两个测试方法,代码完全相同(改不改端口号,结果都是如此),将其中一个方法名改掉,比如改成testServerHeartbeatClone,然后把这个测试类的其他测试方法注释掉,然后执行HeartbeatHandlerTest测试,这两个方法,谁在后面运行谁就会hang住,跟踪了一下发现是处理connected事件时,并没有去调用HeartbeatHandler的connected方法,channel对象的ReadTimestamp和WriteTimestamp属性一直都是null,CloseTimerTask每次执行doTask任务时lastRead和lastWrite方法都是返回null,导致无法判断空闲时间是否超时。
   感觉是HeartbeatHandler只能bind成功一次,这个代码还是2年前提交的,不知道原来就是这个样,还是多实例触发的问题。
   @AlbumenJ @chickenlj 


-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] zrlw edited a comment on issue #8923: 建议github构建workflow增加unit-test失败上传log4j日志的配置

Posted by GitBox <gi...@apache.org>.
zrlw edited a comment on issue #8923:
URL: https://github.com/apache/dubbo/issues/8923#issuecomment-927315477


   testServerHeartbeat方法挂起不动弹这个现象可以手工重现:
   修改HeartbeatHandlerTest测试类,把testServerHeartbeat方法复制一下搞两个测试方法,代码完全相同(改不改端口号,结果都是如此),将其中一个方法名改掉,比如改成testServerHeartbeatClone,然后把这个测试类的其他测试方法注释掉,然后执行HeartbeatHandlerTest测试,这两个方法,谁在后面运行谁就会hang住,跟踪了一下发现是处理connected事件时,并没有去调用HeartbeatHandler的connected方法,channel对象的ReadTimestamp和WriteTimestamp属性一直都是null,CloseTimerTask每次执行doTask任务时lastRead和lastWrite方法都是返回null,导致无法判断空闲时间是否超时。
   
   更新:
   需要在```@AfterEach```复位:FakeChannelHandlers.resetChannelHandlers(); 


-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org