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

Leak of stream in lib/mgmt_msg.c #18314

Open
2 tasks done
donaldsharp opened this issue Mar 5, 2025 · 2 comments
Open
2 tasks done

Leak of stream in lib/mgmt_msg.c #18314

donaldsharp opened this issue Mar 5, 2025 · 2 comments
Labels
triage Needs further investigation

Comments

@donaldsharp
Copy link
Member

Description

Rarely we are seeing this in the ci system:

***********************************************************************************
Address Sanitizer Error detected in /tmp_topotests/mgmt_tests.test_yang_mgmt/r1.asan.staticd.5848

=================================================================
==5848==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 65568 byte(s) in 1 object(s) allocated from:
    #0 0x7fad1c4b89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7fad1c03a0a7 in qmalloc lib/memory.c:101
    #2 0x7fad1c0cc403 in stream_new lib/stream.c:95
    #3 0x7fad1c04a98a in mgmt_msg_read lib/mgmt_msg.c:137
    #4 0x7fad1c04cb9c in msg_conn_read lib/mgmt_msg.c:511
    #5 0x7fad1c0eecf0 in event_call lib/event.c:2019
    #6 0x7fad1c01b293 in frr_run lib/libfrr.c:1246
    #7 0x55f600cc5023 in main staticd/static_main.c:193
    #8 0x7fad1bb0c249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 65568 byte(s) leaked in 1 allocation(s).
***********************************************************************************```

Clearly this is some timing issue that needs to be addressed

### Version

```text
Latest Master

How to reproduce

mgmt_tests::test_yang_mgmt appears to cause this to happen occassionally

Expected behavior

Not to leak the stream memory

Actual behavior

Leaks stream memory

Additional context

LLama's are like nature's my little pony

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@donaldsharp donaldsharp added the triage Needs further investigation label Mar 5, 2025
@choppsv1
Copy link
Contributor

choppsv1 commented Mar 5, 2025

Is it otherwise a clean run (i.e., no test or run failures)?

@donaldsharp
Copy link
Member Author

Yes from what I could tell. I only noticed it because we turned on in upstream CI the fact that the 0'th test run should not have any new address-santizer errors. And it failed the run because of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants