[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Segmentation fault in texpire 20050412



"John Carlyle-Clarke" <john.cc@xxxxxxxxxxxxxxxx> writes:

> I've been having some problems recently with one particular server, 
> where old posts keep getting reloaded as new posts by leafnode.  I've 
> also been seeing messages about damaged groupinfo file, which a 
> fetchnews -f doesn't cure.  I even tried deleting the file in 
> leaf.node for the server in quesion, but no joy.
>
> Since I was running an old Alpha version, I decided to update to the 
> current one (20050412).  Having done so, texpire stops with a 
> segmentation fault.  I'm not sure if this is because of the state of 
> my spool or not.
>
> Here is a stack trace (I hope I did this right)...
>
> #0  0x804ab89 in doexpiregroup (g=0x0, n=0x8071780 "", expire=
> 1112886914) at texpire.c:773
> #1  0x804afdd in expiregroups () at texpire.c:918
> #2  0x804b51d in main (argc=1, argv=0xbffff6f4) at texpire.c:1101
>
> Does this help pin dowm the problem, or do I need to provide more 
> information?

Looks right, at least this is sufficient to find the segfault bug, and
it can be caused by a corrupt groupinfo file; although I cannot provoke
the bug at the moment, it is there. Is your spool at the "root" of a
mount point, for instance, for a separate news partition? Local groups?

What isn't clear to me is if upgrading fixed your fetchnews -f/groupinfo
problem; if it didn't, please let me know the details (log messages in
particular), there may be yet another bug to fix. Are there strange
files, symlinks, something else in the spool?  Does the problem persist
after an fsck run (you may need to reboot into single-user mode to
safely run fsck, depending on your partitioning)?


This patch should suffice to fix your texpire segfault problem, to
apply, save the BODY of this mail to /tmp/texpire.patch, then cd to the
leafnode source directory and apply with "patch -p1
</tmp/texpire.patch", run make and make install.

--- old-leafnode-2-darcs/texpire.c	2005-03-24 13:15:06.000000000 +0100
+++ new-leafnode-2-darcs/texpire.c	2005-04-22 00:11:35.000000000 +0200
@@ -770,7 +770,8 @@
 
     /* skip empty groups */
     if (!chdirgroup(n, FALSE)) {
-	g->first = g->last + 1;
+	if (g)
+	    g->first = g->last + 1;
 	return;
     }
 

-- 
Matthias Andree
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/