apache / apache/incubator-seata-samples
调用/business/dubbo/buy 模拟下单,执行扣减库存时,fescar-server报错
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
2019-04-02 08:51:09.659 INFO [ServerHandlerThread_51_500]c.a.fescar.core.rpc.DefaultServerMessageListenerImpl.onRegRmMessage:113 -rm register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://127.0.0.1:3306/db_gts_fescar?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true', applicationId='storage-gts-fescar-example', transactionServiceGroup='my_test_tx_group'},channel:[id: 0x478fc3e9, L:/10.8.2.25:8091 - R:/10.8.2.25:4243]
2019-04-02 08:51:09.660 ERROR[NettyServerNIOWorker_6_8]com.alibaba.fescar.core.rpc.netty.MessageCodecHandler.decode:190 -decode error
java.nio.BufferUnderflowException: null
at java.nio.Buffer.nextGetIndex(Buffer.java:506)
at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:361)
at com.alibaba.fescar.core.protocol.transaction.BranchRegisterRequest.decode(BranchRegisterRequest.java:205)
at com.alibaba.fescar.core.protocol.MergedWarpMessage.doDecode(MergedWarpMessage.java:101)
at com.alibaba.fescar.core.protocol.MergedWarpMessage.decode(MergedWarpMessage.java:92)
at com.alibaba.fescar.core.rpc.netty.MessageCodecHandler.decode(MessageCodecHandler.java:177)
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
Contributor guide
Research direction
Start with the reported call to /business/dubbo/buy and trace the decode path through MessageCodecHandler.decode, MergedWarpMessage.decode, and BranchRegisterRequest.decode. Reproduce the stock-decrement request and inspect the message bytes around the reported BufferUnderflowException; done means the request is decoded without this server error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100