Node --prof with aerospike can't start

if i use --prof parameter to profiling my code, for example: node --prof app.js i got error from aerospike client module: ERROR(12629) [connect.cc:69] [Connect] - Connecting to Cluster Failed {“code”:-1,“message”:“Failed to seed cluster”,“func”:“as_cluster_seed_nodes”,“file”:“src/main/aerospike/as_clust er.c”,“line”:319}

if start without profiling mode, all ok. Client version 1.0.54

Hi Dmitry,

I am able to reproduce the issue with the included example applications as well:

With --prof:

$ node --prof -- get test --log-level 5
Jan 11 2016 03:43:31 UTC: TRACE(43063) [conversions.cc:81] [config_from_jsobject] - host[0].addr = "127.0.0.1"
Jan 11 2016 03:43:31 UTC: TRACE(43063) [conversions.cc:90] [config_from_jsobject] - host[0].port = 3000
Jan 11 2016 03:43:31 UTC: DEBUG(43063) [conversions.cc:198] [config_from_jsobject] - Parsing global policies : Done
Jan 11 2016 03:43:31 UTC: DEBUG(43063) [client.cc:129] [New] - Aerospike object initialization : success
Jan 11 2016 03:43:31 UTC: ERROR(43063) [connect.cc:69] [Connect] - Connecting to Cluster Failed

Without --prof:

$ node get test --log-level 5
Jan 11 2016 03:43:39 UTC: TRACE(43089) [conversions.cc:81] [config_from_jsobject] - host[0].addr = "127.0.0.1"
Jan 11 2016 03:43:39 UTC: TRACE(43089) [conversions.cc:90] [config_from_jsobject] - host[0].port = 3000
Jan 11 2016 03:43:39 UTC: DEBUG(43089) [conversions.cc:198] [config_from_jsobject] - Parsing global policies : Done
Jan 11 2016 03:43:39 UTC: DEBUG(43089) [client.cc:129] [New] - Aerospike object initialization : success
Jan 11 2016 03:43:39 UTC: DEBUG(43089) [connect.cc:75] [Connect] - Connecting to Cluster: Success
...

If you don’t mind, can you please file a new issue on Github. I will continue to look into the problem and will provide you with an update when it can be fixed.

Cheers, Jan

Hi Dmitry,

The problem is caused by the timer signals generated by the V8 profiler to collect samples. These SIGPROF interrupts cause some I/O operations in the client to return EINTR errors which are currently not handled correctly. The client should attempt to resume the I/O operations but returns an error to the application instead.

This needs to be fixed in the aerospike C client library which is used by the aerospike Node.js client internally. There is unfortunately no work-around available at the moment. I’ll keep you posted once I know when we will be able to release a fixed client version.

Cheers, Jan

Jan, thanks for you answer. I think it’s very important to fix. Waiting for response…

Dmitry, just a quick update: A fix was committed to the C client repository. Once an updated C client release is available, I will update the Node.js client as well. I expect that we will have a new Node.js client release next week.

1 Like

Dmitry, aerospike@1.0.55 is now available on npmjs.org. It includes the latest C client version which fixes the issue with interrupts. You should be able to run your application using node --prof now and should no longer see any connection issues. Please give it a try and let me know if there are still any problems when running under the profiler.

Very thanks! now working fine with --prof parametr :slight_smile: