Skip to content

Added debug-dump backtrace for leaked objects in pooled memory.#711

Merged
ted-ross merged 3 commits intoapache:masterfrom
ted-ross:tross-alloc-backtrace
Mar 30, 2020
Merged

Added debug-dump backtrace for leaked objects in pooled memory.#711
ted-ross merged 3 commits intoapache:masterfrom
ted-ross:tross-alloc-backtrace

Conversation

@ted-ross
Copy link
Copy Markdown
Member

If QD_MEMORY_DEBUG is defined, this stores a backtrace for each allocated pool object so that objects left unfreed can be better described at shutdown.

This is a fairly expensive feature. We may want to consider providing an extra definable option so we can use QD_MEMORY_DEBUG without using this new feature.

Copy link
Copy Markdown
Contributor

@kgiusti kgiusti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. The symbol backtrace may need to be freed else ASAN could trigger - see inline.

@ChugR
Copy link
Copy Markdown
Contributor

ChugR commented Mar 27, 2020

It would also be valuable to have a timestamp on the allocation. Then it could be correlated with the log file accurately.

@ganeshmurthy
Copy link
Copy Markdown
Contributor

Please correct me if I am wrong here.

If I set the debugDumpFile attribute of router entity and have QD_MEMORY_STATS as ON and run the system_tests_one_router, I see the following on stdout

20: Router QDR debug dump file:
20: alloc.c: Items of type 'qd_policy_settings_t' remain allocated at shutdown: 14

It would be useful for me to see the alloaction backtrace of all the above 14 qd_policy_settings_t in the debugDumpFile, right ?

@ted-ross ted-ross merged commit e528b51 into apache:master Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants