您尚未登录。

#1 2020-07-21 22:54:23

atmouse
会员
注册时间: 2011-08-24
帖子: 701

getty@tty1.service 的登录pam模块产生的segv无法生成coredump

给pam模块,pam_gnome_keyring的代码里面,出问题的位置加了 raise(SIGSEGV)

tty1登录的时候确实调试触发了崩溃,但是 coredumpctl看不见 记录, dmesg 也看不见 segv。
普通 service服务或者进程却是可以生成 coredump。

哪里的问题?

离线

#2 2020-07-22 12:10:41

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: getty@tty1.service 的登录pam模块产生的segv无法生成coredump

sudo coredumpctl 看看?
dmesg 当然看不到,因为并没有。

离线

#3 2020-07-22 14:07:24

atmouse
会员
注册时间: 2011-08-24
帖子: 701

Re: getty@tty1.service 的登录pam模块产生的segv无法生成coredump

依云 说:

sudo coredumpctl 看看?
dmesg 当然看不到,因为并没有。

肯定有看过了,root账户没有

离线

#4 2020-07-22 14:09:17

atmouse
会员
注册时间: 2011-08-24
帖子: 701

Re: getty@tty1.service 的登录pam模块产生的segv无法生成coredump

有没有事因为pam本身是什么特殊的沙盒机制导致无法生成core,
pam模块应该是外挂到各种不同的认证进程上,理论上各自进程core应该能生成

离线

#5 2020-07-22 14:29:51

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: getty@tty1.service 的登录pam模块产生的segv无法生成coredump

有可能。你检查一下呗。

离线

#6 2020-07-22 14:33:27

atmouse
会员
注册时间: 2011-08-24
帖子: 701

Re: getty@tty1.service 的登录pam模块产生的segv无法生成coredump

```
cat /etc/systemd/coredump.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See coredump.conf(5) for details.

[Coredump]
#Storage=external
#Compress=yes
#ProcessSizeMax=2G
#ExternalSizeMax=2G
#JournalSizeMax=767M
#MaxUse=
#KeepFree=
```

离线

#7 2020-07-22 14:49:46

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: getty@tty1.service 的登录pam模块产生的segv无法生成coredump

检查你 raise 信号的进程是不是 suid 进程啥的。详 man 5 core。

离线

#8 2020-07-22 16:16:45

atmouse
会员
注册时间: 2011-08-24
帖子: 701

Re: getty@tty1.service 的登录pam模块产生的segv无法生成coredump

不纠结了,我用gdb attach 了, 而且是写个脚本轮询发现tty1进程重启,就attach。 得需要在进程启动的那一瞬间零点几秒后attach。
至少这样让我挂上了

离线

页脚