apache / apache/servicecomb-java-chassis

升级至2.8.18后偶现空指针异常

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

Description

servicecomb从2.7.8升级到2.8.18后,出现少量空指针异常,对实际业务没有什么影响,但是由于是新版本引入的,需要分析下原因。堆栈如下:

![Image](https://github.com/user-attachments/assets/cafdc73a-41f4-4526-89ca-00aadf5830df)
从堆栈可以看出抛出空指针的原因是由于RoutingContextImpl的fail方法获取的throwable对象为null

![Image](https://github.com/user-attachments/assets/a625363d-dada-43ce-ac0e-ea2479991706)
throwable来源于Http1xServerRequest的onData方法,按理来说这里e不应该为null

![Image](https://github.com/user-attachments/assets/a3d9faf2-101e-430f-b4e6-b10b235f3ed0)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the stack traces and the named RoutingContextImpl.fail and Http1xServerRequest.onData methods, then compare their behavior between versions 2.7.8 and 2.8.18. Done means identifying how a null throwable reaches fail and documenting or fixing the regression with a reproducing test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.