Skip to content

[defect]: Unable to open a new socket for proxy after one attempt failure #5694

@LeeChuHsuan

Description

@LeeChuHsuan

What type of defect/bug is this?

Unexpected behaviour (obvious or verified by project member)

How can the issue be reproduced?

How can the issue be reproduced?

By providing the scenario that makes the fr_packet_list_socket_add function in packet.c return false, such as open too many sockets by sending High TPS load to home servers.
After some sockets got closed due to marking related home servers dead, no new socket is able to be opened.
I think the root cause is the following code which marks the proxy_no_new_sockets = true; .

if (!fr_packet_list_socket_add(proxy_list, this->fd,
sock->proto,
#ifdef WITH_RADIUSV11
sock->radiusv11,
#endif
&sock->other_ipaddr, sock->other_port,
this)) {
#ifdef HAVE_PTHREAD_H
proxy_no_new_sockets = true;
#endif
talloc_free(this);
PTHREAD_MUTEX_UNLOCK(&proxy_mutex);

So in

#ifdef HAVE_PTHREAD_H
if (proxy_no_new_sockets) break;
#endif

if will breaks the loop to try to open any new socket even if it is available.

Log output from the FreeRADIUS daemon

n/a

Relevant log output from client utilities

No response

Backtrace from LLDB or GDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectcategory: a defect or misbehaviour

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions