I've checked that the closedir(dirp) is placed after the opendir line.
Seems that I ran into a different problem.

> I ran into this when i backported the latest qldap patch into my 
> development version for testing.  I was thinking the patch just 
> screwed up when patching a slighly modified version of qldap, but 
> considering your problem it may be the latest patch has an error.
>
> The problem was in quota_calcsize() in maildir++.c - the closedir() 
> went into the wrong place.  The symptom was that when i changed a 
> user's quota, qmail-local would crash when re-creating the 
> maildirdize file.  Check maildir++.c and if you see a closedir(dirp) 
> near the top of the quota_calcsize() function (it'll be before the 
> opendir() if you've encountered the same problem i did), remove it 
> and put a closedir(dirp) just before the return().  Sorry, no patch 
> but if you're encountering the same problem it's a quick fix.
>
>
>       -neil


> On March 12, 2003 02:48 am, Stephen Fung wrote:
>> Hi,
>>
>> I tried the qmail-ldap-20030301 patch on my Solaris 8 but run into
>> problem when the user quota exceed. The error message in the log
>> shows qmail-local is crashed. I can find the core inside the user's
>> home directory. When using gdb to debug, it shows that qmail-local
>> was crashed at 'closedir()' function:
>> ......
>> Program terminated with signal 11, Segmentation Fault.
>> Reading symbols from /usr/lib/libsocket.so.1...(no debugging
>> symbols found)...
>> done.
>> Loaded symbols for /usr/lib/libsocket.so.1
>> Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols
>> found)... done.
>> Loaded symbols for /usr/lib/libnsl.so.1
>> Reading symbols from /usr/lib/libc.so.1...(no debugging symbols
>> found)...done.
>> Loaded symbols for /usr/lib/libc.so.1
>> Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols
>> found)...done.
>> Loaded symbols for /usr/lib/libdl.so.1
>> Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols
>> found)...done.
>> Loaded symbols for /usr/lib/libmp.so.2
>> Reading symbols from
>> /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1... (no debugging
>> symbols found)...done.
>> Loaded symbols for /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
>> #0  0xff1b6cac in closedir () from /usr/lib/libc.so.1
>>
>> The maildirsize file will be removed after qmail-local crashed.
>>
>> Any idea?
>>
>>
>> Regards,
>> Stephen Fung



Reply via email to