From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17125 invoked by alias); 11 Nov 2019 20:47:30 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 17116 invoked by uid 89); 11 Nov 2019 20:47:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KHOP_HELO_FCRDNS autolearn=ham version=3.3.1 spammy=H*r:192.168.3, H*r:8.14.4, hacker, Looking X-HELO: Ishtar.sc.tlinx.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Nov 2019 20:47:28 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id xABKlO4w027905 for ; Mon, 11 Nov 2019 12:47:26 -0800 Message-ID: <5DC9C8DC.50501@tlinx.org> Date: Mon, 11 Nov 2019 20:47:00 -0000 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Configurable stack trace please References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00050.txt.bz2 On 2019/11/07 13:00, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > When Cygwin generates a stacktrace (coredump) is it possible to get more than 16 frames printed out? > Looking at exceptions.cc, seems like not. Can it please be increased to 32, for example? > --- "For example". I'm guessing it's a first stab at an amount that might be right for the program you are debugging? Would it be possible to put that limit in an ENV var? Like if "not set", or the #frames > (what? 128? 256? 512?) "some limit that is way above what would be used or wanted", then use 16 frames, else use value in an ENV VAR like CYGWIN_DBG_UNWIND_STACKFRAMES=32. Looking through several progs just now, the max stack size I saw was about 32 frames, though in a program that was 'hung' (like Firefox et al) I've seen over 100 frames -- but how many are valid... But this was a longer trace for syslogd's main thread. 0, ntoskrnl.exe!RtlNumberOfSetBitsUlongPtr+0x1093 1, ntoskrnl.exe!KeReleaseSpinLock+0x81d 2, ntoskrnl.exe!KeWaitForMultipleObjects+0x272 3, ntoskrnl.exe!NtRequestWaitReplyPort+0x434 4, ntoskrnl.exe!FsRtlMdlWriteCompleteDev+0x1ec1 5, ntoskrnl.exe!longjmp+0x5b93 6, ntdll.dll!NtWaitForMultipleObjects+0xa 7, KernelBase.dll!GetCurrentProcess+0x40 8, kernel32.dll!WaitForMultipleObjects+0xb0 9, cygwin1.dll!acl_get_perm+0x4a8c 10, cygwin1.dll!acl_get_perm+0x51b4 11, cygwin1.dll!acl_get_perm+0x5668 12, cygwin1.dll!acl_get_perm+0x5ae7 13, cygwin1.dll!dirname+0x4acc 14, cygwin1.dll!acl_get_perm+0x99da 15, 0x600000750 16, 0x2 17, 0xffffffff 18, 0x100000000 19, 0xffffc330 20, 0xffffc300 21, 0x44 22, 0x600000750 23, 0x2 24, 0xffffc300 25, syslogd.exe+0x156e8 26, 0xffffc2e0 27, 0x4f300000000 28, 0xffffc7c0 29, 0x450230 30, 0x109 31, syslogd.exe+0x107f ----------------------------------- BTW, for frames 15-31, I'm guessing those are maybe from inside syslogd(?). The above is from the tool 'Process Hacker' (it's Hacker in the exploring/curiosity sense, not in the Cracking sense) with Win binaries and source downloadable from https://processhacker.sourceforge.io/. (V2.39) It's an enhanced replacement for sysinternals ProcessExplorer, which is an enhanced replacement for 'Windows Task Manager'. and uses the same debug info that they use (?pdb?) -- that can dynamically download symbol table mappings from MS and optionally cache them locally. Anyway, seems having a configurable limit might come in handy now and then? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple