-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
I'm trying to exit cleanly, and periodically a get a core dump that looks like this:
#0 0x00007f4f51cea8d8 in _fini () from /lib64/libresolv.so.2
#1 0x00000039fa60eb6c in _dl_fini () from /lib64/ld-linux-x86-64.so.2
#2 0x00000039fae35d92 in exit () from /lib64/libc.so.6
(more stuff below)
This is my shutdown code. Is it valid? should I be doing something else to wait for kafka to exit cleanly? (note PluginReturn is just an enum)
PluginReturn LaraTargetShutdownFunc()
{
CommonConfig::rLog( LWARNING, "[%s] Shutting down kafka components\n", cfg->section.c_str());
rd_kafka_topic_destroy (rkt);
rd_kafka_destroy (rk);
int ret=0;
while ( 1 )
{
CommonConfig::rLog( LWARNING, "[%s] Waiting for kafka components to shutdown...\n", cfg->section.c_str());
ret = rd_kafka_wait_destroyed (1000);
if ( ret == 0 )
break;
}
CommonConfig::rLog( LWARNING, "[%s] Shutdown of kafka components complete\n", cfg->section.c_str());
return PLUGIN_SUCCESS;
}