named-pkcs11 при запуске зависает.
strace named-pkcs11
последней строкой показывает: «read(6,». Запустим через valgrind
:
[root@rosa-ipa3 ~]# valgrind --leak-check=yes --undef-value-errors=no /usr/sbin/named-pkcs11 ==595== Memcheck, a memory error detector ==595== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==595== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==595== Command: /usr/sbin/named-pkcs11 ==595== ==595== ==595== Process terminating with default action of signal 2 (SIGINT) ==595== at 0x6185D00: __read_nocancel (in /lib64/libpthread-2.24.so) ==595== by 0x198495: read (unistd.h:44) ==595== by 0x198495: ns_os_daemonize (os.c:468) ==595== by 0x12EF5A: setup (main.c:1062) ==595== by 0x12EF5A: main (main.c:1480) ==595== ==595== HEAP SUMMARY: ==595== in use at exit: 324,251 bytes in 25 blocks ==595== total heap usage: 58 allocs, 33 frees, 332,571 bytes allocated ==595== ==595== LEAK SUMMARY: ==595== definitely lost: 0 bytes in 0 blocks ==595== indirectly lost: 0 bytes in 0 blocks ==595== possibly lost: 0 bytes in 0 blocks ==595== still reachable: 324,251 bytes in 25 blocks ==595== suppressed: 0 bytes in 0 blocks ==595== Reachable blocks (those to which a pointer was found) are not shown. ==595== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==595== ==595== For counts of detected and suppressed errors, rerun with: -v ==595== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
В момент зависания named-pkcs11, запущенного через valgrind, нажимаем Ctrl+C.
[root@rosa-ipa3 ~]# rpm -ql bind-debuginfo | grep main.c /usr/src/debug/bind-9.11.5-P1/bin/named-pkcs11/main.c /usr/src/debug/bind-9.11.5-P1/bin/named-sdb/main.c /usr/src/debug/bind-9.11.5-P1/bin/named/main.c [root@rosa-ipa3 ~]# cat /usr/src/debug/bind-9.11.5-P1/bin/named-pkcs11/main.c | head -n 1480 | tail ns_g_conffile, ns_g_chrootdir); } result = isc_mem_create(0, 0, &ns_g_mctx); if (result != ISC_R_SUCCESS) ns_main_earlyfatal("isc_mem_create() failed: %s", isc_result_totext(result)); isc_mem_setname(ns_g_mctx, "main", NULL); setup(); [root@rosa-ipa3 ~]# cat /usr/src/debug/bind-9.11.5-P1/bin/named-pkcs11/main.c | head -n 1480 | tail -n 1 setup(); [root@rosa-ipa3 ~]# cat /usr/src/debug/bind-9.11.5-P1/bin/named-pkcs11/main.c | head -n 1062 | tail -n 1 ns_os_daemonize(); [root@rosa-ipa3 ~]# rpm -ql bind-debuginfo | grep os.c /usr/src/debug/bind-9.11.5-P1/bin/confgen/unix/os.c /usr/src/debug/bind-9.11.5-P1/bin/named-pkcs11/unix/os.c /usr/src/debug/bind-9.11.5-P1/bin/named-sdb/unix/os.c /usr/src/debug/bind-9.11.5-P1/bin/named/unix/os.c /usr/src/debug/bind-9.11.5-P1/export-libs/lib/isc/unix/os.c /usr/src/debug/bind-9.11.5-P1/lib/isc-pkcs11/unix/os.c /usr/src/debug/bind-9.11.5-P1/lib/isc/unix/os.c [root@rosa-ipa3 ~]# cat /usr/src/debug/bind-9.11.5-P1/bin/named-pkcs11/unix/os.c | head -n 468 | tail -n 1 n = read(dfd[0], &buf, 1); [root@rosa-ipa3 ~]# cat /usr/src/debug/bind-9.11.5-P1/bin/named-pkcs11/unix/os.c | head -n 468 | tail -n 1 [root@rosa-ipa3 ~]# rpm -ql bind-debuginfo | grep os.c [root@rosa-ipa3 ~]#
Таким образом, получили строку, которая похожа на ту, в которой происходит зависание.
Обратите внимание, что должен быть установлен debuginfo (bind-debuginfo).
Отправить ответ