Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2018 21:06:00 +0400
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   lldb 6.0.0 segfaults on opening a core file
Message-ID:  <20180122170558.GA74490@kloomba>

next in thread | raw e-mail | index | archive | help

--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

Running on -CURRENT @ Jan 20 with llvm 6.0.0, I have the following issue op=
ening
a core file with lldb:

$ lldb /usr/local/bin/python2.7 -c /tmp/python2.7_90218_0.core=20
(lldb) target create "/usr/local/bin/python2.7" --core "/tmp/python2.7_9021=
8_0.core"
Assertion failed: (template_counter >=3D 0), function ConsumeTemplateArgs, =
file /usr/src/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPl=
usPlusNameParser.cpp, line 245.

This nothing happens for a couple of minutes and then it dumps core.

Interestingly though, it can open its own core:

%> lldb /usr/bin/lldb -c /tmp/lldb_1129_0.core=20
(lldb) target create "/usr/bin/lldb" --core "/tmp/lldb_1129_0.core"
Core file '/tmp/lldb_1129_0.core' (x86_64) was loaded.                     =
                                                                           =
                                                            =20
(lldb) bt                                                                  =
                                                                           =
                                                            =20
* thread #1, name =3D 'lldb', stop reason =3D signal SIGABRT               =
                                                                           =
                                                                =20
  * frame #0: 0x0000000803e642ea libc.so.7`__sys_thr_kill at thr_kill.S:3  =
                                                                           =
                                                            =20
    frame #1: 0x0000000803e642b4 libc.so.7`__raise(s=3D6) at raise.c:54    =
                                                                           =
                                                              =20
    frame #2: 0x0000000803e64229 libc.so.7`abort at abort.c:67             =
                                                                           =
                                                            =20
    frame #3: 0x0000000803ee38f1 libc.so.7`__assert(func=3D<unavailable>, f=
ile=3D<unavailable>, line=3D<unavailable>, failedexpr=3D<unavailable>) at a=
ssert.c:53                                                          =20
    frame #4: 0x00000000017fa8e5 lldb`::ConsumeTemplateArgs() at CPlusPlusN=
ameParser.cpp:245                                                          =
                                                            =20
    frame #5: 0x00000000017f9f12 lldb`::ParseFullNameImpl() at CPlusPlusNam=
eParser.cpp:551                                                            =
                                                            =20
    frame #6: 0x00000000017f97d9 lldb`::ParseFunctionImpl() at CPlusPlusNam=
eParser.cpp:114                                                            =
                                                            =20
    frame #7: 0x00000000017f96f5 lldb`::ParseAsFunctionDefinition() at CPlu=
sPlusNameParser.cpp:45                                                     =
                                                            =20
    frame #8: 0x00000000017ec364 lldb`::Parse() at CPlusPlusLanguage.cpp:20=
2                                                                          =
                                                            =20
    frame #9: 0x00000000017ec3e7 lldb`lldb_private::CPlusPlusLanguage::Meth=
odName::GetBasename(void) at CPlusPlusLanguage.cpp:218                     =
                                                            =20
    frame #10: 0x00000000016ffcba lldb`::InitNameIndexes() at Symtab.cpp:29=
4                                                                          =
                                                            =20
    frame #11: 0x00000000017008b1 lldb`::PreloadSymbols() at Symtab.cpp:407=
                                                                           =
                                                            =20
    frame #12: 0x00000000018dce19 lldb`::PreloadSymbols() at Module.cpp:141=
6                                                                          =
                                                            =20
    frame #13: 0x00000000016b1e14 lldb`::GetSharedModule() at Target.cpp:20=
28                                                                         =
                                                            =20
    frame #14: 0x00000000019c14ed lldb`::LoadModuleAtAddress() at DynamicLo=
ader.cpp:171                                                               =
                                                            =20
    frame #15: 0x000000000199fd35 lldb`::LoadAllCurrentModules() at Dynamic=
LoaderPOSIXDYLD.cpp:537                                                    =
                                                            =20
    frame #16: 0x000000000199d9aa lldb`::DidAttach() at DynamicLoaderPOSIXD=
YLD.cpp:171                                                                =
                                                            =20
    frame #17: 0x0000000001698231 lldb`::LoadCore() at Process.cpp:2853    =
                                                                           =
                                                            =20
    frame #18: 0x000000000184b85d lldb`::DoExecute() at CommandObjectTarget=
=2Ecpp:371                                                                 =
                                                              =20
    frame #19: 0x000000000181811f lldb`::Execute() at CommandObject.cpp:991=
                                                                           =
                                                            =20
    frame #20: 0x00000000018268f8 lldb`::HandleCommand() at CommandInterpre=
ter.cpp:1683                                                               =
                                                            =20
    frame #21: 0x0000000001829e2a lldb`::IOHandlerInputComplete() at Comman=
dInterpreter.cpp:2771                                                      =
                                                            =20
    frame #22: 0x00000000018e25ff lldb`::Run() at IOHandler.cpp:573        =
                                                                           =
                                                            =20
    frame #23: 0x000000000190ab5f lldb`::ExecuteIOHandlers() at Debugger.cp=
p:961                                                                      =
                                                            =20
    frame #24: 0x000000000182a9a3 lldb`::RunCommandInterpreter() at Command=
Interpreter.cpp:2971                                                       =
                                                            =20
    frame #25: 0x000000000192ce29 lldb`::RunCommandInterpreter() at SBDebug=
ger.cpp:905                                                                =
                                                            =20
    frame #26: 0x0000000001677263 lldb`::MainLoop() at Driver.cpp:1105     =
                                                                           =
                                                            =20
    frame #27: 0x00000000016779bc lldb`main at Driver.cpp:1253             =
                                                                           =
                                                            =20
    frame #28: 0x0000000001674095 lldb`_start(ap=3D<unavailable>, cleanup=
=3D<unavailable>) at crt1.c:74                                             =
                                                                  =20
(lldb) fr s 4                                                              =
                                                                           =
                                                            =20
frame #4: 0x00000000017fa8e5 lldb`::ConsumeTemplateArgs() at CPlusPlusNameP=
arser.cpp:245                                                              =
                                                            =20
   242      }                                                              =
                                                                           =
                                                            =20
   243    }                                                                =
                                                                           =
                                                            =20
   244                                                                     =
                                                                           =
                                                            =20
-> 245    assert(template_counter >=3D 0);                                 =
                                                                           =
                                                              =20
   246    if (template_counter > 0) {                                      =
                                                                           =
                                                            =20
   247      return false;                                                  =
                                                                           =
                                                            =20
   248    }                                                                =
                                                                           =
                                                            =20
(lldb) expr template_counter                                               =
                                                                           =
                                                            =20
error: use of undeclared identifier 'template_counter' <-- is that because =
of some optimizations?
(lldb)

Is that a known problem? Or maybe something wrong with my system? I
don't use lldb very often, but I don't remember it crashing like that.

Roman Bogorodskiy

--Qxx1br4bt0+wmkIi
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJaZhn2AAoJEMltX/4IwiJq5mEIAMBBJhQDdrxAQNPOiZ8hrPGc
cTEl5NsfSi+ZOMih0Zbf8zGwX+oQNE5YAHQ9yzaIMIGenzBZnxO7KNg2cOq67hKd
5VLOCVeAzfQBsF6ARiWwDJH1MENzKLvKGxNDkzFztQEXo63JAKr8KdvEyONMfh6G
iXWdpeOJzrVCrBzuZ5VzQckWRIaNi8hlUK1PrrczY9ULGOyAZv4OJSXtcOj86xjw
qNHX5qqPbQVLD7mMMCMPYJe7MSh2epNBtT9+wVLRScDig3zjhLqP2L+KuKChNMS/
+HEWeHve9dehd+9Bnqg73ry2tGOIJ7uT7ZBu/DN9Yj+M22/Kzv5HfnFeEx/Y7ME=
=Z3+U
-----END PGP SIGNATURE-----

--Qxx1br4bt0+wmkIi--



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