Giter Club home page Giter Club logo

Comments (5)

marpaia avatar marpaia commented on May 22, 2024

It seems as though it's consistently leaking 32 bytes per query, which isn't HORRIFIC by any means.

from osquery.

marpaia avatar marpaia commented on May 22, 2024

This analysis should be ran again once #75 is solved. Until then, I'm going to assign this to me.

from osquery.

marpaia avatar marpaia commented on May 22, 2024

This still exists:

[marpaia-mbp] osquery (launchdaemon) * valgrind --tool=memcheck --leak-check=yes --suppressions=osquery.supp ./build/tools/run --query="select * from nvram;"

==72691== 320 bytes in 10 blocks are definitely lost in loss record 704 of 825
==72691==    at 0x70BC: malloc_zone_malloc (in /usr/local/Cellar/valgrind/3.9.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==72691==    by 0x9F3FEC: _CFRuntimeCreateInstance (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==72691==    by 0x9F655F: __CFStringCreateImmutableFunnel3 (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==72691==    by 0x9F5C0C: CFStringCreateWithCString (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==72691==    by 0x1001C4850: osquery::tables::genVariable(void const*, void const*, void*) (in ./build/tools/run)
==72691==    by 0xA33935: __CFDictionaryApplyFunction_block_invoke (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==72691==    by 0xA338FB: CFBasicHashApply (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==72691==    by 0xA3384C: CFDictionaryApplyFunction (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
==72691==    by 0x1001C6C4F: osquery::tables::genNVRAM() (in ./build/tools/run)
==72691==    by 0x10017960F: osquery::tables::nvramFilter(sqlite3_vtab_cursor*, int, char const*, int, Mem**) (in ./build/tools/run)
==72691==    by 0x1002954B3: sqlite3VdbeExec (in ./build/tools/run)
==72691==    by 0x10020FE1C: sqlite3Step (in ./build/tools/run)
==72691==
==72691== LEAK SUMMARY:
==72691==    definitely lost: 1,360 bytes in 11 blocks
==72691==    indirectly lost: 4,160 bytes in 4 blocks
==72691==      possibly lost: 0 bytes in 0 blocks
==72691==    still reachable: 2,323 bytes in 10 blocks
==72691==         suppressed: 324,913 bytes in 1,317 blocks

from osquery.

theopolis avatar theopolis commented on May 22, 2024

Simple double-type-description memory leak from (#87).

--4546-- ./build/tools/run:
--4546-- dSYM directory is missing; consider using --dsymutil=yes
Could not create logging file: No such file or directory
COULD NOT CREATE A LOGGINGFILE 20140901-183050.4546!I0901 18:30:50.981273 24085264 run.cpp:17] Executing: select * from nvram;
I0901 18:30:52.554558 24085264 run.cpp:23] Query succedded
==4546== 
==4546== HEAP SUMMARY:
==4546==     in use at exit: 332,978 bytes in 1,350 blocks
==4546==   total heap usage: 8,448 allocs, 7,098 frees, 1,816,071 bytes allocated
==4546== 
==4546== 2,088 (16 direct, 2,072 indirect) bytes in 1 blocks are definitely lost in loss record 822 of 837
==4546==    at 0x6DFB: malloc (in /usr/local/Cellar/valgrind/3.9.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==4546==    by 0x16CDFE6: _nc_table_new (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x16CDA78: __token_table_add_block_invoke (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x144E28C: _dispatch_client_callout (in /usr/lib/system/libdispatch.dylib)
==4546==    by 0x144E1FB: dispatch_once_f (in /usr/lib/system/libdispatch.dylib)
==4546==    by 0x16CB8A6: token_table_add (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x16CB6B2: notify_register_check (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x152EA15: notify_register_tz (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x152E54A: tzsetwall_basic (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x152E707: _st_tzset_basic (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x152FD60: localtime_r (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x3D2E26: google::(anonymous namespace)::LogFileObject::Write(bool, long, char const*, int) (in /usr/local/Cellar/glog/0.3.3/lib/libglog.0.dylib)
==4546== 
==4546== 2,242 (16 direct, 2,226 indirect) bytes in 1 blocks are definitely lost in loss record 825 of 837
==4546==    at 0x6DFB: malloc (in /usr/local/Cellar/valgrind/3.9.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==4546==    by 0x16CDFE6: _nc_table_new (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x16CDA63: __token_table_add_block_invoke (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x144E28C: _dispatch_client_callout (in /usr/lib/system/libdispatch.dylib)
==4546==    by 0x144E1FB: dispatch_once_f (in /usr/lib/system/libdispatch.dylib)
==4546==    by 0x16CB8A6: token_table_add (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x16CB6B2: notify_register_check (in /usr/lib/system/libsystem_notify.dylib)
==4546==    by 0x152EA15: notify_register_tz (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x152E54A: tzsetwall_basic (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x152E707: _st_tzset_basic (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x152FD60: localtime_r (in /usr/lib/system/libsystem_c.dylib)
==4546==    by 0x3D2E26: google::(anonymous namespace)::LogFileObject::Write(bool, long, char const*, int) (in /usr/local/Cellar/glog/0.3.3/lib/libglog.0.dylib)
==4546== 
==4546== LEAK SUMMARY:
==4546==    definitely lost: 32 bytes in 2 blocks
==4546==    indirectly lost: 8,256 bytes in 6 blocks
==4546==      possibly lost: 0 bytes in 0 blocks
==4546==    still reachable: 2,323 bytes in 10 blocks
==4546==         suppressed: 322,367 bytes in 1,332 blocks
==4546== Reachable blocks (those to which a pointer was found) are not shown.
==4546== To see them, rerun with: --leak-check=full --show-leak-kinds=all

from osquery.

marpaia avatar marpaia commented on May 22, 2024

#87

from osquery.

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.