Bug 1000025

Summary: tuna - listing threads using -CP ends with traceback
Product: Red Hat Enterprise Linux 7 Reporter: John Kacur <jkacur>
Component: tunaAssignee: John Kacur <jkacur>
Status: CLOSED CURRENTRELEASE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: acme, bhu, jkastner, poros
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 997536 Environment:
Last Closed: 2014-07-31 15:08:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 997536    
Bug Blocks:    

Description John Kacur 2013-08-22 14:04:55 UTC
+++ This bug was initially created as a clone of Bug #997536 +++

Description of problem:
when listing threads using -CP tuna ends with traceback.

Version-Release number of selected component (if applicable):
tuna-0.11+

How reproducible:
always

Steps to Reproduce:
1. sudo tuna -CP
2. check output

Actual results:
# tuna -CP
...
Traceback (most recent call last):
  File "/bin/tuna", line 647, in <module>
    main()
  File "/bin/tuna", line 542, in main
    kthreads, affect_children, show_sockets, cgroups)
  File "/bin/tuna", line 310, in do_ps
    has_ctxt_switch_info, sock_inodes, sock_inode_re, cgroups)
  File "/bin/tuna", line 275, in ps_show
    sock_inode_re, cgroups)
  File "/bin/tuna", line 230, in ps_show_thread
    sock_inodes, sock_inode_re)
TypeError: ps_show_thread() takes exactly 7 arguments (6 given)

Expected results:
no traceback

Additional info:

Comment 2 Guy Streeter 2014-02-27 16:23:36 UTC
Upstream commit

commit a97f70eb407f3ec2972740ca5ab976f5f06ce0bb
Author: Petr Oros <poros>
Date:   Thu Aug 15 11:15:45 2013 +0200

    CLI: fix ps_show_thread call with bad args count
    
    Signed-off-by: Petr Oros <poros>

diff --git a/tuna-cmd.py b/tuna-cmd.py
index 64e3ad1..5dcc181 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -227,7 +227,7 @@ def ps_show_thread(pid, affect_children, ps,
                for tid in ps[pid]["threads"].keys():
                        ps_show_thread(tid, False, ps[pid]["threads"],
                                       has_ctxt_switch_info,
-                                      sock_inodes, sock_inode_re)
+                                      sock_inodes, sock_inode_re, cgroups)
                        
 
 def ps_show(ps, affect_children, thread_list, cpu_list,

Comment 3 John Kacur 2014-03-11 11:56:40 UTC
This was fixed in 0.11-3, currently at 0.11.1-5