delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/11/11/15:48:21

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=BvkMKZ2dOAQIFpzY2DX7peEGwy21Z9Wp/padm38oXAB
e/uXkfHiKfhXHW/8L4w7vlJStfKc/hT1o0yvFBbWCIn/NfSb8Sj/pAxd6S/pgQW/
rlLFCVs4FHMVyNcWN6kvsXOebbuX3txn4amNvAZWLEY7KFnYOLpQP1awLQOcqLWY
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=edwFKN05MViiri9gNOFJ6tMVxns=; b=qEYMeflO9Tbooo1Qq
dRjn0EBRO6hhG83M55dDe52PBgp6Z57UDT/DD5I787L72903BMsP5EGd18IwmimW
/8g3+cGRgfs+4Zms9Zo5H6ua2XI8NuX5mUpQtLiocLIcjhUUJEGxr7pdJlYf0P3E
zThw3cCexFE8JrcPLAFUQYzt+E=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Message-ID: <5DC9C8DC.50501@tlinx.org>
Date: Mon, 11 Nov 2019 12:47:24 -0800
From: L A Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Configurable stack trace please
References: <BY5PR09MB3972BF6623DDEC0DDDB00AE8A5780 AT BY5PR09MB3972 DOT namprd09 DOT prod DOT outlook DOT com>
In-Reply-To: <BY5PR09MB3972BF6623DDEC0DDDB00AE8A5780@BY5PR09MB3972.namprd09.prod.outlook.com>
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019