Bug 997424 - threads not dumped to anaconda-tb-* after exception
threads not dumped to anaconda-tb-* after exception
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-15 09:33 EDT by Steve Tyler
Modified: 2014-01-02 12:36 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-02 12:36:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
[19.30.13-1] anaconda-tb-bz981436-at768904.log (287.06 KB, text/plain)
2013-08-15 09:33 EDT, Steve Tyler
no flags Details
[20.6-1] anaconda-tb-all.log (314.33 KB, text/plain)
2013-08-15 18:42 EDT, Steve Tyler
no flags Details

  None (edit)
Description Steve Tyler 2013-08-15 09:33:22 EDT
Created attachment 786940 [details]
[19.30.13-1] anaconda-tb-bz981436-at768904.log

Description of problem:
The anaconda dumpState() function is supposed to be dumping the threads, but this recent anaconda-tb* file does not show any threads:
Bug 981436, Attachment 768904 [details]

$ grep Threads anaconda-tb-bz981436-at768904.log
$ 

$ less -N anaconda-19.30.13-1/pyanaconda/__init__.py
...
    168     def dumpState(self):
...
    178         # gather up info on the running threads
    179         threads = "\nThreads\n-------\n"
    180         for thread_id, frame in sys._current_frames().iteritems():
    181             threads += "\nThread %s\n" % (thread_id,)
    182             threads += "".join(format_stack(frame))
...

$ grep -Rn --exclude='*.pyc' dumpState anaconda-19.30.13-1
anaconda-19.30.13-1/anaconda.spec.in:1977:- Fix dumpState to work with the new python-meh (#856235) (vpodzime)
anaconda-19.30.13-1/anaconda:1022:    signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState())
anaconda-19.30.13-1/pyanaconda/__init__.py:168:    def dumpState(self):
anaconda-19.30.13-1/pyanaconda/__init__.py:173:        # Skip the frames for dumpState and the signal handler.

$ cat -n anaconda-19.30.13-1/anaconda.spec.in | gedit -
...
  1906	* Wed Sep 26 2012 Chris Lumens <clumens@redhat.com> - 18.10-1
...
  1976	- Add a way to test exception handling (vpodzime)
  1977	- Fix dumpState to work with the new python-meh (#856235) (vpodzime)
...

Version-Release number of selected component (if applicable):
anaconda-19.30.13-1

How reproducible:
Presumably, always.

Steps to Reproduce:
1. Crash anaconda.

Actual results:
Threads are not dumped to anaconda-tb-*.

Expected results:
Threads are dumped to anaconda-tb-*.

Additional info:
This is the bug used for the example:
Bug 981436 - error: rpmdb open failed
Comment 1 Steve Tyler 2013-08-15 18:42:19 EDT
Created attachment 787095 [details]
[20.6-1] anaconda-tb-all.log

With anaconda 20.6-1, there is a thread dump at the end of the log file. The log file was captured while paused at the Installation Summary dialog with:
# pkill -USR2 -o anaconda

Tested with:
$ qemu-kvm -m 4096 -hda f20-test-1.img -cdrom ~/xfr/fedora/nightly-composes/Fedora-20-Nightly-x86_64-Live-desktop-20130815.09-1.iso -vga std -boot menu=on

$ less -N anaconda-tb-all.log
...
   3838 Threads
   3839 -------
   3840 
   3841 Thread 140175569446720
   3842   File "/sbin/anaconda", line 1080, in <module>
   3843     anaconda._intf.run()
   3844   File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/__init__.py", line 369, in run
   3845     Gtk.main()
   3846   File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 634, in <lambda>
   3847     return (lambda data: callback(*data), user_data)
   3848   File "/sbin/anaconda", line 1016, in <lambda>
   3849     signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState())
   3850   File "/usr/lib64/python2.7/site-packages/pyanaconda/__init__.py", line 174, in dumpState
   3851     threads += "".join(format_stack(frame))
   3852
Comment 2 Steve Tyler 2013-08-15 18:46:59 EDT
Closing NEXTRELEASE, because this is fixed with anaconda 20.6-1.
Comment 3 Steve Tyler 2013-08-16 01:27:42 EDT
These anaconda 20.6-1 exception reports do not have Threads dumps:

Bug 997690, Attachment 787130 [details]:
Bug 997690 - SizeNotPositiveError: bytes= param must be >=0

Bug 997711, Attachment 787143 [details]:
Bug 997711 - NameError: global name 'logicals' is not defined

Reopening.
Comment 4 Steve Tyler 2013-08-17 05:25:12 EDT
The problem seems to be that dumpState(), which dumps threads, is only invoked when a SIGUSR2 is received.

$ grep -Rn dumpState anaconda-20.6-1/
anaconda-20.6-1/anaconda.spec.in:2030:- Fix dumpState to work with the new python-meh (#856235) (vpodzime)
anaconda-20.6-1/anaconda:1016:    signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState())
anaconda-20.6-1/pyanaconda/__init__.py:158:    def dumpState(self):
anaconda-20.6-1/pyanaconda/__init__.py:164:        # Skip the frames for dumpState and the signal handler.

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