New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 690089 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 0
Type: Bug



Sign in to add a comment

gs_offloader failing to start

Project Member Reported by sbasi@chromium.org, Feb 8 2017

Issue description

$ /usr/local/autotest/site_utils/gs_offloader.py
DEBUG:root:Set process to nice value: 10
DEBUG:root:Set process to ionice IDLE
Traceback (most recent call last):
  File "/usr/local/autotest/site_utils/gs_offloader.py", line 981, in <module>
    main()
  File "/usr/local/autotest/site_utils/gs_offloader.py", line 959, in main
    proc.ionice(psutil.IOPRIO_CLASS_IDLE)
AttributeError: 'Process' object has no attribute 'ionice'


Git blame shows this line hasn't been touched since 2015...

My guess something in the fix-it broke this.
 

Comment 2 by sbasi@chromium.org, Feb 8 2017

Cc: dshi@chromium.org
Allen any chance this could be related to the virtualenv??
Here's the source context around the failure:
    if psutil:
        proc = psutil.Process()
        logging.debug('Set process to ionice IDLE')
        proc.ionice(psutil.IOPRIO_CLASS_IDLE)

'psutil' in turn is set like so:
try:
    # Does not exist, nor is needed, on moblab.
    import psutil
except ImportError:
    psutil = None


So, either
 1) Something changed in the 'psutil' module that broke this
    code, or
 2) Until recently, 'psutil' simply wasn't being imported.

Comment 4 by dshi@chromium.org, Feb 8 2017

I don't think gs_offloader use virtualenv?

I tried the import in my workstation and cautotest, seems psutil package was updated recently and it no longer has the method ionice

The psutil module itself changed.

On the lab server, the version of psutil is 1.2.1, and the ionice() function was renamed to set_ionice()

If you run in chroot, the version of psutil is 2.2.1. And it has the ionice() function, I think we should upgrade the psutil
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/627a75ebc4cc2f755ccad17d1c9f92c91cc2e776

commit 627a75ebc4cc2f755ccad17d1c9f92c91cc2e776
Author: Simran Basi <sbasi@google.com>
Date: Wed Feb 08 19:13:27 2017

gs_offloader: Move psutil import to after import common

We seem to be having an issue with the version of psutil on
our goobuntu machines. Move the import of psutil to after
import common to use the build_externals copy of psutil.

BUG= chromium:690089 
TEST=On goobuntu machine.

Change-Id: I09d2991f275e5f1941a4c70b1bc07bd15dc4224f
Reviewed-on: https://chromium-review.googlesource.com/439629
Reviewed-by: Dan Shi <dshi@google.com>
Tested-by: Simran Basi <sbasi@chromium.org>

[modify] https://crrev.com/627a75ebc4cc2f755ccad17d1c9f92c91cc2e776/site_utils/gs_offloader.py

> Move the import of psutil to after
import common to use the build_externals copy of psutil.

Oh dear, I hadn't thought of that.  That's horrifying.

Comment 8 by dshi@chromium.org, Feb 8 2017

Cc: pprabhu@chromium.org
For reference, the bad CL is here:
https://chromium-review.googlesource.com/#/c/434968/

+pprabhu
Oops, sorry about this. Did not see it coming.
Maybe test push needs a "health check" on gs_offloader (and other services?)?
Project Member

Comment 10 by sheriffbot@chromium.org, Feb 23 2017

Pri-0 bugs are critical regressions or serious emergencies, and this bug has not been updated in three days. Could you please provide an update, or adjust the priority to a more appropriate level if applicable?

If a fix is in active development, please set the status to Started.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Untriaged)

Sign in to add a comment