Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File leak: data/saved/com.hedera.services.ServicesMain #16083

Open
alex-kuzmin-hg opened this issue Oct 22, 2024 · 0 comments · May be fixed by #16825
Open

File leak: data/saved/com.hedera.services.ServicesMain #16083

alex-kuzmin-hg opened this issue Oct 22, 2024 · 0 comments · May be fixed by #16825
Assignees
Labels
Scalability Issues related to the scalability problems

Comments

@alex-kuzmin-hg
Copy link

Description

In 24-h NFT Transfer test, file-descriptor leak was identified:
2196 /opt/hgcapp/services-hedera/HapiApp2.0/data/saved/com.hedera.services.ServicesMain/7/123
The dir opened 2196 times and keeps open - that will cause error: too many open files.

In context of previously fixed issues, the ticket
#5533 is closest to describe the issue and to suggest the fix

Found 3 suspects:
./platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/snapshot/SignedStateFilePath.java:197: final List dirs = Files.list(dir).filter(Files::isDirectory).toList();
./platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gui/internal/StateHierarchy.java:52: final List appFiles = rethrowIO(() -> Files.list(appsDirPath)
./platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gui/internal/StateHierarchy.java:59: final List toDelete = rethrowIO(() -> Files.list(appsDirPath)

Steps to reproduce

Run NFT transfer for sufficiently long time and watch for number:
ls -l /proc/<JAVA_PID>/fd/* | grep 'data/saved/com.hedera.services.ServicesMain' | wc -l

This number must be small (single-digit) and should not grow over time.

Additional context

No response

Hedera network

No response

Version

v0.54

Operating system

Linux

@alex-kuzmin-hg alex-kuzmin-hg added the Scalability Issues related to the scalability problems label Oct 22, 2024
@alex-kuzmin-hg alex-kuzmin-hg self-assigned this Oct 22, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Services Team Oct 29, 2024
@alex-kuzmin-hg alex-kuzmin-hg linked a pull request Nov 27, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scalability Issues related to the scalability problems
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

1 participant