Added more details to log output when MaxScale receives a fatal signal.
This commit is contained in:
@ -38,6 +38,7 @@ find_package(MySQL)
|
|||||||
find_package(Pandoc)
|
find_package(Pandoc)
|
||||||
find_package(TCMalloc)
|
find_package(TCMalloc)
|
||||||
find_package(Jemalloc)
|
find_package(Jemalloc)
|
||||||
|
find_package(Git)
|
||||||
find_package(CURL)
|
find_package(CURL)
|
||||||
# You can find the variables set by this in the FindCURL.cmake file
|
# You can find the variables set by this in the FindCURL.cmake file
|
||||||
# which is a default module in CMake.
|
# which is a default module in CMake.
|
||||||
@ -56,6 +57,18 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(GIT_FOUND)
|
||||||
|
message(STATUS "Found git ${GIT_VERSION_STRING}")
|
||||||
|
execute_process(COMMAND ${GIT_EXECUTABLE} rev-list --max-count=1 HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_COMMIT)
|
||||||
|
string(REPLACE "\n" "" MAXSCALE_COMMIT ${GIT_COMMIT})
|
||||||
|
message(STATUS "Commit ID: ${MAXSCALE_COMMIT}")
|
||||||
|
else()
|
||||||
|
message(WARNING "Could not find git, MaxScale commit ID will not be resolved. Will use 'source-build' for commit ID.")
|
||||||
|
set(MAXSCALE_COMMIT "source-build")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/${MAXSCALE_LIBDIR})
|
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/${MAXSCALE_LIBDIR})
|
||||||
|
|
||||||
# Make sure the release notes for this release are present if it is a stable one
|
# Make sure the release notes for this release are present if it is a stable one
|
||||||
|
@ -388,12 +388,16 @@ sigfatal_handler (int i)
|
|||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
fatal_handling = 1;
|
fatal_handling = 1;
|
||||||
|
GATEWAY_CONF* cnf = config_get_global_options();
|
||||||
fprintf(stderr, "\n\nMaxScale received fatal signal %d\n", i);
|
fprintf(stderr, "\n\nMaxScale "MAXSCALE_VERSION" received fatal signal %d\n", i);
|
||||||
|
|
||||||
LOGIF(LE, (skygw_log_write_flush(
|
LOGIF(LE, (skygw_log_write_flush(
|
||||||
LOGFILE_ERROR,
|
LOGFILE_ERROR,
|
||||||
"Fatal: MaxScale received fatal signal %d. Attempting backtrace.", i)));
|
"Fatal: MaxScale "MAXSCALE_VERSION" received fatal signal %d. Attempting backtrace.", i)));
|
||||||
|
|
||||||
|
skygw_log_write_flush(LE,"Commit ID: "MAXSCALE_COMMIT" System name: %s "
|
||||||
|
"Release string: %s Embedded library version: %s",
|
||||||
|
cnf->sysname,cnf->release_string,cnf->version_string);
|
||||||
|
|
||||||
{
|
{
|
||||||
void *addrs[128];
|
void *addrs[128];
|
||||||
@ -1148,7 +1152,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
rc = EXIT_SUCCESS;
|
rc = EXIT_SUCCESS;
|
||||||
printf("%s\n",MAXSCALE_VERSION);
|
printf("MaxScale %s\n",MAXSCALE_VERSION);
|
||||||
goto return_main;
|
goto return_main;
|
||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
|
@ -1 +1,2 @@
|
|||||||
#define MAXSCALE_VERSION "@MAXSCALE_VERSION@"
|
#define MAXSCALE_VERSION "@MAXSCALE_VERSION@"
|
||||||
|
#define MAXSCALE_COMMIT "@MAXSCALE_COMMIT@"
|
||||||
|
Reference in New Issue
Block a user