Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2017 02:46:03 +0100
From:      tech-lists <tech-lists@zyxst.net>
To:        freebsd-ports@freebsd.org
Subject:   Re: slrn from ports segfaults when running
Message-ID:  <20170916014603.GA61637@v007.zyxst.net>
In-Reply-To: <20170916004216.GA62484@rdtc.ru>
References:  <20170915130055.GD20223@v007.zyxst.net> <59BBD0AA.60804@grosbein.net> <20170915135734.GE20223@v007.zyxst.net> <59BBDFE9.4010902@grosbein.net> <20170915145629.GA18434@v007.zyxst.net> <59BC2C0C.1040701@grosbein.net> <20170915232417.GA80190@v007.zyxst.net> <20170916004216.GA62484@rdtc.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 16, 2017 at 07:42:16AM +0700, Eugene Grosbein wrote:
>On Sat, Sep 16, 2017 at 12:24:18AM +0100, tech-lists wrote:
>
>> slrn freezes when the process is attached, so ran bt from gdb:
>
>No, just use "gdb /path//to/slrn /path/to/corefile"
>It should report segmentation fault and you could obtain backtrace.

ah, OK

# gdb ./slrn ./slrn.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by ./slrn'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libslang.so.2...done.
Loaded symbols for /usr/local/lib/libslang.so.2
Reading symbols from /usr/local/lib/libuu.so.3...done.
Loaded symbols for /usr/local/lib/libuu.so.3
Reading symbols from /usr/local/lib/libssl.so.43...done.
Loaded symbols for /usr/local/lib/libssl.so.43
Reading symbols from /usr/local/lib/libcrypto.so.41...done.
Loaded symbols for /usr/local/lib/libcrypto.so.41
Reading symbols from /usr/local/lib/libintl.so.8...done.
Loaded symbols for /usr/local/lib/libintl.so.8
Reading symbols from /lib/libncurses.so.8...Reading symbols from
/usr/lib/debug//lib/libncurses.so.8.debug...done.
done.
Loaded symbols for /lib/libncurses.so.8
Reading symbols from /lib/libc.so.7...Reading symbols from
/usr/lib/debug//lib/libc.so.7.debug...done.
done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /lib/libm.so.5...Reading symbols from
/usr/lib/debug//lib/libm.so.5.debug...done.
done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/lib/i18n/libiconv_std.so.4...Reading symbols
from /usr/lib/debug//usr/lib/i18n/libiconv_std.so.4.debug...done.
done.
Loaded symbols for /usr/lib/i18n/libiconv_std.so.4
Reading symbols from /usr/lib/i18n/libmapper_serial.so.4...Reading
symbols from
/usr/lib/debug//usr/lib/i18n/libmapper_serial.so.4.debug...done.
done.
Loaded symbols for /usr/lib/i18n/libmapper_serial.so.4
Reading symbols from /usr/lib/i18n/libmapper_none.so.4...Reading
symbols from
/usr/lib/debug//usr/lib/i18n/libmapper_none.so.4.debug...done.
done.
Loaded symbols for /usr/lib/i18n/libmapper_none.so.4
Reading symbols from /usr/lib/i18n/libmapper_646.so.4...Reading
symbols from
/usr/lib/debug//usr/lib/i18n/libmapper_646.so.4.debug...done.
done.
Loaded symbols for /usr/lib/i18n/libmapper_646.so.4
Reading symbols from /libexec/ld-elf.so.1...Reading symbols from
/usr/lib/debug//libexec/ld-elf.so.1.debug...done.
done.
Loaded symbols for /libexec/ld-elf.so.1
#0  _citrus_NONE_stdenc_mbtocs (ce=<value optimized out>, 
    csid=<value optimized out>, idx=0x7fffffffe870, s=0x7fffffffe868, 
        n=<value optimized out>, ps=0x0, nresult=0x7fffffffe860,
hooks=0x0)
    at /storage/usr/src/lib/libc/iconv/citrus_none.c:96
    96*idx = (_index_t)(unsigned char)*(*s)++;
    (gdb) 

backtrace:

(gdb) bt
#0  _citrus_NONE_stdenc_mbtocs (ce=<value optimized out>, 
    csid=<value optimized out>, idx=0x7fffffffe870, s=0x7fffffffe868, 
        n=<value optimized out>, ps=0x0, nresult=0x7fffffffe860,
hooks=0x0)
    at /storage/usr/src/lib/libc/iconv/citrus_none.c:96
    #1  0x00000008028014b7 in _citrus_iconv_std_iconv_convert (
        cv=<value optimized out>, in=<value optimized out>, 
	    inbytes=0x7fffffffe940, out=<value optimized out>, 
	        outbytes=<value optimized out>, flags=<value optimized
out>, 
    invalids=<value optimized out>) at citrus_stdenc.h:76
    #2  0x0000000801aad7d4 in __bsd_iconv (handle=<value optimized
out>, 
    in=<value optimized out>, szin=<value optimized out>, 
        out=<value optimized out>, szout=<value optimized out>)
	    at citrus_iconv.h:60
	    #3  0x0000000000421a2f in iconv_convert_string
(cd=0x80246c530, 
    str=0x802802000 <Address 0x802802000 out of bounds>, len=61,
test=0, 
    outstrp=0x7fffffffe9e0)
        at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/charset.c:142
#4  0x000000000042219f in slrn_convert_article (a=0x8025245a0, 
    to_charset=0x80246c110 "US-ASCII", from_charset=0x80246c4e0
"ISO-8859-1")
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/charset.c:421
#5  0x0000000000435f4d in slrn_mime_process_article (a=0x8025245a0)
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/mime.c:1242
#6  0x0000000000409727 in select_header (h=0x802422180, kill_refs=1)
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/art.c:2522
#7  0x0000000000408449 in select_article (check_mime=0)
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/art.c:5039
#8  0x0000000000408589 in slrn_art_linedn_n (n=1)
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/art.c:1414
#9  0x000000000040f5b2 in art_linedn ()
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/art.c:1437
#10 0x0000000000456841 in slrn_do_keymap_key (map=0x802559120)
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/slrn.c:1644
#11 0x0000000000456b62 in main (argc=1, argv=0x7fffffffebc0)
    at
/ports-build/storage/usr/ports/news/slrn/work/slrn-1.0.3/src/slrn.c:1750
Current language:  auto; currently minimal
(gdb)

It seems to segfault when it encounters some messages but not others,
and *appears* to be more likely to happen if there are more posts in a
newsgroup. I was able to select and read a newsgroup with only two
posts, exit that group, select another one with 50 or so posts, read
one post and then it segfaults. Selecting a group with say 200 posts
and it segfaults on the first post.

thanks,
-- 
J.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170916014603.GA61637>