wwivbbs/wwiv

wwivconfig crashes with SIGSEGV while converting conferences

Closed this issue · 4 comments

running wwivconfig against my mongrel wwiv 5.3 setup resulted in a SIGSEGV.

backtrace is as follows:

Program received signal SIGSEGV, Segmentation fault.
             __memmove_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:383
383	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
(gdb) bt
#0  __memmove_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:383
#1  0x00007ffff7e7eb28 in std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007ffff7e70824 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00005555555c1735 in wwiv::core::Logger::operator<< <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (
    this=0x7fffffff9000, msg="")
    at /home/xenos/wwv/github/wwiv-stock/core/log.h:195
#4  0x0000555555794f43 in wwiv::sdk::UpgradeConferences (config=..., subs=..., 
    dirs=...) at /home/xenos/wwv/github/wwiv-stock/sdk/conf/conf.cpp:305
#5  0x00005555555b4e71 in wwiv::wwivconfig::convert::convert_to_v4 (
    window=0x5555559f5d40, config=...)
    at /home/xenos/wwv/github/wwiv-stock/wwivconfig/convert.cpp:428
#6  0x00005555555b621f in wwiv::wwivconfig::convert::ensure_latest_5x_config (
    window=0x5555559f5d40, config=...)
    at /home/xenos/wwv/github/wwiv-stock/wwivconfig/convert.cpp:553
#7  0x00005555555b75a4 in wwiv::wwivconfig::convert::do_wwiv_ugprades (
    window=0x5555559f5d40, bbsdir="/home/xenos/alcove.backup/")
    at /home/xenos/wwv/github/wwiv-stock/wwivconfig/convert.cpp:627
#8  0x00005555556669b9 in WWIVConfigApplication::Main (this=0x7fffffffd9b7, 
    argc=1, argv=0x7fffffffdc88)
    at /home/xenos/wwv/github/wwiv-stock/wwivconfig/wwivconfig.cpp:399
#9  0x00005555556643e6 in main (argc=1, argv=0x7fffffffdc88)
    at /home/xenos/wwv/github/wwiv-stock/wwivconfig/wwivconfig.cpp:149

I figured out what went wrong. My dirs.cnf remnant from 5.1 wasn't properly upgraded.
Here's the dirs.cnf that caused the segfault. Solution was to rm the mangled dirs.cnf file before running wwivconfig.
dirs.cnf.txt

This might be an issue that we wontfix since it may be an outlier.

wwiv commented

Thanks for the testcase, I'll see if I can write a unit test that reproduces the crash, then fix it.

not sure if you'll need the dirs.dat file, but here are the dirs.cnf and dirs.dat file in a zip.
dirs.zip

wwiv commented

Fixed in 8977e53