Skip to content

File descriptors leak #1629

@d-mankowski-synerise

Description

@d-mankowski-synerise

ztunnel version: 1.26.3, out of the box config

On one of our node pools, where ingress-controllers reside (so, tons of incoming connections) we have noticed something that looks like ztunnel's file descriptors/sockets leak.

root@aks-ingress6-10369747-vmss00000L:~# cd /proc/$(pgrep ztunnel)
root@aks-ingress6-10369747-vmss00000L:/proc/9569# grep 'Max open files' limits
Max open files            1048576              1048576              files
root@aks-ingress6-10369747-vmss00000L:/proc/9569# cd fd
root@aks-ingress6-10369747-vmss00000L:/proc/9569/fd# ls -la | grep socket -c
383532
root@aks-ingress6-10369747-vmss00000L:/proc/9569/fd# ss -s
Total: 389
TCP:   391116 (estab 31, closed 391051, orphaned 198, timewait 185)

As shown above, there is over 380k sockets, that ztunnel has not actually released (after ~24h since node was spawned). If my understanding is correct, the connection was closed on TCP level, yet ztunnel has never called close() to free up the file descriptor.

ztunnel memory usage:

Image

Socket metrics from node:

Image Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions