Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多线程环境下添加EventProcessor报错 #309

Open
xzc-coder opened this issue Sep 29, 2022 · 3 comments
Open

多线程环境下添加EventProcessor报错 #309

xzc-coder opened this issue Sep 29, 2022 · 3 comments

Comments

@xzc-coder
Copy link

xzc-coder commented Sep 29, 2022

Describe the bug
当多线程环境下添加EventProcessor时,会报数组越界异常

Expected behavior

当多线程环境下调用com.alipay.remoting.rpc.RpcClient#addConnectionEventProcessor 应该正常添加

Actual behavior

当多线程环境下调用com.alipay.remoting.rpc.RpcClient#addConnectionEventProcessor 报数组越界异常

Steps to reproduce

image

Minimal yet complete reproducer code (or GitHub URL to code)

com.alipay.remoting.ConnectionEventListener#addConnectionEventProcessor
image
ArrayList不是线程安全的

Environment

  • SOFABolt version:1.6.5
  • JVM version (e.g. java -version):1.8
  • OS version (e.g. uname -a):windows
  • Maven version:3.6.2
  • IDE version:idea 2020
@chuailiwu
Copy link
Collaborator

Looks like not considered concurrency,can you fix it?

@chuailiwu
Copy link
Collaborator

has fixed by #321

@OrezzerO
Copy link
Collaborator

PR #321 's unit test can not reproduce the bug. So i wonder there may be other bugs in this situation.

@OrezzerO OrezzerO reopened this Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants