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

[leafnode-list] Re: Fetchnews - glibc detected *** double free or corruption - aborted

Stroller <linux.luser@xxxxxxxxxxxxx> writes:

>> 2. Install the most recent valgrind you can find and then run:
>>    sudo valgrind --leak-check=yes --show-reachable=yes \
>>                  --num-callers=16 --quiet fetchnews -vvv 2>&1 \
>>    tee fetchnews.log
> This doesn't seem to have created a "fetchnews.log" file as I  
> expected,

It wasn't my day that day (sorry!), I forgot the | before the tee, the
correct command line would have been:

    sudo valgrind --leak-check=yes --show-reachable=yes \
                  --num-callers=16 --quiet fetchnews -vvv 2>&1 \
    | tee fetchnews.log

> so below's a copy & paste from the terminal window. It's 227 lines, so
> I figure that's within 15% of "fine for the list":
> # valgrind --leak-check=yes --show-reachable=yes  --num-callers=16 -- 
> quiet fetchnews -vvv 2>&1 tee fetchnews.log
> fetchnews mode: get articles, get headers, get bodies, post articles
> ==22628== Invalid write of size 1
> ==22628==    at 0x805529C: getabufferedline (getaline.c:102)
> ==22628==    by 0x805079A: rereadactive (activutil.c:557)
> ==22628==    by 0x804E095: main (fetchnews.c:2141)
> ==22628==  Address 0x4249EBC is 0 bytes after a block of size 260  
> alloc'd
> ==22628==    at 0x401A511: malloc (in /usr/lib/valgrind/x86-linux/ 
> vgpreload_memcheck.so)
> ==22628==    by 0x8055274: getabufferedline (getaline.c:95)
> ==22628==    by 0x805079A: rereadactive (activutil.c:557)
> ==22628==    by 0x804E095: main (fetchnews.c:2141)

This looks like an off-by-one error on long lines in the active file,
where fetchnews will place a '\0' character in the byte immediately
beyond the allocated buffer when encountering a long line.

Please update to the latest 20060706a snapshot and see if this fixes the
crashes (DO NOT use _MALLOC_CHECK=0, but either leave this unset or use
_MALLOC_CHECK=2, or even better, run under valgrind supervision as
suggested above.)

If the crash persists, can you copy your /var/lib/news/active and
local.groups files, gzip them and mail the .gz files to me off-list?

> I've been getting the "Warning: skipping group "alt.", invalid name  
> (NULL component)"

It looks like a badly maintained upstream news server at any rate.  A
group name does not end in a dot, and they aren't supposed to list group
names that are prefixes of other groups names (i. e. when there are
subgroups), for instance:

BAD:     alt       and  alt.something   (alt is a prefix of alt.something)

GOOD:    alt.misc  and  alt.something

> messages for some time, both on this machine & it's predecessor and I
> always figured it was something to do with my ISP's server. Is this
> anything to worry about?

This is not overly serious, unless you're paying per time or volume,
since refetching the active file takes several hundred kB and can thus
take a few minutes over modems or ISDN.  WRT the refetching the whole
active file, I'm not sure. If it persists with the new version AND if it
is not fixed by running "fetchnews -f"), then we'll need to debug
this. The NULL component shouldn't be causing this though.

But we should still find out if it's a configuration issue or just a
consequence of the bug above.

Matthias Andree
leafnode-list mailing list