Bug 497849 - pstack truncates stack trace lines
pstack truncates stack trace lines
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
10
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-27 10:54 EDT by Oliver Henshaw
Modified: 2009-04-27 11:28 EDT (History)
2 users (show)

See Also:
Fixed In Version: gdb-6.8.50.20090302-22.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-27 11:28:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
pstack of kded4 with truncated lines (3.85 KB, text/plain)
2009-04-27 10:56 EDT, Oliver Henshaw
no flags Details
similar gdb bt of kded4 without truncated lines (4.40 KB, text/plain)
2009-04-27 10:57 EDT, Oliver Henshaw
no flags Details

  None (edit)
Description Oliver Henshaw 2009-04-27 10:54:45 EDT
Description of problem:

Using pstack to sample the stack of running processes, I see some of the lines are truncated. The full line is printed when using gdb to sample the stack. For example,

pstack gives "QEventDispatcherGlib::processEvents (this=0x97c8948, flags="
gdb gives "QEventDispatcherGlib::processEvents (this=0x97c8948, flags={i = 36}) at kernel/qeventdispatcher_glib.cpp:32"

The "at blah/blah.cpp:XX" part is always missing for pstack, not sure whether that is by design or not. At first I thought that the incomplete arguments were due to the curly braces, but I see some lines in pstack with curly braces intact.

Version-Release number of selected component (if applicable):
$ rpm -q gdb
gdb-6.8-29.fc10.i386

Note:
I actually use a patched version of pstack, so that debug symbols are always read:
$ diff /usr/bin/pstack /home/henshaw/bin/mystack
32,36c32,37
< if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
<     readnever=--readnever
< else
<     readnever=
< fi
---
> #if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
> #    readnever=--readnever
> #else
> #    readnever=
> #fi
> readnever=


How reproducible:
Compare pstack and gdb backtrace, possibly for process with curly braces in function arguments.
Comment 1 Oliver Henshaw 2009-04-27 10:56:24 EDT
Created attachment 341436 [details]
pstack of kded4 with truncated lines
Comment 2 Oliver Henshaw 2009-04-27 10:57:52 EDT
Created attachment 341437 [details]
similar gdb bt of kded4 without truncated lines
Comment 3 Jan Kratochvil 2009-04-27 11:28:02 EDT
Thanks, fixed by:
* Mon Apr 27 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-22
- Fix pstack/gstack cutting very long lines (BZ 497849).

http://cvs.fedora.redhat.com/viewvc/rpms/gdb/devel/gdb-6.3-gstack-20050411.patch?r1=1.4&r2=1.5&view=patch

That -readnever should be removed one day, just the Archer branch archer-tromey-delayed-symfile is currently not fast enough.

Note You need to log in before you can comment on or make changes to this bug.