Exception on remote login when there is a paused traced process

Bug #1062278 reported by Jan Schlüter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Low
Björn Tillenius
landscape-client (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I start a process with gdb on our 12.04 LTS server, then pause/stop it (in this case, it stopped by itself because of a segfault), any remote SSH login to our server is greeted with about the following message (I have replaced most data with dots):

Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-30-generic x86_64)

 * Documentation: https://help.ubuntu.com/

  System information as of Fri Oct 5 14:56:59 CEST 2012

  System load: ... Swap usage: ...
  Usage of /raid: ... Users logged in: ...
  Memory usage: ... IP address for eth1: ...

  => /raid is using ...
  => /media/backup is using ...
  => There were exceptions while processing one or more plugins. See
     /var/log/landscape/sysinfo.log for more information.

  Graph this data and manage this system at https://landscape.canonical.com/

*** System restart required ***
No mail.
Last login: Fri Oct 5 11:18:48 2012 from ...

Looking into /var/log/landscape/sysinfo.log, I saw the following:

2012-10-05 14:56:59,372 ERROR Processes plugin raised an exception.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/landscape/sysinfo/sysinfo.py", line 99, in run
    result = plugin.run()
  File "/usr/lib/python2.7/dist-packages/landscape/sysinfo/processes.py", line 18, in run
    for process_info in info.get_all_process_info():
  File "/usr/lib/python2.7/dist-packages/landscape/lib/process.py", line 49, in get_all_process_info
    process_info = self.get_process_info(process_id)
  File "/usr/lib/python2.7/dist-packages/landscape/lib/process.py", line 85, in get_process_info
    process_info["state"] = STATES[state]
KeyError: 't (tracing stop)'

I therefore patched /usr/lib/python2.7/dist-packages/landscape/lib/process.py in the following way:
@@ -14,7 +14,7 @@
           "D (disk sleep)": "D",
           "S (sleeping)": "S",
           "T (stopped)": "T",
- "T (tracing stop)": "I",
+ "t (tracing stop)": "I",
           "X (dead)": "X",
           "Z (zombie)": "Z"}

Now everything seems to work as intended. Please feel free to adopt this patch.

Tags: patch

Related branches

Revision history for this message
Jan Schlüter (f0k) wrote :
Changed in landscape-client:
milestone: none → 12.10
importance: Undecided → Low
tags: added: kanban
tags: removed: kanban
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Same patch as included in the description. Adapt file names as needed." of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in landscape-client:
status: New → In Progress
assignee: nobody → Björn Tillenius (bjornt)
Changed in landscape-client:
status: In Progress → Fix Committed
Revision history for this message
Björn Tillenius (bjornt) wrote :

Thank you for your bug report and patch, Jan. I couldn't use your patch, since the state is still T on Lucid. I got rid of the mapping altogether, so that new states are handled automatically.

The fix will be included in the 12.10 landscape-client release.

Changed in landscape-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.