Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 2021 05:06:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 257829] lldb crashes with asio acceptor::accept
Message-ID:  <bug-257829-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257829

            Bug ID: 257829
           Summary: lldb crashes with asio acceptor::accept
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: ota@j.email.ne.jp

lldb crashes with the following program.
I have FreeBSD 13.0-RELEASE on i386 so far.
I also included gdb101's output for a comparison.

Please note that I run the program 2 times and lldb crashes with 2nd time w=
hen
the port# is already taken by the 1st run.

% cat asio_accept.cpp=20
// c++ -g -std=3Dc++03 -I/usr/local/include asio_accept.cpp -L/usr/local/lib
-lboost_system -lpthread

#include <boost/asio.hpp>

int main()
{
    using boost::asio::ip::tcp;

    boost::asio::io_service io_service;
    tcp::acceptor acceptor( io_service, tcp::endpoint( tcp::v4(), 1111 ) );
    tcp::socket socket( io_service );

    acceptor.accept( socket );
}

% c++ -g -std=3Dc++03 -I/usr/local/include asio_accept.cpp -L/usr/local/lib
-lboost_system -lpthread
% ./a.out &
% lldb ./a.out
(lldb) target create "./a.out"
Current executable set to '/export/home/hiro/a.out' (i386).
(lldb) run
Process 84554 launching
Process 84554 launched: '/export/home/hiro/a.out' (i386)
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior =
to
being destroyed).
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include =
the
crash backtrace.
#0 0x03874b54 PrintStackTrace
/usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13
#1 0x03874f5e
/usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:624:3
#2 0x03872e6e RunSignalHandlers
/usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:67:5
#3 0x0387508c SignalHandler
/usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
#4 0x24a46319 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:303:3
Abort


% gdb101 ./a.out=20
GNU gdb (GDB) 10.1 [GDB v10.1 for FreeBSD]
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i386-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./a.out...
(gdb) run
Starting program: /export/home/hiro/a.out

Program received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:4
4       thr_kill.S: No such file or directory.
(gdb) bt
#0  thr_kill () at thr_kill.S:4
#1  0x20646e1b in __raise (s=3D6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x206f233b in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3  0x2055ddc6 in std::terminate ()
    at /usr/src/contrib/libcxxrt/exception.cc:1495
#4  0x2055e7ce in report_failure (err=3D<optimized out>,
    thrown_exception=3Dthrown_exception@entry=3D0x207bd000)
    at /usr/src/contrib/libcxxrt/exception.cc:719
#5  0x2055e324 in throw_exception (ex=3D0x207bd000)
    at /usr/src/contrib/libcxxrt/exception.cc:778
#6  __cxa_throw (thrown_exception=3D0x207bd044,
    tinfo=3D0x402034 <typeinfo for
boost::wrapexcept<boost::system::system_error>>,
    dest=3D0x40e240
<boost::wrapexcept<boost::system::system_error>::~wrapexcept()>)
    at /usr/src/contrib/libcxxrt/exception.cc:801
#7  0x0040e0c1 in boost::throw_exception<boost::system::system_error> (e=3D=
...)
    at /usr/local/include/boost/throw_exception.hpp:70
#8  0x0040df9c in boost::asio::detail::do_throw_error (err=3D...,
    location=3D0x401ada "bind")
    at /usr/local/include/boost/asio/detail/impl/throw_error.ipp:38
#9  0x0040df08 in boost::asio::detail::throw_error (err=3D...,
    location=3D0x401ada "bind")
    at /usr/local/include/boost/asio/detail/throw_error.hpp:42
--Type <RET> for more, q to quit, c to continue without paging--
#10 0x0040c59a in boost::asio::basic_socket_acceptor<boost::asio::ip::tcp,
boost::asio::executor>::basic_socket_acceptor<boost::asio::io_context> (
    this=3D0xffbfe768, context=3D..., endpoint=3D..., reuse_addr=3Dtrue)
    at /usr/local/include/boost/asio/basic_socket_acceptor.hpp:285
#11 0x0040baac in main () at asio_accept.cpp:10

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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