Re: [devel] [PATCH 1/1] plmd: enable dynamic tracing [#2796]
Hi Alex, I think that is enough, I am fine as long as user has option to use the routine for debugging Thanks, Ravi From: Jones, Alex [mailto:ajo...@rbbn.com] Sent: Thursday, March 08, 2018 6:00 PM To: Ravi Sekhar Reddy Konda Cc: opensaf-devel@lists.sourceforge.net Subject: Re: [PATCH 1/1] plmd: enable dynamic tracing [#2796] Hi Ravi, Some of the other subsystems like MSG and LCK have the same issue, and there is no private USR2 code in them. I have had good success attaching gdb to the process and calling the dump routine from there. Then the user does not have to recompile. Do you feel that is enough? Alex _ From: Ravi Sekhar Reddy Konda mailto:ravisekhar.ko...@oracle.com"ravisekhar.ko...@oracle.com> Sent: Thursday, March 8, 2018 12:07:14 AM To: Jones, Alex Cc: HYPERLINK "mailto:opensaf-devel@lists.sourceforge.net"opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] plmd: enable dynamic tracing [#2796] _ NOTICE: This email was received from an EXTERNAL sender _ Hi Alex, Ack for the patch, but have one comment I understand using SIGUSR2 for Control Block dumping is not the generic way as we are using USR2 signal for dynamically enabling Traces. we added this because at times Traces are not enough for debugging and dump routine dumps the complete Control Block information, State and handlers which will be very much use full in debugging. My suggestion is instead of deleting the usr2_sig_handler and Signal initialize code, Comment out the code and add a comment saying that if user wants to do dump PLM CB for debugging they can uncomment the code Thanks, Ravi -Original Message- From: Alex Jones [mailto:ajo...@rbbn.com] Sent: Thursday, March 08, 2018 2:09 AM To: Ravi Sekhar Reddy Konda mailto:ravisekhar.ko...@oracle.com"ravisekhar.ko...@oracle.com> Cc: HYPERLINK "mailto:opensaf-devel@lists.sourceforge.net"opensaf-devel@lists.sourceforge.net; Alex Jones mailto:ajo...@rbbn.com"ajo...@rbbn.com> Subject: [PATCH 1/1] plmd: enable dynamic tracing [#2796] Dynamic tracing does not work with plmd. plmd overrides the USR2 signal with its own dump routine. Remove the signal hander code for USR2 in plmd. --- src/plm/plmd/plms_main.c | 20 1 file changed, 20 deletions(-) diff --git a/src/plm/plmd/plms_main.c b/src/plm/plmd/plms_main.c index 23b019444..5de1f461e 100644 --- a/src/plm/plmd/plms_main.c +++ b/src/plm/plmd/plms_main.c @@ -70,20 +70,6 @@ static void sigusr1_handler(int sig) ncs_sel_obj_ind(&plms_cb->usr1_sel_obj); } -static void usr2_sig_handler(int sig) -{ - PLMS_CB *cb = plms_cb; - PLMS_EVT *evt; - evt = (PLMS_EVT *)malloc(sizeof(PLMS_EVT)); - memset(evt, 0, sizeof(PLMS_EVT)); - evt->req_res = PLMS_REQ; - evt->req_evt.req_type = PLMS_DUMP_CB_EVT_T; - (void)sig; - /* Put it in PLMS's Event Queue */ - m_NCS_IPC_SEND(&cb->mbx, (NCSCONTEXT)evt, NCS_IPC_PRIORITY_HIGH); - signal(SIGUSR2, usr2_sig_handler); -} - / * Name : plms_db_init * @@ -327,12 +313,6 @@ static uint32_t plms_init() rc = NCSCC_RC_FAILURE; goto done; } - /* Initialize a signal handler for debugging purpose */ - if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) { - LOG_ER("signal USR2 failed: %s", strerror(errno)); - rc = NCSCC_RC_FAILURE; - goto done; - } if (!cb->nid_started && plms_amf_register() != NCSCC_RC_SUCCESS) { LOG_ER("AMF Initialization failed"); -- 2.13.6 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 1/1] plmd: enable dynamic tracing [#2796]
Hi Ravi, Some of the other subsystems like MSG and LCK have the same issue, and there is no private USR2 code in them. I have had good success attaching gdb to the process and calling the dump routine from there. Then the user does not have to recompile. Do you feel that is enough? Alex From: Ravi Sekhar Reddy Konda Sent: Thursday, March 8, 2018 12:07:14 AM To: Jones, Alex Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] plmd: enable dynamic tracing [#2796] NOTICE: This email was received from an EXTERNAL sender Hi Alex, Ack for the patch, but have one comment I understand using SIGUSR2 for Control Block dumping is not the generic way as we are using USR2 signal for dynamically enabling Traces. we added this because at times Traces are not enough for debugging and dump routine dumps the complete Control Block information, State and handlers which will be very much use full in debugging. My suggestion is instead of deleting the usr2_sig_handler and Signal initialize code, Comment out the code and add a comment saying that if user wants to do dump PLM CB for debugging they can uncomment the code Thanks, Ravi -Original Message- From: Alex Jones [mailto:ajo...@rbbn.com] Sent: Thursday, March 08, 2018 2:09 AM To: Ravi Sekhar Reddy Konda Cc: opensaf-devel@lists.sourceforge.net; Alex Jones Subject: [PATCH 1/1] plmd: enable dynamic tracing [#2796] Dynamic tracing does not work with plmd. plmd overrides the USR2 signal with its own dump routine. Remove the signal hander code for USR2 in plmd. --- src/plm/plmd/plms_main.c | 20 1 file changed, 20 deletions(-) diff --git a/src/plm/plmd/plms_main.c b/src/plm/plmd/plms_main.c index 23b019444..5de1f461e 100644 --- a/src/plm/plmd/plms_main.c +++ b/src/plm/plmd/plms_main.c @@ -70,20 +70,6 @@ static void sigusr1_handler(int sig) ncs_sel_obj_ind(&plms_cb->usr1_sel_obj); } -static void usr2_sig_handler(int sig) -{ - PLMS_CB *cb = plms_cb; - PLMS_EVT *evt; - evt = (PLMS_EVT *)malloc(sizeof(PLMS_EVT)); - memset(evt, 0, sizeof(PLMS_EVT)); - evt->req_res = PLMS_REQ; - evt->req_evt.req_type = PLMS_DUMP_CB_EVT_T; - (void)sig; - /* Put it in PLMS's Event Queue */ - m_NCS_IPC_SEND(&cb->mbx, (NCSCONTEXT)evt, NCS_IPC_PRIORITY_HIGH); - signal(SIGUSR2, usr2_sig_handler); -} - / * Name : plms_db_init * @@ -327,12 +313,6 @@ static uint32_t plms_init() rc = NCSCC_RC_FAILURE; goto done; } - /* Initialize a signal handler for debugging purpose */ - if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) { - LOG_ER("signal USR2 failed: %s", strerror(errno)); - rc = NCSCC_RC_FAILURE; - goto done; - } if (!cb->nid_started && plms_amf_register() != NCSCC_RC_SUCCESS) { LOG_ER("AMF Initialization failed"); -- 2.13.6 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 1/1] plmd: enable dynamic tracing [#2796]
Hi Alex, Ack for the patch, but have one comment I understand using SIGUSR2 for Control Block dumping is not the generic way as we are using USR2 signal for dynamically enabling Traces. we added this because at times Traces are not enough for debugging and dump routine dumps the complete Control Block information, State and handlers which will be very much use full in debugging. My suggestion is instead of deleting the usr2_sig_handler and Signal initialize code, Comment out the code and add a comment saying that if user wants to do dump PLM CB for debugging they can uncomment the code Thanks, Ravi -Original Message- From: Alex Jones [mailto:ajo...@rbbn.com] Sent: Thursday, March 08, 2018 2:09 AM To: Ravi Sekhar Reddy Konda Cc: opensaf-devel@lists.sourceforge.net; Alex Jones Subject: [PATCH 1/1] plmd: enable dynamic tracing [#2796] Dynamic tracing does not work with plmd. plmd overrides the USR2 signal with its own dump routine. Remove the signal hander code for USR2 in plmd. --- src/plm/plmd/plms_main.c | 20 1 file changed, 20 deletions(-) diff --git a/src/plm/plmd/plms_main.c b/src/plm/plmd/plms_main.c index 23b019444..5de1f461e 100644 --- a/src/plm/plmd/plms_main.c +++ b/src/plm/plmd/plms_main.c @@ -70,20 +70,6 @@ static void sigusr1_handler(int sig) ncs_sel_obj_ind(&plms_cb->usr1_sel_obj); } -static void usr2_sig_handler(int sig) -{ - PLMS_CB *cb = plms_cb; - PLMS_EVT *evt; - evt = (PLMS_EVT *)malloc(sizeof(PLMS_EVT)); - memset(evt, 0, sizeof(PLMS_EVT)); - evt->req_res = PLMS_REQ; - evt->req_evt.req_type = PLMS_DUMP_CB_EVT_T; - (void)sig; - /* Put it in PLMS's Event Queue */ - m_NCS_IPC_SEND(&cb->mbx, (NCSCONTEXT)evt, NCS_IPC_PRIORITY_HIGH); - signal(SIGUSR2, usr2_sig_handler); -} - / * Name : plms_db_init * @@ -327,12 +313,6 @@ static uint32_t plms_init() rc = NCSCC_RC_FAILURE; goto done; } - /* Initialize a signal handler for debugging purpose */ - if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) { - LOG_ER("signal USR2 failed: %s", strerror(errno)); - rc = NCSCC_RC_FAILURE; - goto done; - } if (!cb->nid_started && plms_amf_register() != NCSCC_RC_SUCCESS) { LOG_ER("AMF Initialization failed"); -- 2.13.6 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] plmd: enable dynamic tracing [#2796]
Dynamic tracing does not work with plmd. plmd overrides the USR2 signal with its own dump routine. Remove the signal hander code for USR2 in plmd. --- src/plm/plmd/plms_main.c | 20 1 file changed, 20 deletions(-) diff --git a/src/plm/plmd/plms_main.c b/src/plm/plmd/plms_main.c index 23b019444..5de1f461e 100644 --- a/src/plm/plmd/plms_main.c +++ b/src/plm/plmd/plms_main.c @@ -70,20 +70,6 @@ static void sigusr1_handler(int sig) ncs_sel_obj_ind(&plms_cb->usr1_sel_obj); } -static void usr2_sig_handler(int sig) -{ - PLMS_CB *cb = plms_cb; - PLMS_EVT *evt; - evt = (PLMS_EVT *)malloc(sizeof(PLMS_EVT)); - memset(evt, 0, sizeof(PLMS_EVT)); - evt->req_res = PLMS_REQ; - evt->req_evt.req_type = PLMS_DUMP_CB_EVT_T; - (void)sig; - /* Put it in PLMS's Event Queue */ - m_NCS_IPC_SEND(&cb->mbx, (NCSCONTEXT)evt, NCS_IPC_PRIORITY_HIGH); - signal(SIGUSR2, usr2_sig_handler); -} - / * Name : plms_db_init * @@ -327,12 +313,6 @@ static uint32_t plms_init() rc = NCSCC_RC_FAILURE; goto done; } - /* Initialize a signal handler for debugging purpose */ - if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) { - LOG_ER("signal USR2 failed: %s", strerror(errno)); - rc = NCSCC_RC_FAILURE; - goto done; - } if (!cb->nid_started && plms_amf_register() != NCSCC_RC_SUCCESS) { LOG_ER("AMF Initialization failed"); -- 2.13.6 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel