HAS的日记 - 2025年12月
type: channel
link: http://haser.top/index.php/2025/12/
description: 吃肉吃肉！
items: zlmediakit 在 aarch64 编译 遇到 Segmentation fault（核心已转储）

zlmediakit 在 aarch64 编译 遇到 Segmentation fault（核心已转储）
type: item
date: 2025-12-23T13:42:00+08:00
description: > 系统版本：openEuler 24.03 (LTS-SP1) aarch64 > 前提 在安装流程编译完zlmediakit 之后运行 .\MediaServer.exe -d 提示 Segmentation fault（核心已转储） 提示 Segmentation fault（核心已转储） 后面开始排查： #### 1. 开启 core dump ulimit -c unlimited #### 2. 查看 core 生成方式 cat /proc/sys/kernel/core_pattern #### 3. 前台运行看日志 ./MediaServer #### 4. 若有 core 文件 gdb ./MediaServer core #### 5. 若用 systemd-coredump coredumpctl list coredumpctl debug ./MediaServer ###交给模型分析 ```shell [root@service3 Debug]# coredumpctl debug 2601134 PID: 2601134 (MediaServer) UID: 0 (root) GID: 0 (root) Signal: 11 (SEGV) Timestamp: Tue 2025-12-23 09:17:45 CST (2min 34s ago) Command Line: ./MediaServer Executable: /www/spy/ZLMediaKit/release/linux/Debug/MediaServer Control Group: /user.slice/user-0.slice/session-18053.scope Unit: session-18053.scope Slice: user-0.slice Session: 18053 Owner UID: 0 (root) Boot ID: 61b92c204f12426c963ee1299b6544e1 Machine ID: 718781f979de4f48b1806e83960ef003 Hostname: service3 Storage: /var/lib/systemd/coredump/core.MediaServer.0.61b92c204f12426c963ee1299b6544e1.2601134.1766452665000000.lz4 (present) Size on Disk: 290.0K Message: Process 2601134 (MediaServer) of user 0 dumped core. GNU gdb (GDB) openEuler 14.1-3.oe2403sp1 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-openEuler-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /www/spy/ZLMediaKit/release/linux/Debug/MediaServer... [New LWP 2601134] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib64/libthread_db.so.1". Core was generated by `./MediaSe…