Now I meet a strange problem.<br><br>After the first sync init, it enters to the realtime replication state. I deployed them on 3 machines, and have run near half month. Suddenly one day, a host, I don&#39;t know what&#39;s wrong, I found fs_mirror get the empty
<br>records from its mirrord agent. In normal conditions, these records should<br>be:<br>&quot;CREATE:/var/www/html&quot;<br>&quot;FWRITE:/var/www/html/index.php&quot;<br>&quot;DELETE:/var/www/html/temp&quot;<br>&quot;MOVE:(&#39;/var/www/html/aa&#39;, &#39;/var/www/html/bb&#39;)&quot;
<br>...<br>But should be no empty records. This lead to fs_mirror to a dead infinite loop.<br><br>I restart the fs_mirror from the broken point, but the problem remains, after DEBUG I found the problem occurs at the same serial number every time(I use Berkeley DB as the log record(wmLog), and serial numbers are the keys), so I suspect that the problem is BDB, but I don&#39;t know how to test
<br>and locate to the right place.<br><br>I tried to open the orignal db file in Python:<br>&gt;&gt;&gt; import bsddb<br>&gt;&gt;&gt; x = bsddb.btopen(&quot;/var/mirrord/wmlog&quot;<br>&gt;&gt;&gt; len(x)<br>623748<br>&gt;&gt;&gt; x[&quot;6854&quot;]
<br>Traceback (most recent call last):<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/__init__.py&quot;, line 223, in __getitem__<br>&nbsp;&nbsp;&nbsp; return _DeadlockWrap(lambda: 
self.db[key])&nbsp; # self.db[key]<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/dbutils.py&quot;, line 62, in DeadlockWrap<br>&nbsp;&nbsp;&nbsp; return function(*_args, **_kwargs)<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/__init__.py&quot;, line 223, in &lt;lambda&gt;
<br>&nbsp;&nbsp;&nbsp; return _DeadlockWrap(lambda: self.db[key])&nbsp; # self.db[key]<br>KeyError: &#39;6854&#39;<br>&gt;&gt;&gt; x[str(6854)]<br>Traceback (most recent call last):<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/__init__.py&quot;, line 223, in __getitem__<br>&nbsp;&nbsp;&nbsp; return _DeadlockWrap(lambda: self.db[key])&nbsp; # self.db[key]<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/dbutils.py&quot;, line 62, in DeadlockWrap
<br>&nbsp;&nbsp;&nbsp; return function(*_args, **_kwargs)<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/__init__.py&quot;, line 223, in &lt;lambda&gt;<br>&nbsp;&nbsp;&nbsp; return _DeadlockWrap(lambda: self.db[key])&nbsp; # self.db[key]<br>KeyError: &#39;6854&#39;
<br>&gt;&gt;&gt; x.first()<br>Traceback (most recent call last):<br>&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/__init__.py&quot;, line 278, in first<br>&nbsp;&nbsp;&nbsp; rv = _DeadlockWrap(
self.dbc.first)<br>&nbsp; File &quot;/usr/lib/python2.5/bsddb/dbutils.py&quot;, line 62, in DeadlockWrap<br>&nbsp;&nbsp;&nbsp; return function(*_args, **_kwargs)<br>_bsddb.DBNotFoundError: (-30990, &#39;DB_NOTFOUND: No matching key/data pair found
<br><br>Even I have stopped the mirrord daemon, the errors remain.<br><br>Then I tried to copy and move out the database file, and open the new dbfile:<br>&gt;&gt;&gt; import bsddb<br>&gt;&gt;&gt; x = bsddb.btopen(&quot;/tmp/wmlog&quot;)
<br>&gt;&gt;&gt; len(x)<br>0 <br>the length is 0, and getitem get the same errors above.<br><br>Why this occurs when I copy the db file? Especially the len() is 0?!<br><br>I can only restart the mirrord, to rebuild the BDB data file, and so far,
<br>this problem does not occurs again.<br><br>I don&#39;t know why there is a occasional problem like this? Is there any one be familiar with BDB can give me several advices?<br><br>Thanks.<br><br>-- <br><div id="mb_0">------------------------------------------ 
<br>My Projects: <br> <a href="http://sourceforge.net/projects/crablfs" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://sourceforge.net/projects/crablfs</a><br><a href="http://crablfs.sourceforge.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://crablfs.sourceforge.net/</a><br><a href="http://crablfs.sourceforge.net/#ru_data_man" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://crablfs.sourceforge.net/#ru_data_man
</a> <br><a href="http://crablfs.sourceforge.net/tree.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://crablfs.sourceforge.net/tree.html</a><br><a href="http://cralbfs.sourceforge.net/sysadm_zh_CN.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://cralbfs.sourceforge.net/sysadm_zh_CN.html</a><br>
 My Blog:<br><a href="http://chowroc.blogspot.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://chowroc.blogspot.com/</a><br><a href="http://hi.baidu.com/chowroc_z/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://hi.baidu.com/chowroc_z/</a><br>Looking for a space and platform to exert my originalities (for my projects)... 
</div><br>