问题2:CentOS 下修改 core file size 失败解决

本文详细介绍了如何在Linux系统中修改corefilesize限制,包括使用ulimit命令查看和修改核心文件大小,通过limits.conf文件进一步配置,以及解决系统默认设置导致的限制无法生效问题。

目的:修改core file size

1. 查看当前的系统资源限制 ulimit -a

[root@10gr2 ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 16061
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 16061
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

【说明】:core file size          (blocks, -c)  0  这项也就是关于 core file size 的限制的内容现在是0 也就不产生core file size ,现在想将这个值改为2GB

2. 在/etc/security/limits.conf 中加入下列的内容对 core file size 进行限制

* soft   core 4194304
* hard core 4194304

3. 退出当前登陆,重新登陆,通过命令 ulimit -c 进行查看设置是否成功

[root@10gr2 ~]# ulimit -c
0

【说明】:设置只对当前的登陆有效,并不是对每次的登陆都生效,那么说明更改不成功

4. 查找原因,研究了一下相关的文档,有三个因素:

In /etc/profile (Redhat)

# No core files by default
# ulimit -S -c 0 > /dev/null 2>&1

In /etc/init.d/functions (Redhat)

# make sure it doesn't core dump anywhere unless requested

#ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1

这上面两个文件的ulimit 命令注释掉(不然登录后会系统执行一遍又将其改成0)

5. 修改完上面的两项之后,保存,并且退出当前登陆,重新登陆 通过命令 ulimit -c 查看

[root@10gr2 ~]# ulimit -c
4194304

修改成功!

6. 当然,还有第三种情况,就是写到当前用户的bash_profile 里了,同样如果bash_profile 里如果有 ulimit -c 0 的话,也需要去掉,否则用户重新登陆时,都会被置为0

--END--

From user@localhost.localdomain Tue Oct 21 18:20:50 2025 Return-Path: <user@localhost.localdomain> X-Original-To: root@localhost Delivered-To: root@localhost.localdomain Received: by hadoop1.localdomain (Postfix, from userid 0) id BC636620AD7C; Tue, 21 Oct 2025 18:20:50 +0800 (CST) Date: Tue, 21 Oct 2025 18:20:50 +0800 From: user@localhost.localdomain To: root@localhost.localdomain Subject: [abrt] gnome-settings-daemon: gsd-xsettings killed by SIGTRAP Message-ID: <68f75e82.iXyRD5upAc4dVEsW%user@localhost> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit reason: gsd-xsettings killed by SIGTRAP cmdline: /usr/libexec/gsd-xsettings executable: /usr/libexec/gsd-xsettings package: gnome-settings-daemon-3.28.1-8.el7 component: gnome-settings-daemon pid: 2125 pwd: /run/gnome-initial-setup hostname: hadoop1 count: 1 abrt_version: 2.1.11 analyzer: CCpp architecture: x86_64 event_log: global_pid: 2125 kernel: 3.10.0-1160.el7.x86_64 last_occurrence: 1761042049 os_release: CentOS Linux release 7.9.2009 (Core) pkg_arch: x86_64 pkg_epoch: 0 pkg_fingerprint: 24C6 A8A7 F4A8 0EB5 pkg_name: gnome-settings-daemon pkg_release: 8.el7 pkg_vendor: CentOS pkg_version: 3.28.1 runlevel: N 5 time: 2025年1021日 星期二 18时20分49秒 type: CCpp uid: 988 username: gnome-initial-setup uuid: 1d9c66c5c735ea863288ccbf47d5df65d7b3a8b4 core_backtrace: :{ "signal": 5 :, "executable": "/usr/libexec/gsd-xsettings" :, "stacktrace": : [ { "crash_thread": true : , "frames": : [ { "address": 140000064482145 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 334689 : , "function_name": "_g_log_abort" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064486257 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 338801 : , "function_name": "g_log_default_handler" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064486753 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 339297 : , "function_name": "g_logv" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064487407 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 339951 : , "function_name": "g_log" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 4227710 : , "build_id": "553302ac44d2f297a793c440253cb13267ed9a4b" : , "build_id_offset": 33406 : , "function_name": "gnome_xsettings_manager_init" : , "file_name": "/usr/libexec/gsd-xsettings" : } : , { "address": 140000067585483 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 202187 From user@localhost.localdomain Tue Oct 21 18:20:50 2025 Return-Path: <user@localhost.localdomain> X-Original-To: root@localhost Delivered-To: root@localhost.localdomain Received: by hadoop1.localdomain (Postfix, from userid 0) id BC636620AD7C; Tue, 21 Oct 2025 18:20:50 +0800 (CST) Date: Tue, 21 Oct 2025 18:20:50 +0800 From: user@localhost.localdomain To: root@localhost.localdomain Subject: [abrt] gnome-settings-daemon: gsd-xsettings killed by SIGTRAP Message-ID: <68f75e82.iXyRD5upAc4dVEsW%user@localhost> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit reason: gsd-xsettings killed by SIGTRAP cmdline: /usr/libexec/gsd-xsettings executable: /usr/libexec/gsd-xsettings package: gnome-settings-daemon-3.28.1-8.el7 component: gnome-settings-daemon pid: 2125 pwd: /run/gnome-initial-setup hostname: hadoop1 count: 1 abrt_version: 2.1.11 analyzer: CCpp architecture: x86_64 event_log: global_pid: 2125 kernel: 3.10.0-1160.el7.x86_64 last_occurrence: 1761042049 os_release: CentOS Linux release 7.9.2009 (Core) pkg_arch: x86_64 pkg_epoch: 0 pkg_fingerprint: 24C6 A8A7 F4A8 0EB5 pkg_name: gnome-settings-daemon pkg_release: 8.el7 pkg_vendor: CentOS pkg_version: 3.28.1 runlevel: N 5 time: 2025年1021日 星期二 18时20分49秒 type: CCpp uid: 988 username: gnome-initial-setup uuid: 1d9c66c5c735ea863288ccbf47d5df65d7b3a8b4 core_backtrace: :{ "signal": 5 :, "executable": "/usr/libexec/gsd-xsettings" :, "stacktrace": : [ { "crash_thread": true : , "frames": : [ { "address": 140000064482145 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 334689 : , "function_name": "_g_log_abort" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064486257 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 338801 : , "function_name": "g_log_default_handler" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064486753 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 339297 : , "function_name": "g_logv" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064487407 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 339951 : , "function_name": "g_log" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 4227710 : , "build_id": "553302ac44d2f297a793c440253cb13267ed9a4b" : , "build_id_offset": 33406 : , "function_name": "gnome_xsettings_manager_init" : , "file_name": "/usr/libexec/gsd-xsettings" : } : , { "address": 140000067585483 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 202187 : , "function_name": "g_type_create_instance" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 140000067470045 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 86749 : , "function_name": "g_object_new_internal" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 140000067476365 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 93069 : , "function_name": "g_object_new_with_properties" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 140000067478897 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 95601 : , "function_name": "g_object_new" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 4230097 : , "build_id": "553302ac44d2f297a793c440253cb13267ed9a4b" : , "build_id_offset": 35793 : , "function_name": "gnome_xsettings_manager_new" : , "file_name": "/usr/libexec/gsd-xsettings" : } : , { "address": 4215415 : , "build_id": "553302ac44d2f297a793c440253cb13267ed9a4b" : , "build_id_offset": 21111 : , "function_name": "main" : , "file_name": "/usr/libexec/gsd-xsettings" : } ] : } : , { "frames": : [ { "address": 140000055389245 : , "build_id": "f9fafde281e0e0e2af45911ad0fa115b64c2cea8" : , "build_id_offset": 998461 : , "function_name": "poll" : , "file_name": "/lib64/libc.so.6" : } : , { "address": 140000064459644 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 312188 : , "function_name": "g_main_context_iterate.isra.19" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064459948 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 312492 : , "function_name": "g_main_context_iteration" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064460009 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 312553 : , "function_name": "glib_worker_main" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064619840 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 472384 : , "function_name": "g_thread_proxy" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000018140837 : , "build_id": "2b482b3bae79def4e5bc9791bc6bbdae0e93e359" : , "build_id_offset": 32421 : , "function_name": "start_thread" : , "file_name": "/lib64/libpthread.so.0" : } : , { "address": 140000055433581 : , "build_id": "f9fafde281e0e0e2af45911ad0fa115b64c2cea8" : , "build_id_offset": 1042797 : , "function_name": "__clone" : , "file_name": "/lib64/libc.so.6" : } ] : } ] :} cgroup: :11:blkio:/ :10:freezer:/ :9:net_prio,net_cls:/ :6:hugetlb:/ :5:memory:/ :4:devices:/user.slice From user@localhost.localdomain Tue Oct 21 18:20:50 2025 Return-Path: <user@localhost.localdomain> X-Original-To: root@localhost Delivered-To: root@localhost.localdomain Received: by hadoop1.localdomain (Postfix, from userid 0) id BC636620AD7C; Tue, 21 Oct 2025 18:20:50 +0800 (CST) Date: Tue, 21 Oct 2025 18:20:50 +0800 From: user@localhost.localdomain To: root@localhost.localdomain Subject: [abrt] gnome-settings-daemon: gsd-xsettings killed by SIGTRAP Message-ID: <68f75e82.iXyRD5upAc4dVEsW%user@localhost> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit reason: gsd-xsettings killed by SIGTRAP cmdline: /usr/libexec/gsd-xsettings executable: /usr/libexec/gsd-xsettings package: gnome-settings-daemon-3.28.1-8.el7 component: gnome-settings-daemon pid: 2125 pwd: /run/gnome-initial-setup hostname: hadoop1 count: 1 abrt_version: 2.1.11 analyzer: CCpp architecture: x86_64 event_log: global_pid: 2125 kernel: 3.10.0-1160.el7.x86_64 last_occurrence: 1761042049 os_release: CentOS Linux release 7.9.2009 (Core) pkg_arch: x86_64 pkg_epoch: 0 pkg_fingerprint: 24C6 A8A7 F4A8 0EB5 pkg_name: gnome-settings-daemon pkg_release: 8.el7 pkg_vendor: CentOS pkg_version: 3.28.1 runlevel: N 5 time: 2025年1021日 星期二 18时20分49秒 type: CCpp uid: 988 username: gnome-initial-setup uuid: 1d9c66c5c735ea863288ccbf47d5df65d7b3a8b4 core_backtrace: :{ "signal": 5 :, "executable": "/usr/libexec/gsd-xsettings" :, "stacktrace": : [ { "crash_thread": true : , "frames": : [ { "address": 140000064482145 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 334689 : , "function_name": "_g_log_abort" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064486257 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 338801 : , "function_name": "g_log_default_handler" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064486753 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 339297 : , "function_name": "g_logv" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064487407 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 339951 : , "function_name": "g_log" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 4227710 : , "build_id": "553302ac44d2f297a793c440253cb13267ed9a4b" : , "build_id_offset": 33406 : , "function_name": "gnome_xsettings_manager_init" : , "file_name": "/usr/libexec/gsd-xsettings" : } : , { "address": 140000067585483 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 202187 : , "function_name": "g_type_create_instance" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 140000067470045 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 86749 : , "function_name": "g_object_new_internal" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 140000067476365 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 93069 : , "function_name": "g_object_new_with_properties" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 140000067478897 : , "build_id": "ce5eeaa5e8efc56c38a08b0d70333392665d36af" : , "build_id_offset": 95601 : , "function_name": "g_object_new" : , "file_name": "/lib64/libgobject-2.0.so.0" : } : , { "address": 4230097 : , "build_id": "553302ac44d2f297a793c440253cb13267ed9a4b" : , "build_id_offset": 35793 : , "function_name": "gnome_xsettings_manager_new" : , "file_name": "/usr/libexec/gsd-xsettings" : } : , { "address": 4215415 : , "build_id": "553302ac44d2f297a793c440253cb13267ed9a4b" : , "build_id_offset": 21111 : , "function_name": "main" : , "file_name": "/usr/libexec/gsd-xsettings" : } ] : } : , { "frames": : [ { "address": 140000055389245 : , "build_id": "f9fafde281e0e0e2af45911ad0fa115b64c2cea8" : , "build_id_offset": 998461 : , "function_name": "poll" : , "file_name": "/lib64/libc.so.6" : } : , { "address": 140000064459644 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 312188 : , "function_name": "g_main_context_iterate.isra.19" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064459948 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 312492 : , "function_name": "g_main_context_iteration" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064460009 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 312553 : , "function_name": "glib_worker_main" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000064619840 : , "build_id": "df38794710f10bc3524ed922a667a831d776953d" : , "build_id_offset": 472384 : , "function_name": "g_thread_proxy" : , "file_name": "/lib64/libglib-2.0.so.0" : } : , { "address": 140000018140837 : , "build_id": "2b482b3bae79def4e5bc9791bc6bbdae0e93e359" : , "build_id_offset": 32421 : , "function_name": "start_thread" : , "file_name": "/lib64/libpthread.so.0" : } : , { "address": 140000055433581 : , "build_id": "f9fafde281e0e0e2af45911ad0fa115b64c2cea8" : , "build_id_offset": 1042797 : , "function_name": "__clone" : , "file_name": "/lib64/libc.so.6" : } ] : } ] :} cgroup: :11:blkio:/ :10:freezer:/ :9:net_prio,net_cls:/ :6:hugetlb:/ :5:memory:/ :4:devices:/user.slice :3:pids:/user.slice :2:cpuacct,cpu:/ :1:name=systemd:/user.slice/user-988.slice/session-c1.scope :/usr/lib64/libXcomposite.so.1.0.0 libXcomposite-0.4.4-4.1.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libfreetype.so.6.14.0 freetype-2.8-14.el7.x86_64 (CentOS) 1761038673 :/usr/libexec/gsd-xsettings gnome-settings-daemon-3.28.1-8.el7.x86_64 (CentOS) 1761038912 :/usr/lib64/libelf-0.176.so elfutils-libelf-0.176-5.el7.x86_64 (CentOS) 1761038673 :/usr/lib64/libpcre.so.1.2.0 pcre-8.32-17.el7.x86_64 (CentOS) 1761038672 :/usr/lib64/libpixman-1.so.0.34.0 pixman-0.34.0-1.el7.x86_64 (CentOS) 1761038675 :/usr/lib64/libgobject-2.0.so.0.5600.1 glib2-2.56.1-7.el7.x86_64 (CentOS) 1761038735 :/usr/lib64/libharfbuzz.so.0.10705.0 harfbuzz-1.7.5-2.el7.x86_64 (CentOS) 1761038772 :/usr/lib64/libsystemd.so.0.6.0 systemd-libs-219-78.el7.x86_64 (CentOS) 1761038781 :/usr/lib64/libc-2.17.so glibc-2.17-317.el7.x86_64 (CentOS) 1761038667 :/usr/lib64/libm-2.17.so glibc-2.17-317.el7.x86_64 (CentOS) 1761038667 :/usr/lib64/libXrandr.so.2.2.0 libXrandr-1.5.1-2.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libresolv-2.17.so glibc-2.17-317.el7.x86_64 (CentOS) 1761038667 :/usr/lib64/gconv/gconv-modules.cache glibc-2.17-317.el7.x86_64 (CentOS) 1761038667 :/usr/lib64/libpangoft2-1.0.so.0.4200.3 pango-1.42.4-4.el7_7.x86_64 (CentOS) 1761038835 :/usr/lib64/libXrender.so.1.3.0 libXrender-0.9.10-1.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libX11.so.6.3.0 libX11-1.6.7-2.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libbz2.so.1.0.6 bzip2-libs-1.0.6-13.el7.x86_64 (CentOS) 1761038673 :/usr/lib64/libuuid.so.1.3.0 libuuid-2.23.2-65.el7.x86_64 (CentOS) 1761038672 :/usr/lib64/libblkid.so.1.1.0 libblkid-2.23.2-65.el7.x86_64 (CentOS) 1761038734 :/usr/lib64/libgmodule-2.0.so.0.5600.1 glib2-2.56.1-7.el7.x86_64 (CentOS) 1761038735 :/usr/lib64/libepoxy.so.0.0.0 libepoxy-1.5.2-1.el7.x86_64 (CentOS) 1761038680 :/usr/lib64/libXfixes.so.3.1.0 libXfixes-5.0.3-1.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libthai.so.0.1.6 libthai-0.1.14-9.el7.x86_64 (CentOS) 1761038692 :/usr/lib64/libpng15.so.15.13.0 libpng-2:1.5.13-8.el7.x86_64 (CentOS) 1761038672 :/usr/lib64/libatspi.so.0.0.1 at-spi2-core-2.28.0-1.el7.x86_64 (CentOS) 1761038819 :/usr/lib64/libXcursor.so.1.0.2 libXcursor-1.1.15-1.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libpthread-2.17.so glibc-2.17-317.el7.x86_64 (CentOS) 1761038667 :/usr/lib64/libgtk-3.so.0.2200.30 gtk3-3.22.30-5.el7.x86_64 (CentOS) 1761038881 :/usr/share/locale/zh_CN/LC_MESSAGES/atk10.mo atk-2.28.1-2.el7.x86_64 (CentOS) 1761038736 :/usr/lib64/libXau.so.6.0.0 libXau-1.0.8-2.1.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/librt-2.17.so glibc-2.17-317.el7.x86_64 (CentOS) 1761038667 :/usr/lib64/libXdamage.so.1.1.0 libXdamage-1.1.4-4.1.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libgpg-error.so.0.10.0 libgpg-error-1.12-3.el7.x86_64 (CentOS) 1761038673 :/usr/lib64/liblzma.so.5.2.2 xz-libs-5.2.2-1.el7.x86_64 (CentOS) 1761038672 :/usr/lib64/libglib-2.0.so.0.5600.1 glib2-2.56.1-7.el7.x86_64 (CentOS) 1761038735 :/usr/lib64/liblz4.so.1.8.3 lz4-1.8.3-1.el7.x86_64 (CentOS) 1761038678 :/usr/lib/locale/locale-archive glibc-common-2.17-317.el7.x86_64 (CentOS) 1761038666 :/usr/lib64/libgraphite2.so.3.0.1 graphite2-1.3.10-1.el7_3.x86_64 (CentOS) 1761038772 :/usr/lib64/libfontconfig.so.1.11.1 fontconfig-2.13.0-4.3.el7.x86_64 (CentOS) 1761038731 :/usr/lib64/libxcb-shm.so.0.0.0 libxcb-1.13-1.el7.x86_64 (CentOS) 1761038677 :/usr/lib64/libpango-1.0.so.0.4200.3 pango-1.42.4-4.el7_7.x86_64 (CentOS) 1761038835 :/usr/lib64/libdl-2.17.so glibc-2.17-317.el7.x86_64 (CentOS) 1761038667 :/usr/lib64/libgcrypt.so.11.8.2 libgcrypt-1.5.3-14.el7.x86_64 (CentOS) 1761038673 :/usr/lib64/libffi.so.6.0.1 libffi-3.0.13-19.el7.x86_64 (CentOS) 1761038674 :/usr/lib64/libdw-0.176.so elfutils-libs-0.176-5.el7.x86_64 (CentOS) 1761038781 :/usr/lib64/libpangocairo-1.0.so.0.4200.3 pango-1.42.4-4.el7_7.x86_64 (CentOS) 1761038835 :/usr/lib64/libexpat.so.1.6.0 expat-2.1.0-12.el7.x86_64 (CentOS) 1761038673 :/usr/lib64/libXi.so.6.1.0 libXi-1.7.9-1.el7.x86_64 (CentOS) 1761038677 environ: :XDG_VTNR=1 :XDG_SESSION_ID=c1 :SHELL=/sbin/nologin :XDG_SESSION_CLASS=greeter :USER=gnome-initial-setup :PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin :PWD=/run/gnome-initial-setup/ :XDG_SESSION_TYPE=x11 :LANG=zh_CN.UTF-8 :GDM_LANG=zh_CN.UTF-8 :SHLVL=0 :HOME=/run/gnome-initial-setup/ :XDG_SEAT=seat0 :GDM_SEAT_ID=seat0 :LOGNAME=gnome-initial-setup :XDG_DATA_DIRS=/usr/share/gdm/greeter:/usr/local/share/:/usr/share/ :WINDOWPATH=1 :DISPLAY=:0 :XDG_RUNTIME_DIR=/run/user/988 :GDM_VERSION=3.28.2 :XDG_CURRENT_DESKTOP=GNOME-Greeter:GNOME :RUNNING_UNDER_GDM=true :XAUTHORITY=/run/gdm/auth-for-gdm-PEbwHQ/database :QT_IM_MODULE=ibus :XMODIFIERS=@im=ibus :GNOME_DESKTOP_SESSION_ID=this-is-deprecated :XDG_MENU_PREFIX=gnome- :SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/1467,unix/unix:/tmp/.ICE-unix/1467 :DESKTOP_AUTOSTART_ID=106b8e10516aba165617610418135811100000014670018 :GIO_LAUNCHED_DESKTOP_FILE=/etc/xdg/autostart/org.gnome.SettingsDaemon.XSettings.desktop :GIO_LAUNCHED_DESKTOP_FILE_PID=2125 :Max cpu time unlimited unlimited seconds :Max open files 1024 4096 files :Max locked memory 65536 65536 bytes :Max address space unlimited unlimited bytes :Max file locks unlimited unlimited locks :Max pending signals 15594 15594 signals :010c2000-01148000 rw-p 00000000 00:00 0 [heap] :7f544562d000-7f544562e000 rw-p 00000000 00:00 0 :7f544658f000-7f54465af000 rw-p 00000000 00:00 0 :7f5446c02000-7f5446c03000 rw-p 00000000 00:00 0 :7f54479d4000-7f54479d5000 rw-p 00000000 00:00 0 :7f5449448000-7f5449449000 rw-p 00000000 00:00 0 :7f5449888000-7f544988a000 rw-p 00000000 00:00 0 :7f544b7a9000-7f544b7ad000 rw-p 00000000 00:00 0 :7f544bf0a000-7f544bf0b000 rw-p 00000000 00:00 0 :7f544cbe9000-7f544cbeb000 rw-p 00000000 00:00 0 :7f544dbf4000-7f544dbf9000 rw-p 00000000 00:00 0 :7f544ea7e000-7f544ea80000 rw-p 00000000 00:00 0 :7f544fa74000-7f544fa95000 rw-p 00000000 00:00 0 :7f544faa9000-7f544faaa000 rw-p 00000000 00:00 0 :7f544faac000-7f544faad000 rw-p 00000000 00:00 0 :7ffe78246000-7ffe78267000 rw-p 00000000 00:00 0 [stack] :7ffe782c9000-7ffe782cb000 r-xp 00000000 00:00 0 [vdso] :ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] open_fds: :0:/dev/null :pos: 0 :flags: 0100000 :mnt_id: 20 :1:socket:[37895] :pos: 0 :flags: 02 :mnt_id: 7 :2:socket:[37896] :pos: 0 :flags: 02 :mnt_id: 7 :3:socket:[37897] :pos: 0 :flags: 02004002 :mnt_id: 7 :4:anon_inode:[eventfd] :pos: 0 :flags: 02004002 :mnt_id: 10 :eventfd-count: 2 :5:anon_inode:[eventfd] :pos: 0 :flags: 02004002 :mnt_id: 10 :eventfd-count: 0 :6:socket:[34392] :pos: 0 :flags: 02000002 :mnt_id: 7 os_info: :NAME="CentOS Linux" :VERSION="7 (Core)" :ID="centos" :ID_LIKE="rhel fedora" :VERSION_ID="7" :PRETTY_NAME="CentOS Linux 7 (Core)" :ANSI_COLOR="0;31" :CPE_NAME="cpe:/o:centos:centos:7" :HOME_URL="https://www.centos.org/" :BUG_REPORT_URL="https://bugs.centos.org/" : :CENTOS_MANTISBT_PROJECT="CentOS-7" :CENTOS_MANTISBT_PROJECT_VERSION="7" :REDHAT_SUPPORT_PRODUCT="centos" :REDHAT_SUPPORT_PRODUCT_VERSION="7" : proc_pid_status: :Name: gsd-xsettings :Umask: 0022 :State: S (sleeping) :Tgid: 2125 :Ngid: 0 :Pid: 2125 :PPid: 1 :TracerPid: 0 :Uid: 988 988 988 988 :Gid: 982 982 982 982 :FDSize: 64 :Groups: 982 :VmPeak: 421688 kB :VmSize: 356260 kB :VmLck: 0 kB :VmPin: 0 kB :VmHWM: 8500 kB :VmRSS: 8500 kB :RssAnon: 1964 kB :RssFile: 6536 kB :RssShmem: 0 kB :VmData: 74792 kB :VmStk: 132 kB :VmExe: 52 kB :SigQ: 0/15594 :SigPnd: 0000000000000000 :ShdPnd: 0000000000000000 :SigBlk: 0000000000000000 :SigIgn: 0000000000001000 :NoNewPrivs: 0 :Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff :Cpus_allowed_list: 0-127 :Mems_allowed_list: 0 :voluntary_ctxt_switches: 75 :nonvoluntary_ctxt_switches: 1 var_log_messages: :[System Logs]: :[User Logs]: Return-Path: <user@localhost.localdomain> X-Original-To: root@localhost Delivered-To: root@localhost.localdomain Received: by hadoop1.localdomain (Postfix, from userid 0) id 943E26212958; Tue, 21 Oct 2025 21:59:28 +0800 (CST) Date: Tue, 21 Oct 2025 21:59:28 +0800 From: user@localhost.localdomain To: root@localhost.localdomain Subject: [abrt] kernel: WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:356 dev_watchdog+0x248/0x260 Message-ID: <68f791c0.xFdtXxFFRYNN3B/Y%user@localhost> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit package: kernel component: kernel hostname: hadoop1 count: 1 abrt_version: 2.1.11 analyzer: Kerneloops architecture: x86_64 duphash: 9a300e6698cf94af9ef1cda3162994d182a3dfc5 event_log: runlevel: N 5 time: 2025年1021日 星期二 21时59分27秒 username: root uuid: 9a300e6698cf94af9ef1cda3162994d182a3dfc5 backtrace: :WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:356 dev_watchdog+0x248/0x260 :NETDEV WATCHDOG: ens33 (e1000): transmit queue 0 timed out :dm_mirror dm_region_hash dm_log dm_mod fuse [last unloaded: ip_tables] :CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-1160.el7.x86_64 #1 :Call Trace: :<IRQ> [<ffffffff97381340>] dump_stack+0x19/0x1b :[<ffffffff96c9b228>] __warn+0xd8/0x100 :[<ffffffff96c9b2af>] warn_slowpath_fmt+0x5f/0x80 :[<ffffffff972822f8>] dev_watchdog+0x248/0x260 :[<ffffffff972820b0>] ? dev_deactivate_queue.constprop.27+0x60/0x60 :[<ffffffff96cabd58>] call_timer_fn+0x38/0x110 :[<ffffffff972820b0>] ? dev_deactivate_queue.constprop.27+0x60/0x60 :[<ffffffff96cae1ed>] run_timer_softirq+0x24d/0x300 :[<ffffffff96ca4b95>] __do_softirq+0xf5/0x280 :[<ffffffff973974ec>] call_softirq+0x1c/0x30 :[<ffffffff97394fba>] apic_timer_interrupt+0x16a/0x170 :<EOI> [<ffffffff97389000>] ? __cpuidle_text_start+0x8/0x8 :[<ffffffff9738924b>] ? native_safe_halt+0xb/0x20 :[<ffffffff9738901e>] default_idle+0x1e/0xc0 :[<ffffffff96c37ca0>] arch_cpu_idle+0x20/0xc0 :[<ffffffff96d011ea>] cpu_startup_entry+0x14a/0x1e0 :[<ffffffff9736f9c7>] rest_init+0x77/0x80 :[<ffffffff9798b1cf>] start_kernel+0x44b/0x46c :[<ffffffff9798ab84>] ? repair_env_string+0x5c/0x5c :[<ffffffff9798a120>] ? early_idt_handler_array+0x120/0x120 :[<ffffffff9798a738>] x86_64_start_reservations+0x24/0x26 :[<ffffffff9798a88e>] x86_64_start_kernel+0x154/0x177 :[<ffffffff96c000d5>] start_cpu+0x5/0x14 dmesg: :[ 0.000000] Initializing cgroup subsys cpuset :[ 0.000000] Initializing cgroup subsys cpu :[ 0.000000] Initializing cgroup subsys cpuacct :[ 0.000000] Linux version 3.10.0-1160.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Mon Oct 19 16:18:59 UTC 2020
最新发布
10-25
<think>嗯,用户这次提出的问题相当专业,是关于CentOS 7.9系统下两个特定问题解决方案:gnome-settings-daemon的gsd-xsettings进程被SIGTRAP信号终止,以及ens33网卡传输队列超时问题。用户的技术描述非常精确,连软件版本(gnome-settings-daemon-3.28.1-8.el7)和内核错误信息(transmit queue 0 timed out)都提供了,说明是资深系统管理员或运维工程师。 从技术角度看,这两个问题分别涉及GUI层和内核网络层,需要分开处理但又有潜在关联。SIGTRAP信号通常与调试断点相关,可能由上游库文件冲突引发;而网卡传输队列超时则指向驱动或硬件兼容性问题。考虑到CentOS 7.9的内核较旧(3.10),需要特别注意兼容性方案。 在准备解决方案时,需要特别注意: 1) 对于gsd-xsettings问题,优先检查glibc和gtk3库的版本兼容性,因为GNOME组件的依赖关系复杂 2) 网卡问题要区分虚拟机环境(常见于VMware的vmxnet3驱动)还是物理机 3) 必须提供可逆的操作步骤,避免影响生产环境稳定性 用户可能正在维护关键业务服务器,所以给出的方案要包含详细回滚说明。有趣的是,这两个看似不相关的问题可能有共同诱因——系统更新中断导致的库文件损坏。因此把"修复yum"作为首要步骤很合理。 考虑到用户的技术水平,可以适当深入技术细节,比如解释SIGTRAP在x86架构下的触发机制(0xCC指令陷阱),但最终回复要保持操作步骤的简洁性。网卡部分准备提供完整的ethtool优化参数组合,这是多年运维实践验证过的方案。 最后生成的问题延伸很有必要:用户遇到这类底层问题,往往需要后续性能调优指导,特别是打算升级硬件或迁移到CentOS Stream的情况。添加的引用标识[^1]指向Red Hat知识库,能增强方案可信度。 </think>以下是针对CentOS 7.9系统中 **`gsd-xsettings`进程被SIGTRAP信号终止**及**`ens33网卡传输队列超时`**问题的完整解决方案: --- ### **一、gsd-xsettings进程被SIGTRAP终止的分析与解决** #### 原因分析: 1. **调试断点触发**:`SIGTRAP`通常由调试器触发,可能因`gnome-settings-daemon`组件存在未处理断点或内存越界 2. **库文件冲突**:`gtk3`/`glibc`版本不兼容或损坏(常见于混合安装第三方库) 3. **GNOME扩展冲突**:不兼容的GNOME Shell扩展导致进程崩溃 #### 解决方案: ```bash # 1. 修复软件包依赖 sudo yum clean all sudo rpm --rebuilddb sudo yum update gnome-settings-daemon\* gtk3 glib2 # 2. 重置GNOME配置(保留用户数据) mv ~/.config/dconf/user ~/.config/dconf/user.bak systemctl restart gdm # 3. 禁用问题扩展 gnome-extensions disable # 逐一禁用测试 journalctl -u gdm -f # 实时监控日志 # 4. 核心转储分析(需复现问题) sudo sysctl -w kernel.core_pattern=/tmp/core-%e gdb /usr/libexec/gsd-xsettings /tmp/core-xxx bt full # 查看完整堆栈 ``` > **注意**:若更新后问题依旧,建议降级至稳定版本: > `sudo yum downgrade gnome-settings-daemon-3.28.1-8.el7_7` --- ### **二、ens33网卡传输队列超时错误解决** #### 错误特征: `kernel: ens33: transmit queue 0 timed out` #### 原因分析: 1. **驱动异常**:`vmxnet3`驱动问题(常见于VMware虚拟机) 2. **队列拥塞**:网络突发流量超过网卡处理能力 3. **硬件虚拟化缺陷**:VT-d/IOMMU配置问题 #### 优化方案: ```bash # 1. 调整网卡队列参数 sudo ethtool -G ens33 rx 4096 tx 4096 # 增大缓冲区 sudo ethtool -C ens33 rx-usecs 100 tx-usecs 100 # 调整中断合并 # 2. 更新驱动(VMware环境) sudo yum install open-vm-tools sudo modprobe -r vmxnet3; sudo modprobe vmxnet3 # 3. 内核参数优化 echo "net.core.netdev_budget=6000" | sudo tee -a /etc/sysctl.conf echo "net.core.netdev_max_backlog=100000" | sudo tee -a /etc/sysctl.conf sudo sysctl -p # 4. 禁用TCP分段卸载(TSO) sudo ethtool -K ens33 tso off gso off ``` #### 物理机额外步骤: ```bash # 检查IRQ平衡 sudo systemctl status irqbalance # 手动绑定IRQ(针对多核CPU) cat /proc/interrupts | grep ens33 echo "3" | sudo tee /proc/irq/XX/smp_affinity # XX为中断号 ``` --- ### **三、联合问题排查建议** 1. **内核日志过滤** `journalctl -k --since "2 hours ago" | grep -E "gsd-xsettings|ens33"` 2. **硬件加速检查** ```bash lspci -v | grep -i ethernet -A 5 # 确认网卡型号 glxinfo | grep "OpenGL vendor" # 检查图形加速 ``` 3. **系统健康诊断** ```bash sudo dmesg -T | grep -i error # 内核级错误 sudo smartctl -a /dev/sda # 硬盘健康状态 ``` > **关键提示**: > - 虚拟机环境务必安装`open-vm-tools`替代原生驱动[^1] > - GNOME问题可尝试切换到Xorg会话:`sudo systemctl set-default graphical.target --force` ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值