public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: L A Walsh <cygwin@tlinx.org>
To: cygwin@cygwin.com
Subject: Re: Configurable stack trace please
Date: Mon, 11 Nov 2019 20:47:00 -0000	[thread overview]
Message-ID: <5DC9C8DC.50501@tlinx.org> (raw)
In-Reply-To: <BY5PR09MB3972BF6623DDEC0DDDB00AE8A5780@BY5PR09MB3972.namprd09.prod.outlook.com>

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

      parent reply	other threads:[~2019-11-11 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 21:02 Deeper " Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-11-08  0:16 ` Mark Geisert
2019-11-11 20:47 ` L A Walsh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5DC9C8DC.50501@tlinx.org \
    --to=cygwin@tlinx.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).