LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1150|回复: 6

小女子来求救啦!

[复制链接]
发表于 2008-1-8 14:47:43 | 显示全部楼层 |阅读模式
有个bug找不到思路啦!大家帮忙出出主意吧,

bootloader: redboot
OS:linux2.6.14
arch: intel Xscale
processor: IXP2350
bug: random Segmentation fault[FAILED]

启动过程中mount文件系统时有时会报Segmentation fault[FAILED],用ssh命令有时也会发生Segmentation fault[FAILED] ,错误随机发生,没有规律。

哪几各方面的问题会造成这种现象呢?内存泄露,栈或堆越界?或是其他什么,该从哪儿入手查起呢?
 楼主| 发表于 2008-1-9 14:37:05 | 显示全部楼层
大家推荐几个好用的内存泄露的侦测工具吧!(可以侦测内核自身的内存泄露的,不要侦测用户程序的)。
回复 支持 反对

使用道具 举报

发表于 2008-1-9 22:22:42 | 显示全部楼层
Valgrind
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-1-10 11:38:22 | 显示全部楼层
我查了,这个是侦测用户空间应用程序的,而非内核自己代码中的漏洞和越界问题。
我想它应该是linux的一个package,可以放到linux中,系统启动后,执行此工具即可自行检查正在运行的系统中的问题。
回复 支持 反对

使用道具 举报

发表于 2008-1-12 09:31:44 | 显示全部楼层
I'm not familiar with the kernel development myself, but I searched something for you, hope they are helpful.

Detecting kernel memory leaks
http://lwn.net/Articles/187979/

Available tools for Linux
http://iven.home.cern.ch/iven/linux_debug/linux_crash/tools.html
It refers to memory leak detection at the bottom of the page.

A patch of kernel memory leak detector
http://lkml.org/lkml/2006/8/12/160
Read on this thread for more information.
回复 支持 反对

使用道具 举报

发表于 2008-1-12 21:26:48 | 显示全部楼层
Kernel memory leak detector 0.7From:   Catalin Marinas <catalin.marinas@gmail.com>
To:   linux-kernel@vger.kernel.org
Subject:   [PATCH 2.6.17-rc6 0/9] Kernel memory leak detector 0.7
Date:   Sun, 11 Jun 2006 12:18:15 +0100


This is a new version (0.7) of the kernel memory leak detector. See
the Documentation/kmemleak.txt file for a more detailed
description. The patches are downloadable from (the bundled patch or
the series):

http://homepage.ntlworld.com/cmarinas/kmemleak/patch-2.6....
http://homepage.ntlworld.com/cmarinas/kmemleak/patches-km...

What's new in this version:

- different configuration options added for tweaking kmemleak
- reduced the length of time running with interrupts disabled (the
  interrupts are now only disabled for individual memory block
  scanning rather than for the whole memory)
- fixed bug in the memleak_seq_* functions (pointer structure accessed
  after freeing)
- more false positives ignored

To do:

- more testing
- more investigation into the task stacks scanning
- NUMA support
- (support for ioremap tracking)

Many thanks to Michal Piotrowski for stress-testing kmemleak and
reporting various issues.

--
Catalin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-1-14 13:47:37 | 显示全部楼层
thanks for your reply, I see.
Many things need to learn, I will try it.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表