Comments (4)
We did find leak in the operate case. Will be putting out fix.
To make we have covered all the cases, can you help clarify the sequence of "operations" you have applied in this case? Thanks.
from aerospike-client-c.
Fix and valgrind test has been added and push. Please verify. Thanks
from aerospike-client-c.
sorry, i'm late..
my test code as follows;
static void test_operate( void )
{
as_config cfg;
aerospike as;
as_key key;
as_operations asops;
as_operations *ops = &asops;
as_map *map = NULL;
as_error err;
as_record *rec = NULL;
int rc;
as_key_init( &key, "test", "test-set", "test-key1" );
as_config_init( &cfg );
as_config_add_host( &cfg, "127.0.0.1", 3000 );
aerospike_init( &as, &cfg );
aerospike_connect( &as, &err );
as_operations_init( ops, 7 );
as_operations_add_append_strp( ops, "a", "append str", 0 );
as_operations_add_read( ops, "a" );
// to leaks memory if added map data
map = (as_map*)as_hashmap_new(1);
as_stringmap_set_str( map, "hello", "world" );
as_operations_add_write( ops, "map", (void*)map );
as_operations_add_read( ops, "map" );
as_operations_add_incr( ops, "c", 1900 );
as_operations_add_read( ops, "c" );
as_operations_add_prepend_strp( ops, "b", "prepend str", false );
as_operations_add_read( ops, "b" );
rc = aerospike_key_operate( &as, &err, NULL, &key, ops, &rec );
printf("invoke operate: %d\n", rc);
as_record_destroy( rec );
as_operations_destroy( ops );
aerospike_close( &as, &err );
}
and its still leaking memory.
==43561==
==43561== HEAP SUMMARY:
==43561== in use at exit: 47,847 bytes in 412 blocks
==43561== total heap usage: 553 allocs, 141 frees, 124,305 bytes allocated
==43561==
==43561== 8,192 bytes in 1 blocks are definitely lost in loss record 111 of 111
==43561== at 0x66CB: malloc (in /usr/local/Cellar/valgrind/3.10.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==43561== by 0x100046180: as_msgpack_serializer_serialize (in ./tools/memcheck)
==43561== by 0x10003553B: asval_to_clobject (in ./tools/memcheck)
==43561== by 0x10003751C: aerospike_key_operate (in ./tools/memcheck)
==43561== by 0x100009AEE: test_operate (in ./tools/memcheck)
==43561== by 0x1000098AA: main (in ./tools/memcheck)
==43561==
==43561== LEAK SUMMARY:
==43561== definitely lost: 8,192 bytes in 1 blocks
==43561== indirectly lost: 0 bytes in 0 blocks
==43561== possibly lost: 0 bytes in 0 blocks
==43561== still reachable: 14,155 bytes in 32 blocks
==43561== suppressed: 25,500 bytes in 379 blocks
==43561== Reachable blocks (those to which a pointer was found) are not shown.
==43561== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==43561==
==43561== For counts of detected and suppressed errors, rerun with: -v
==43561== Use --track-origins=yes to see where uninitialised values come from
==43561== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 19 from 19)
from aerospike-client-c.
This code no longer has a leak reported by valgrind.
from aerospike-client-c.
Related Issues (20)
- warning: 'MSG_NOSIGNAL' macro redefined (on macOS) HOT 1
- Deleting bins by setting values to null or empty string HOT 1
- Undefined symbols in static library HOT 2
- cmake support HOT 4
- Is this project still under maintenance HOT 1
- Unable to found benchmarks in aerospike-client-c HOT 2
- Logstash Pipeline Error
- Crash in as_node_ensure_login_shm when remote servers are restarted HOT 16
- Compile failed with "the clang compiler does not support '-march=nocona'" HOT 2
- crash inside as_cluster_tend on arm64 HOT 4
- Give a name to worker threads HOT 3
- apple silicon / arm support HOT 9
- Release tagged 4.6.24 refers to missing .gitmodules HOT 1
- On batch reads only AS_POLICY_REPLICA_SEQUENCE will actually find new nodes for requests, AS_POLICY_REPLICA_ANY will try the same node and fail again. HOT 6
- aerospike-client-c link error with extra compiler flags -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer HOT 1
- can not build without lua HOT 1
- Missing as_buffer.h in installed includes HOT 1
- scan callback failing with memory fault issue HOT 1
- Build fails for 6.4.1 with luajit HOT 1
- crash on exit in as_cluster_tender (after libuv event loop is stopped) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aerospike-client-c.