Add debug logs

This commit is contained in:
lazio579 2018-09-30 08:54:14 +08:00
parent 79bfe5e428
commit 8de3c3a4f0
7 changed files with 14 additions and 2 deletions

View File

@ -900,6 +900,7 @@ static void
network_mysqld_admin_plugin_stop_listening(chassis *chas,
chassis_plugin_config *config)
{
g_message("%s:call network_mysqld_admin_plugin_stop_listening", G_STRLOC);
if (config->listen_con) {
g_message("%s:close listen socket", G_STRLOC);
network_socket_free(config->listen_con->server);

View File

@ -2697,6 +2697,7 @@ static void
network_mysqld_proxy_plugin_stop_listening(chassis *chas,
chassis_plugin_config *config)
{
g_message("%s:call network_mysqld_proxy_plugin_stop_listening", G_STRLOC);
if (config->listen_con) {
g_message("%s:close listen socket", G_STRLOC);
network_socket_free(config->listen_con->server);

View File

@ -2629,6 +2629,7 @@ static void
network_mysqld_shard_plugin_stop_listening(chassis *chas,
chassis_plugin_config *config)
{
g_message("%s:call network_mysqld_shard_plugin_stop_listening", G_STRLOC);
if (config->listen_con) {
g_message("%s:close listen socket", G_STRLOC);
network_socket_free(config->listen_con->server);

View File

@ -211,6 +211,8 @@ cetus_master_process_cycle(cetus_cycle_t *cycle)
chassis_plugin *p = cycle->modules->pdata[i];
p->stop_listening(cycle, p->config);
}
cetus_signal_worker_processes(cycle, cetus_signal_value(CETUS_NOACCEPT_SIGNAL));
}
}
}
@ -603,13 +605,14 @@ cetus_worker_process_cycle(cetus_cycle_t *cycle, void *data)
/* call main procedures for worker */
chassis_event_loop_t *loop = cycle->event_base;
chassis_event_loop(loop);
g_debug("%s: after chassis_event_loop", G_STRLOC);
g_message("%s: after chassis_event_loop", G_STRLOC);
if (cetus_terminate) {
g_message("%s: exiting", G_STRLOC);
cetus_worker_process_exit(cycle);
}
g_message("%s: check cetus_noaccept", G_STRLOC);
if (cetus_noaccept) {
g_message("%s: cetus_noaccept is set true", G_STRLOC);
cetus_noaccept = 0;

View File

@ -105,6 +105,9 @@ chassis_event_loop(chassis_event_loop_t *loop)
g_message("%s: cetus_quit is true", G_STRLOC);
}
if (cetus_noaccept) {
g_message("%s: cetus_noaccept is true", G_STRLOC);
}
break;
}

View File

@ -139,7 +139,7 @@ network_socket_free(network_socket *s)
if (!s)
return;
g_debug("%s: network_socket_free:%p", G_STRLOC, s);
g_message("%s: network_socket_free:%p", G_STRLOC, s);
if (s->last_compressed_packet) {
g_string_free(s->last_compressed_packet, TRUE);
@ -167,6 +167,7 @@ network_socket_free(network_socket *s)
#ifdef HAVE_OPENSSL
network_ssl_free_connection(s);
#endif
g_message("%s: s->fd:%d", G_STRLOC, s->fd);
if (s->fd != -1) {
closesocket(s->fd);
}

View File

@ -145,6 +145,7 @@ gboolean network_ssl_init(char* conf_dir)
{
#if OPENSSL_VERSION_NUMBER >= 0x10100003L
g_message("%s: OPENSSL_VERSION_NUMBER:%d", G_STRLOC, OPENSSL_VERSION_NUMBER);
if (OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL) == 0) {
g_critical(G_STRLOC " OPENSSL_init_ssl() failed");
return FALSE;
@ -159,6 +160,7 @@ gboolean network_ssl_init(char* conf_dir)
#else
g_message("%s: call old ssl fun", G_STRLOC);
OPENSSL_config(NULL);
SSL_library_init();