public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "brendan.gregg at joyent dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug documentation/13713] New: MAXTRACE/MAXBACKTRACE undocumented feature
Date: Mon, 20 Feb 2012 06:00:00 -0000	[thread overview]
Message-ID: <bug-13713-6586@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=13713

             Bug #: 13713
           Summary: MAXTRACE/MAXBACKTRACE undocumented feature
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: documentation
        AssignedTo: systemtap@sourceware.org
        ReportedBy: brendan.gregg@joyent.com
    Classification: Unclassified


I was to file a bug about backtrace() being truncated to 20 entries (21,
including the current function), but after some digging realized that this can
be tuned - it's just not in the documentation.

MAXTRACE - number of stack frames - can be increased to trace stack back traces
longer than 20.  If it helps, here is an example of a long stack (after
increasing MAXTRACE):

 0xffffffffa003f009 : tcp_packet+0x29/0x14e0 [nf_conntrack]
 0xffffffffa003a72b : nf_conntrack_in+0x3bb/0xaf0 [nf_conntrack]
 0xffffffffa0058691 : ipv4_conntrack_in+0x21/0x30 [nf_conntrack_ipv4]
 0xffffffff814fdfb5 : nf_iterate+0x85/0xc0 [kernel]
 0xffffffff814fe065 : nf_hook_slow+0x75/0x150 [kernel]
 0xffffffff81508a44 : ip_rcv+0x224/0x300 [kernel]
 0xffffffff814d2633 : __netif_receive_skb+0x523/0x5c0 [kernel]
 0xffffffff814d3230 : netif_receive_skb+0x80/0x90 [kernel]
 0xffffffffa001fe69 : virtnet_poll+0x5c9/0x830 [virtio_net]
 0xffffffff814d3a7b : net_rx_action+0x12b/0x270 [kernel]
 0xffffffff81075378 : __do_softirq+0xb8/0x230 [kernel]
 0xffffffff815ebbec : call_softirq+0x1c/0x30 [kernel]
 0xffffffff81016275 : do_softirq+0x65/0xa0 [kernel]
 0xffffffff810748e4 : local_bh_enable+0x94/0xa0 [kernel]
 0xffffffff814d4f02 : dev_queue_xmit+0x1c2/0x600 [kernel]
 0xffffffff8150d10b : ip_finish_output+0x16b/0x2f0 [kernel]
 0xffffffff8150dc68 : ip_output+0x98/0xa0 [kernel]
 0xffffffff8150d369 : ip_local_out+0x29/0x30 [kernel]
 0xffffffff8150d4bf : ip_queue_xmit+0x14f/0x3f0 [kernel]
 0xffffffff815248f4 : tcp_transmit_skb+0x3e4/0x8d0 [kernel]
 0xffffffff81525447 : tcp_write_xmit+0xf7/0xa20 [kernel]
 0xffffffff81525da0 : tcp_push_one+0x30/0x40 [kernel]
 0xffffffff81517635 : tcp_sendmsg+0xcb5/0xd90 [kernel]
 0xffffffff8153c7e4 : inet_sendmsg+0x64/0xb0 [kernel]
 0xffffffff814bb39a : sock_aio_write+0x13a/0x160 [kernel]
 0xffffffff811786c2 : do_sync_write+0xd2/0x110 [kernel]
 0xffffffff8117905d : vfs_write+0x16d/0x180 [kernel]
 0xffffffff811792ca : sys_write+0x4a/0x90 [kernel]
 0xffffffff815e9982 : system_call_fastpath+0x16/0x1b [kernel]

Without increasing MAXTRACE, this is truncated.  If this is the correct
tunable, its existence can be added to the function::backtrace man page (which
currently just has MAXSTRINGLEN).  20 frames is often enough, but sometimes
isn't.

There is another tunable, MAXBACKTRACE (set to 20), which can't be redefined
using -D.  It didn't affect the stack length when I tried tuning it on my
system, but it looks related, so may need to in some situations.

If it matters, I was testing on:

# stap -V
Systemtap translator/driver (version 1.6/0.152 non-git sources)
Copyright (C) 2005-2011 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR
TR1_UNORDERED_MAP NLS
# uname -a
Linux 9d219ce8-cf52-409f-a14a-b210850f3231 3.2.6-3.fc16.x86_64 #1 SMP Mon Feb
13 20:35:42 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release 
Fedora release 16 (Verne)

This is Fedora as a guest running under KVM.  SystemTap was installed via yum.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

             reply	other threads:[~2012-02-20  6:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20  6:00 brendan.gregg at joyent dot com [this message]
2012-02-20 13:55 ` [Bug documentation/13713] " mjw at redhat dot com
2012-02-21 23:21 ` brendan.gregg at joyent dot com
2012-02-22  9:01 ` mjw at redhat dot com

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=bug-13713-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /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).