apache / apache/servicecomb-java-chassis

A服务RPC调用B服务找不到可用地址时,导致当前线程上下文被清除,接着再调用C服务时取CSE上下文报空指针异常

Open
#4,569 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
814
Avg merge
8d 23h
Merged PRs (30d)
1

Description

1、当前线程A服务代码中第73行使用RPC方式异步调用B服务:
![业务逻辑调用](https://github.com/user-attachments/assets/93710f21-fd75-4bc7-b63a-9e7bde691a1a)

2、负载均衡没有找到B服务可用的地址:
![负载均衡没有可用机器](https://github.com/user-attachments/assets/46a5951a-b952-4071-804b-3d2b53b7e17e)

3、A服务当前线程上下文被清除:
![当前线程上下文被清除](https://github.com/user-attachments/assets/20846a4f-cc1a-4f6e-9eba-0d0ce95f6ed7)

4、A服务当前线程再接着调用C服务时,从上下文中获取参数时报空指针:
![调B服务失败后再取上下文时报空指针异常](https://github.com/user-attachments/assets/d70fe2f6-6b90-408c-b5d8-5316e4b8bc84)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the A-service code at line 73 and trace the thread-context handling when the load balancer finds no available B-service address. Reproduce the following C-service call and inspect the context lookup shown in the screenshots; done means the failure path no longer causes a null-pointer exception during the subsequent C call.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.