From owner-freebsd-current@freebsd.org Mon Sep 18 11:41:10 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C4B1E0A16D for ; Mon, 18 Sep 2017 11:41:10 +0000 (UTC) (envelope-from zakharov.vv@gmail.com) Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com [IPv6:2a00:1450:4010:c07::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 108766512D for ; Mon, 18 Sep 2017 11:41:10 +0000 (UTC) (envelope-from zakharov.vv@gmail.com) Received: by mail-lf0-x234.google.com with SMTP id c80so251024lfh.0 for ; Mon, 18 Sep 2017 04:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=BozhTnkLYhkmu0J8FkghNZgHN4ZLkiAuTyfZUxkS5F0=; b=ArPC//XVcufDdxm66w9Ai0/x60rp7y/p9HjY03b1vxSRhaDIuFSlTER07dB6YJckyp tONBoZAHQYUKsNr4CvE2p85SrtsmyC+RPph+oEWTuqBOoy/DNAyPLRA1qGSO1/ujOYmS cYXlCr6Bc4oan0Z9kMhoEuKyr/i1yvBX8ne+G2d7zCrdtc4lF/Px86fd5azerDP4hP6d ZHgShWNLllKkyFOph/g0JgMYWKrqgC8RMyJroSNorS+oYKakc0vgaIh4lCvUJE+DAjW6 4Z2gUhyKmir4uPySlR5xpWSVFqYAtSa+qR6kNFmdfIx+kRqbOU05l7Gnceb5gStstslU pDWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=BozhTnkLYhkmu0J8FkghNZgHN4ZLkiAuTyfZUxkS5F0=; b=c8I96oWLJOsr6R2v0PRa7dtwWZb4LVFT0BzG9Ew/cZQpXjGDe3Eqfjr6sug/AqSYBh 8ebBqWaZEaeA7spMH/eDJP7SP0np7hZgatuXmWCiFCIr4WEORM6dwvDr0y7tCMfM0NXb LiuXOtwUxpR8ZeNDcdlXnEUXSz414F7YGTjLlZfpE/ejV97/8kjr5IX3MfrkzFXb47xd OJrABYv9pYj5wZ0/sZL28wV3E9lsLPX0ZxEKngboDPgyLqNk76jmCldyAZ5gGEdUikn5 TSaYaqOCtOLMdx7cdwcX7lMLpRFKXdgRRuieJFxaIoynjAyTQsA9h56eVrpo4tETuciC +v2g== X-Gm-Message-State: AHPjjUjKjiOE9zke9h1Vlmip5IcXkYFGafFbvLPd+uh18snzMqvZbDJ/ TsRw95aASPfhTXRjVZ0= X-Google-Smtp-Source: AOwi7QAwO4RTNjCbsQ1GWBTcBCmmZvGsF7GoDjpNr6r7OimPE2YZoZswwfL1aojh8+EVZUCCDxbLGw== X-Received: by 10.25.41.147 with SMTP id p141mr3296984lfp.56.1505734867748; Mon, 18 Sep 2017 04:41:07 -0700 (PDT) Received: from localhost ([81.19.73.153]) by smtp.gmail.com with ESMTPSA id g132sm1416669lfe.13.2017.09.18.04.41.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 04:41:07 -0700 (PDT) Date: Mon, 18 Sep 2017 14:41:06 +0300 From: Vladimir Zakharov To: freebsd-current@freebsd.org Subject: lldb unusable for regular user Message-ID: <20170918114106.jkmpcde6tmvhizhj@vzakharov> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Operating-System: FreeBSD 12.0-CURRENT amd64 X-PGP-Key: http://vzakharov.ru/pubkey.asc User-Agent: NeoMutt/20170912 (1.9.0) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 11:41:10 -0000 Hello! lldb coredumps for regular user, but works for root. > uname -a FreeBSD vzakharov 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r323675: Sun Sep 17 21:14:33 MSK 2017 root@vzakharov:/home/obj/usr/src/sys/GENERIC-NODEBUG amd64 > cat test.c #include #include int main() { printf("PID: %d\n", getpid()); sleep(10); return 0; } > cc -O0 -g test.c -o test > lldb ./test (lldb) target create "./test" Current executable set to './test' (x86_64). (lldb) run Process 37758 launching Process 37758 launched: './test' (x86_64) Segmentation fault (core dumped) Exit 139 > sudo lldb ./test (lldb) target create "./test" Current executable set to './test' (x86_64). (lldb) run Process 37776 launching Process 37776 launched: './test' (x86_64) PID: 37776 Process 37776 exited with status = 0 (0x00000000) (lldb) Postmortem by gdb: > gdb ./test test.core ... [New LWP 101456] Core was generated by `./test'. Program terminated with signal SIGTRAP, Trace/breakpoint trap. #0 _start (ap=0x7fffffffe858, cleanup=0x800605910 ) at /usr/src/lib/csu/amd64/crt1.c:50 50 { (gdb) bt #0 _start (ap=0x7fffffffe858, cleanup=0x800605910 ) at /usr/src/lib/csu/amd64/crt1.c:50 (gdb) f #0 _start (ap=0x7fffffffe858, cleanup=0x800605910 ) at /usr/src/lib/csu/amd64/crt1.c:50 50 { > gdb `which lldb` lldb.core ... Reading symbols from /usr/bin/lldb...Reading symbols from /usr/lib/debug//usr/bin/lldb.debug...done. done. [New LWP 101610] [New LWP 100968] [New LWP 100126] [New LWP 101631] [New LWP 101637] [New LWP 101662] [New LWP 101672] [New LWP 100337] [New LWP 101593] Core was generated by `lldb ./test'. Program terminated with signal SIGSEGV, Segmentation fault. #0 x86_64_freebsd_fallback_frame_state (context=0x7fffddff6e20, context=0x7fffddff6e20, fs=0x7fffddff6b70) at ./md-unwind-support.h:60 60 ./md-unwind-support.h: No such file or directory. [Current thread is 1 (LWP 101610)] (gdb) f #0 x86_64_freebsd_fallback_frame_state (context=0x7fffddff6e20, context=0x7fffddff6e20, fs=0x7fffddff6b70) at ./md-unwind-support.h:60 60 in ./md-unwind-support.h (gdb) bt #0 x86_64_freebsd_fallback_frame_state (context=0x7fffddff6e20, context=0x7fffddff6e20, fs=0x7fffddff6b70) at ./md-unwind-support.h:60 #1 uw_frame_state_for (context=context@entry=0x7fffddff6e20, fs=fs@entry=0x7fffddff6b70) at /wrkdirs/usr/ports/lang/gcc6/work/gcc-6.4.0/libgcc/unwind-dw2.c:1249 #2 0x0000000804f6cffb in _Unwind_ForcedUnwind_Phase2 (exc=exc@entry=0x806b23230, context=context@entry=0x7fffddff6e20) at /wrkdirs/usr/ports/lang/gcc6/work/gcc-6.4.0/libgcc/unwind.inc:155 #3 0x0000000804f6d334 in _Unwind_ForcedUnwind (exc=0x806b23230, stop=0x804631760 , stop_argument=) at /wrkdirs/usr/ports/lang/gcc6/work/gcc-6.4.0/libgcc/unwind.inc:207 #4 0x00000008046315c3 in _Unwind_ForcedUnwind (ex=, stop_func=0xe, stop_arg=0x806b23000) at /usr/src/lib/libthr/thread/thr_exit.c:106 #5 thread_unwind () at /usr/src/lib/libthr/thread/thr_exit.c:172 #6 _pthread_exit_mask (status=, mask=) at /usr/src/lib/libthr/thread/thr_exit.c:254 #7 0x00000008046313eb in _pthread_exit (status=0x806b23000) at /usr/src/lib/libthr/thread/thr_exit.c:206 #8 0x0000000804623c0d in thread_start (curthread=0x806b23000) at /usr/src/lib/libthr/thread/thr_create.c:289 #9 0x00007fffdddf7000 in ?? () Backtrace stopped: Cannot access memory at address 0x7fffddff7000 -- Regards, | "In theory there is no difference between theory Vladimir Zakharov | and practice. In practice there is."- Yogi Berra