You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (f *File) Fd() uintptr {
if f == nil {
return ^(uintptr(0))
}
// If we put the file descriptor into nonblocking mode,
// then set it to blocking mode before we return it,
// because historically we have always returned a descriptor
// opened in blocking mode. The File will continue to work,
// but any blocking operation will tie up a thread.
if f.nonblock {
f.pfd.SetBlocking()
}
return uintptr(f.pfd.Sysfd)
}
The exact same problem has been discussed here: golang/go#29277
Will create PR for fix.
Steps to reproduce
Set SocketBufferSize with any valid number
Run agent
Stop agent
This issue can also reproduce in unit test: e25216c
Expected behavior
Jaeger agent can stop successfully.
Relevant log output
No response
Screenshot
No response
Additional context
No response
Jaeger backend version
latest
SDK
without sdk
Pipeline
No response
Stogage backend
No response
Operating system
Linux, Mac
Deployment model
No response
Deployment configs
No response
The text was updated successfully, but these errors were encountered:
<!--
Please delete this comment before posting.
We appreciate your contribution to the Jaeger project! 👋🎉
Before creating a pull request, please make sure:
- Your PR is solving one problem
- You have read the guide for contributing
- See
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING.md
- You signed all your commits (otherwise we won't be able to merge the
PR)
- See
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md#certificate-of-origin---sign-your-work
- You added unit tests for the new functionality
- You mention in the PR description which issue it is addressing, e.g.
"Resolves#123"
-->
## Which problem is this PR solving?
Resolves#4448
## Short description of the changes
Jaeger agent gets stuck when closing with SocketBufferSize set. This is
because `Close()` of `net.UDPConn` will be blocked if `Fd()` is used to
get the file descriptor.
Use `RawConn.Control` instead to get fd to set the socket buffer.
Same issue was discussed here: golang/go#29277
The fix refers to here: brucespang/go-tcpinfo#3
Signed-off-by: Chen Xu <chen.x@uber.com>
What happened?
Problem
With
SocketBufferSize
set in config, the jaeger-agent gets stuck when closing.jaeger/cmd/agent/app/builder.go
Line 90 in 5c3c20d
Root cause
This is because
Close()
ofnet.UDPConn
will be blocked ifFd()
is used to get the file descriptor.The place to set the
SocketBufferSize
in jaeger-agent is below :jaeger/cmd/agent/app/servers/thriftudp/socket_buffer.go
Lines 25 to 32 in 5c3c20d
And the implementation of
Fd()
:The exact same problem has been discussed here: golang/go#29277
Will create PR for fix.
Steps to reproduce
SocketBufferSize
with any valid numberThis issue can also reproduce in unit test:
e25216c
Expected behavior
Jaeger agent can stop successfully.
Relevant log output
No response
Screenshot
No response
Additional context
No response
Jaeger backend version
latest
SDK
without sdk
Pipeline
No response
Stogage backend
No response
Operating system
Linux, Mac
Deployment model
No response
Deployment configs
No response
The text was updated successfully, but these errors were encountered: