Fri, 17 Mar 2006

:: LDAP的内存泄露

LDAP的内存泄露
故事:
友人在折腾 ,使用Python 的 组件来开发时应用常常死亡, 怀疑Python的内存泄露,但是找不到证据……
结局:
找到高人 运用内存分析工具:
/usr/ports/devel/valgrind> cat pkg-descr
Valgrind is a system for debugging and profiling un*x programs. With the tools
that come with Valgrind, you can automatically detect many memory management
and threading bugs, avoiding hours of frustrating bug-hunting, making your
programs more stable. You can also perform detailed profiling, to speed up and
reduce memory use of your programs.

The Valgrind distribution includes five tools: two memory error detectors, a
thread error detector, a cache profiler and a heap profiler. Several other
tools have been built with Valgrind.

Valgrind was ported to FreeBSD by Doug Rabson (http://www.rabson.org/).

WWW: http://valgrind.kde.org/

才发现是本身的问题: 每次RPC 的远程连接结束后,会泄露 32字节的内存! 晕哪!怪不得叫 LDAP, 因为很轻的连接情况下的确很不容易发觉,在当前内存动不动就上Gb的情况下…………

Python的虚拟机是非常坚固的!不要轻易怀疑吧……


动力源自::
[Thu Mar 30 00:02:12 2006] is URL 曰::
呵呵,为啥国人就不喜欢在BLog上评论喃。前两天和Ruby斗争结果也一样,压根就和VM没有什么关系。关心一下用的是什么版本的OpenLDAP啊,Leak是在Client还是在Server?

BTW: txt2tag这个东西,看起来不错啊。不过感觉生成的页面有点粗啊,特别是在IE下面看.
[Thu Mar 30 12:19:30 2006] Zoom.Quiet URL 曰::
中国本来就是个不善于公开表达的民族,

测试的当然是最新版本的LDAP,FreeBSD 中,通过Python 查询Server

我作的东西,现在都尽力不支持IE这种恐龙了…………嗬嗬

::名:Name
::邮:Mail
::址:URL.
注:Comment::

The Magic Word(防Spamer问答)::
Pythonic!What is the 1st word in this sentence?回答本句第一个单词是什么?



::Fri, 17 Mar 2006 09:00 GMT
[PyBlosxom]1.4.3 01/10/2008 | [Python] | [FreeBSD] | [Apache]
一切内容使用
Creative Commons License
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License .