systemctl status を確認すると SEGV している。SEGV ......
SEGV の原因を追うために systemd 管理下のプロセスで core を取る方法とかのログ。
ちなみにそのプロセスは FreeRADIUS ですね。
コアを dump するように
- $ vim /etc/security/limits.d/core.conf
- $ vim /etc/sysctl.d/core.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* hard core unlimited | |
* soft core unlimited |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kernel.core_pattern = /tmp/core-%e-sig%s-user%u-group%g-pid%p-time%t | |
kernel.core_uses_pid = 1 | |
fs.suid_dumpable = 2 |
コアを取るように設定。
- $ reboot
したら設定の適用完了。
動作確認
きちんと取れるか、死んでたプロセスに
- $ kill -11 <pid>
とかしたら core が取れるか確認できます。
その後
取れたコアを使って gdb で原因を追っていく。
その際に bt などが使えないのがつらいので
- $ yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/9c/hogehogefugafuga
とかしておく。
こうすると freeradius-debuginfo が入って bt とかを見られるようになる。
とかとかしながらデバッグして原因を突き止めたのがこの記事です。
環境
- OS: CentOS Linux release 7.4.1708 (Core)
- kernel: 3.10.0-693.2.2.el7.x86_64
- systemd: 219 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
- FreeRADIUS: 3.0.4
0 件のコメント:
コメントを投稿