milvus icon indicating copy to clipboard operation
milvus copied to clipboard

[Bug]: ParseCTraceContext may be not memory-safe

Open longjiquan opened this issue 9 months ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Environment

- Milvus version:
- Deployment mode(standalone or cluster):
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

https://github.com/milvus-io/milvus/blob/5bb672d70da60a9e88dedaec579a4ea3d6723649/internal/querynodev2/segments/trace.go#L34-L44

Expected Behavior

spanID and traceID are local variables inner ParseCTraceContext, they may be garbage collected after return their address, so it's not safe to use them in cgo code.

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

longjiquan avatar Apr 30 '24 09:04 longjiquan

/unassign @yanliang567 /assign @czs007 @congqixia

longjiquan avatar Apr 30 '24 09:04 longjiquan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

stale[bot] avatar Jun 02 '24 06:06 stale[bot]