Problem w/ 2.2.4 and unixhierarchysep: yes

Rob Siemborski rjs3 at andrew.cmu.edu
Mon May 24 09:57:45 EDT 2004


On Mon, 24 May 2004, Simon Matter wrote:

>>> The backtrace is from RedHat 7.2 running ext3. Nothing special here.
>>> Switching back to 2.2.3 made it work again and I also don't see any
>>> corruption.
>>
>> Are the backtraces and straces consistent in their content?
>
> Here is an ltrace in case this helps:
[snip]

Ok, the problem seems to be that we're deleteing elements of the hash 
table in the middle of a call to hash_enumerate.

This isn't terribly good, but atleast I understand why its intermittant 
and why Ken and I probably can't reproduce it (we're lucky).

Can one of you try this patch to hash.c?

Index: hash.c
===================================================================
RCS file: /afs/andrew.cmu.edu/system/cvs/src/cyrus/lib/hash.c,v
retrieving revision 1.11
diff -u -r1.11 hash.c
--- hash.c      22 Oct 2003 18:50:12 -0000      1.11
+++ hash.c      24 May 2004 13:57:06 -0000
@@ -300,7 +300,7 @@
                     void *rock)
  {
        unsigned i;
-      bucket *temp;
+      bucket *temp, *temp_next;

        for (i=0;i<table->size; i++)
        {
@@ -308,8 +308,9 @@
              {
                    for (temp = (table->table)[i];
                          NULL != temp;
-                        temp = temp -> next)
+                        temp = temp_next)
                    {
+                       temp_next = temp->next;
                          func(temp -> key, temp->data, rock);
                    }
              }


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list