Skip to content

AppProfiler::Server instances leak with reforking enabled #91

@casperisfine

Description

@casperisfine

I've noticed some File Descriptor growth in molds on pods with reforking enabled:

image

Using a heap dump and harb I was able to map it to AppProfiler::Server:

harb> rootpath 0x7f7d2327a568
root path to 0x7f7d2327a568:
                      ROOT (end_proc)
                      0x7f7d23279c30 (DATA: proc)
                      0x7f7cecb3f658 (OBJECT: AppProfiler::Server::ProfileServer)
                      0x7f7d2327a7e8 (OBJECT: AppProfiler::Server::ProfileServer::UNIX)
                      0x7f7d2327a568 (FILE: (null))

harb> rootpath 0x7f7cb1171c88
root path to 0x7f7cb1171c88:
                      ROOT (end_proc)
                      0x7f7cb1171670 (DATA: proc)
                      0x7f7d22654608 (OBJECT: AppProfiler::Server::ProfileServer)
                      0x7f7cb1171e18 (OBJECT: AppProfiler::Server::ProfileServer::UNIX)
                      0x7f7cb1171c88 (FILE: (null))

(showing only two instances here, but there is about one per generation.

I suspect the server need to be explicitly closed after fork.

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