红联Linux门户
Linux帮助

fc15下(dump core)段错误(吐核)。怎么办?

发布时间:2011-05-19 10:34:36来源:红联作者:oohyoou
在 ubuntu cnkilior提醒:
谷歌ulimit得知:
#在Linux下写程序的时候,如果程序比较大,经常会遇到“段错误”(segmentation fault)这样的问题,这主要就是由于Linux系统初始的堆栈大小(stack size)太小的缘故,一般为10M。我一般把stack size设置成256M,这样就没有段错误了!命令为:
ulimit -s 262140
如果要系统自动记住这个配置,就编辑/etc/profile文件,在 “ulimit -S -c 0 > /dev/null 2>&1”行下,添加“ulimit -s 262140”,保存重启系统就可以了! #
{:3_114:} ulimit用法在论坛里有几篇文章,搜索即得。
而在fc下可以修改
/etc/security/limits.conf文件。
*
但仍我的iceplayer 依旧无法成功。
{:3_116:}
文章评论

共有 7 条评论

  1. oohyoou 于 2011-05-30 21:46:24发表:

    7# alick
    bug仍未解决。

  2. alick 于 2011-05-22 00:09:17发表:

    这问题应该报告给开发者。估计代码中有bug

  3. oohyoou 于 2011-05-21 19:01:51发表:

    5# breakbrain

    [hl@localhost osd-lyrics-read-only]$ ldd /usr/bin/iceplayer
    linux-gate.so.1 => (0x00ca3000)
    libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x41947000)
    libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x41df1000)
    libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x41682000)
    libgio-2.0.so.0 => /lib/libgio-2.0.so.0 (0x410e9000)
    libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x41581000)
    libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x41573000)
    libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x4137a000)
    libpng12.so.0 => /usr/lib/libpng12.so.0 (0x41234000)
    libm.so.6 => /lib/libm.so.6 (0x4fd4a000)
    libcairo.so.2 => /usr/lib/libcairo.so.2 (0x415c3000)
    libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x416a3000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x412de000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x4139f000)
    libgobject-2.0.so.0 => /lib/libgobject-2.0.so.0 (0x4108c000)
    libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0x410dc000)
    libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x41072000)
    librt.so.1 => /lib/librt.so.1 (0x4fd77000)
    libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x4fdda000)
    libgstreamer-0.10.so.0 => /usr/lib/libgstreamer-0.10.so.0 (0x42cd3000)
    libxml2.so.2 => /usr/lib/libxml2.so.2 (0x41774000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x4ff32000)
    libnotify.so.1 => /usr/lib/libnotify.so.1 (0x4102e000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x4fd26000)
    libc.so.6 => /lib/libc.so.6 (0x4fb94000)
    libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x415bc000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0x41079000)
    libXrender.so.1 => /usr/lib/libXrender.so.1 (0x413e6000)
    libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x4146f000)
    libXi.so.6 => /usr/lib/libXi.so.6 (0x413d5000)
    libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x41564000)
    libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x415b0000)
    libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x4156e000)
    libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x4167d000)
    libdl.so.2 => /lib/libdl.so.2 (0x4fd43000)
    libresolv.so.2 => /lib/libresolv.so.2 (0x4fef5000)
    libz.so.1 => /lib/libz.so.1 (0x4fda1000)
    libselinux.so.1 => /lib/libselinux.so.1 (0x4fdb9000)
    /lib/ld-linux.so.2 (0x4fb70000)
    libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x413f2000)
    libexpat.so.1 => /lib/libexpat.so.1 (0x41269000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x4ff12000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4fd82000)
    libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2 (0x4174d000)
    libdbus-1.so.3 => /lib/libdbus-1.so.3 (0x41293000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x4106d000)
    链接应该没问题吧。。都找了。

  4. breakbrain 于 2011-05-21 17:58:24发表:

    # ldd iceplayer

    有什么?

  5. oohyoou 于 2011-05-19 14:05:17发表:

    2# alick


    不好意思。。。少打了好多内容:
    段错误(吐核)
    以下是运行与错误提示过程:
    [hl@localhost ~]$ iceplayer
    Welcome! Version=:4.04-20110508
    Debug:init one-instance
    Debug:init gtk & gst
    Debug:初始化环境
    Debug:初始化配置
    Debug:初始化皮肤参数
    Debug:搜索home目录皮肤
    Debug:/home/hl/.iceplayer/skin/mac_slax/
    Debug:初始化home目录皮肤失败
    Debug:搜索usr目录皮肤
    Debug:/usr/share/iceplayer/skin/mac_slax/
    Debug:初始化usr目录皮肤成功
    Debug:初始化界面
    Debug:建立主要窗体
    Debug:初始化notify
    Debug:初始化歌词
    Debug:应用配置
    Debug:读取多播放列表
    Debug:初始化播放列表
    Debug:初始化播放列表success!
    Debug:初始化迷你模式
    Debug:初始化 mini
    Debug:应用播放类配置
    Debug:初始化 some configures
    Debug:初始化全局快捷键
    Debug:初始化均衡器
    Debug:初始化进度条
    Debug:初始化完成
    Debug:开启即播放
    Debug:/home/hl/音乐/单曲 - 爱情日记 (正式版)/于烈 - 爱情日记 (DJ版).mp3
    Debug:自动检查更新。。。
    Debug:歌词
    Error:不匹配任何本地歌词
    Debug:是否匹配设定的黑名单?
    段错误(吐核)

    下面是调试结果:
    [hl@localhost iceplayer]$ gdb -c ~/桌面/core.22448 /usr/bin/iceplayer
    GNU gdb (GDB) Fedora (7.2.90.20110429-36.fc15)
    Copyright (C) 2011 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    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 "i686-redhat-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /usr/bin/iceplayer...done.
    BFD: Warning: /home/hl/桌面/core.22448 is truncated: expected core file size >= 550993920, found: 52645888.
    [New LWP 22448]
    [New LWP 22452]
    [New LWP 22453]
    Cannot access memory at address 0xaff973e0
    (gdb) where
    #0 0x4fbf65d7 in ?? ()
    Cannot access memory at address 0xbf83bce4
    (gdb) set lib-search-path
    No symbol "lib" in current context.
    (gdb) set solib-search-path
    Cannot access memory at address 0xaff973e0
    (gdb) where
    #0 0x4fbf65d7 in ?? ()
    Cannot access memory at address 0xbf83bce4
    (gdb)

    #0 0x4fbf65d7 in ?? ()这一句如何加载库,显示??的内容(6)m:b

  6. oohyoou 于 2011-05-19 14:02:40发表:

    不好意思。。。少打了好多内容:
    段错误(吐核)
    以下是运行与错误提示过程:
    [hl@localhost ~]$ iceplayer
    Welcome! Version=:4.04-20110508
    Debug:init one-instance
    Debug:init gtk & gst
    Debug:初始化环境
    Debug:初始化配置
    Debug:初始化皮肤参数
    Debug:搜索home目录皮肤
    Debug:/home/hl/.iceplayer/skin/mac_slax/
    Debug:初始化home目录皮肤失败
    Debug:搜索usr目录皮肤
    Debug:/usr/share/iceplayer/skin/mac_slax/
    Debug:初始化usr目录皮肤成功
    Debug:初始化界面
    Debug:建立主要窗体
    Debug:初始化notify
    Debug:初始化歌词
    Debug:应用配置
    Debug:读取多播放列表
    Debug:初始化播放列表
    Debug:初始化播放列表success!
    Debug:初始化迷你模式
    Debug:初始化 mini
    Debug:应用播放类配置
    Debug:初始化 some configures
    Debug:初始化全局快捷键
    Debug:初始化均衡器
    Debug:初始化进度条
    Debug:初始化完成
    Debug:开启即播放
    Debug:/home/hl/音乐/单曲 - 爱情日记 (正式版)/于烈 - 爱情日记 (DJ版).mp3
    Debug:自动检查更新。。。
    Debug:歌词
    Error:不匹配任何本地歌词
    Debug:是否匹配设定的黑名单?
    段错误(吐核)

    下面是调试结果:
    [hl@localhost iceplayer]$ gdb -c ~/桌面/core.22448 /usr/bin/iceplayer
    GNU gdb (GDB) Fedora (7.2.90.20110429-36.fc15)
    Copyright (C) 2011 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    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 "i686-redhat-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /usr/bin/iceplayer...done.
    BFD: Warning: /home/hl/桌面/core.22448 is truncated: expected core file size >= 550993920, found: 52645888.
    [New LWP 22448]
    [New LWP 22452]
    [New LWP 22453]
    Cannot access memory at address 0xaff973e0
    (gdb) where
    #0 0x4fbf65d7 in ?? ()
    Cannot access memory at address 0xbf83bce4
    (gdb) set lib-search-path
    No symbol "lib" in current context.
    (gdb) set solib-search-path
    Cannot access memory at address 0xaff973e0
    (gdb) where
    #0 0x4fbf65d7 in ?? ()
    Cannot access memory at address 0xbf83bce4
    (gdb)

    #0 0x4fbf65d7 in ?? ()这一句如何加载库,显示??的内容:0)1

  7. alick 于 2011-05-19 12:50:32发表:

    楼主组织下思路和语言,iceplayer究竟出什么问题了?