Coder Social home page Coder Social logo

Comments (3)

nmanis avatar nmanis commented on June 23, 2024 1

This is pending for review in a future release given this is a one-time operation allocation.

from cpp_client_telemetry.

lalitb avatar lalitb commented on June 23, 2024

Memory dump as shared by @aks3090 -

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7f103e232c5f in __interceptor_malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f103c2fd570 in sqlite3MemMalloc (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x694570)
    #2 0x7f103c2fe035 in mallocWithAlarm (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x695035)
    #3 0x7f103c2fe0e1 in sqlite3Malloc (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x6950e1)
    #4 0x7f103c2fe815 in sqlite3DbMallocRaw (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x695815)
    #5 0x7f103c301b95 in strAccumFinishRealloc (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x698b95)
    #6 0x7f103c301c59 in sqlite3StrAccumFinish (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x698c59)
    #7 0x7f103c3020af in sqlite3_vmprintf (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x6990af)
    #8 0x7f103c302192 in sqlite3_mprintf (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x699192)
    #9 0x7f103c37cf6f in sqlite3Pragma (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x713f6f)
    #10 0x7f103c3b6a6c in yy_reduce (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x74da6c)
    #11 0x7f103c3b7ee0 in sqlite3Parser (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x74eee0)
    #12 0x7f103c3b91bd in sqlite3RunParser (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x7501bd)
    #13 0x7f103c382162 in sqlite3Prepare (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x719162)
    #14 0x7f103c3823bb in sqlite3LockAndPrepare (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x7193bb)
    #15 0x7f103c3825ce in sqlite3_prepare_v2 (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x7195ce)
    #16 0x7f103c099034 in Microsoft::Applications::Events::OfflineStorage_SQLite::initializeDatabase() (/opt/3p/binary/drm-mip2004/lib/libmip_core.so+0x430034)

SUMMARY: AddressSanitizer: 16 byte(s) leaked in 1 allocation(s).
FAIL mip_test (exit status: 1)

Reason for Leak:

The allocation of this memory happens during LogManager initialization. SqliteDB wrapper will create prepared statement objects during initialization -

PREPARE_SQL(m_stmtGetPageCount,
"PRAGMA page_count");

These objects should be cleaned (by explicitly calling sqlite3_finalize..()) when LogManager is shutdown, but this is missing in code. Since this is one time allocation during startup, in general it should be safe to have. The memory leak will get significant only if the LogManager is frequently reinitialized while the application is running.

from cpp_client_telemetry.

anPalmei avatar anPalmei commented on June 23, 2024

Hi, is there any update on this issue?

from cpp_client_telemetry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.