-
Notifications
You must be signed in to change notification settings - Fork 23
RDKEMW-7226: Add Logs to identify the delay in shutdown sequence #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
95a15fc
22704b5
f34e064
d599bc4
4633ce9
664955e
3cf6144
43e58c8
d61670e
b284c48
8f96aca
177d551
1c4e949
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ | |
| #include <pthread.h> | ||
| #include <signal.h> | ||
| #include <curl/curl.h> | ||
| #include <time.h> | ||
| #ifdef __GNUC__ | ||
| #ifndef _BUILD_ANDROID | ||
| #ifdef __GLIBC__ | ||
|
|
@@ -109,6 +110,10 @@ T2ERROR initTelemetry() | |
|
|
||
| static void terminate() | ||
| { | ||
| T2Info("%s ++in\n", __FUNCTION__); | ||
| struct timespec t2, t_start; | ||
| clock_gettime(CLOCK_MONOTONIC, &t_start); | ||
|
yogeswaransky marked this conversation as resolved.
yogeswaransky marked this conversation as resolved.
yogeswaransky marked this conversation as resolved.
|
||
|
|
||
|
yogeswaransky marked this conversation as resolved.
|
||
| if(remove("/tmp/.t2ReadyToReceiveEvents") != 0) | ||
| { | ||
| printf("removing the file /tmp/.t2ReadyToReceiveEvents failed!\n"); | ||
|
|
@@ -131,6 +136,10 @@ static void terminate() | |
| ReportProfiles_uninit(); | ||
| http_pool_cleanup(); | ||
| } | ||
| clock_gettime(CLOCK_MONOTONIC, &t2); | ||
|
yogeswaransky marked this conversation as resolved.
|
||
| T2Info("=== [SHUTDOWN] telemetry2_0 shutdown complete, total=%lldms ===\n", | ||
| (long long)(t2.tv_sec - t_start.tv_sec) * 1000 + (t2.tv_nsec - t_start.tv_nsec) / 1000000LL); | ||
|
yogeswaransky marked this conversation as resolved.
Comment on lines
+139
to
+141
|
||
| T2Info("%s --out\n", __FUNCTION__); | ||
|
|
||
|
yogeswaransky marked this conversation as resolved.
|
||
| } | ||
| static void _print_stack_backtrace(void) | ||
|
|
@@ -165,6 +174,7 @@ static void _print_stack_backtrace(void) | |
|
|
||
| void sig_handler(int sig, siginfo_t* info, void* uc) | ||
| { | ||
| T2Info("%s ++in\n", __FUNCTION__); | ||
|
yogeswaransky marked this conversation as resolved.
Comment on lines
175
to
+177
|
||
| if(DAEMONPID == getpid()) | ||
|
Comment on lines
175
to
178
|
||
| { | ||
| int fd; | ||
|
|
@@ -217,6 +227,14 @@ void sig_handler(int sig, siginfo_t* info, void* uc) | |
| } | ||
| else if ( sig == SIGTERM || sig == SIGKILL ) | ||
| { | ||
| if ( sig == SIGTERM ) | ||
| { | ||
| T2Info(("SIGTERM received!\n")); | ||
|
Comment on lines
228
to
+232
|
||
| } | ||
| else | ||
| { | ||
| T2Info(("SIGKILL received!\n")); | ||
| } | ||
|
Comment on lines
228
to
+237
|
||
| terminate(); | ||
| exit(0); | ||
| } | ||
|
|
@@ -241,6 +259,7 @@ void sig_handler(int sig, siginfo_t* info, void* uc) | |
| exit(0); | ||
| } | ||
| } | ||
| T2Info("%s --out\n", __FUNCTION__); | ||
|
yogeswaransky marked this conversation as resolved.
|
||
| } | ||
|
|
||
| static void t2DaemonMainModeInit( ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1075,7 +1075,7 @@ static void* getUpdatedConfigurationThread(void *data) | |||||
|
|
||||||
| void uninitXConfClient() | ||||||
| { | ||||||
| T2Debug("%s ++in\n", __FUNCTION__); | ||||||
| T2Info("%s ++in\n", __FUNCTION__); | ||||||
|
||||||
| T2Info("%s ++in\n", __FUNCTION__); | |
| T2Debug("%s ++in\n", __FUNCTION__); |
Uh oh!
There was an error while loading. Please reload this page.