我对linux和这个论坛非常陌生。我正在为一个客户解决一个问题,他们有10+ Red Hat Linux5.5 64位服务器。他们希望在某些服务器上使用stop脚本(该脚本使用'kill -15')停止tomcat进程,该脚本运行良好,并在几秒钟内停止tomcat进程。在一些服务器上,有时它会很快停止,有时它会持续运行几分钟,最后客户不得不使用'kill -9‘命令来停止tomcat。日志不会显示任何内容。
你知道为什么这个脚本会有间歇性的行为吗?我们怎样才能在日志中捕获它呢?
尝试使用gdb调试程序时,它无法在OPENSSL_cpuid_setup中报告SIGILL。
对于这个简单的代码,我有相同的行为:
#include <openssl/ssl.h>
int main()
{
SSL_library_init();
}
它编译和运行良好,但从遵循回溯的gdb报告开始。
Program received signal SIGILL, Illegal instruction.
0xb6b2eb40 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) where
我是否可以区分信号,直接传递给进程和通过调试器传递。
案例1:
$ ./process1
process1 (not ptraced)
//set up handler
alarm(5);
....
//signal is handled and I can parse handler parameters
案例2:
$ debugger1 ./process1
process1 (is ptraced by debugger1)
//set up handler
alarm(5);
...
//signal is catched by debugger1. It re