Bug 1288143 - tuna thows an exception instead of an error message when sched_setaffinity returns EINVAL
tuna thows an exception instead of an error message when sched_setaffinity re...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tuna (Show other bugs)
6.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: John Kacur
Jiri Kastner
:
Depends On:
Blocks: 1270066 1290445
  Show dependency treegraph
 
Reported: 2015-12-03 11:29 EST by Guy Streeter
Modified: 2016-05-10 16:53 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1290445 (view as bug list)
Environment:
Last Closed: 2016-05-10 16:53:53 EDT
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)
proposed fix (1.47 KB, patch)
2015-12-10 09:30 EST, John Kacur
no flags Details | Diff
proposed fix (1.71 KB, patch)
2015-12-15 12:04 EST, John Kacur
no flags Details | Diff

  None (edit)
Comment 6 John Kacur 2015-12-10 09:30 EST
Created attachment 1104366 [details]
proposed fix
Comment 7 John Kacur 2015-12-10 09:36:49 EST
I've tested this and it works, but will wait for upstream comments before using it for a build
Comment 8 Guy Streeter 2015-12-10 10:13:40 EST
I think a slightly more detailed error message would be good. Mention the affected thread by name and/or PID, since the command may have tried to move more than one thread.

And, "thread cannot be moved as requested" is clearer than "cannot move thread" for this condition.
--Guy
Comment 9 John Kacur 2015-12-14 20:46:12 EST
I mostly agree, although, "thread cannot be moved as requested", is not clearer because it sounds like it could be moved if you requested it differently. Wordier is not always clearer, it leaves room for more arguments. Anyway, I think this discussion belongs on the tuna mailing list and not on the bugzilla.
Comment 10 Guy Streeter 2015-12-15 10:07:37 EST
But we don't know from the error whether requesting it differently would have succeeded. How about "failed to move thread"?
Comment 11 John Kacur 2015-12-15 10:51:43 EST
How about, "Cannot move unmovable thread (%pid)"
Comment 12 Guy Streeter 2015-12-15 10:54:46 EST
You can get EINVAL when a thread is movable, but not as requested. You can also get EINVAL when the thread is unmovable.
I think "do not move" or "failed to move" is better.
Comment 13 John Kacur 2015-12-15 11:37:12 EST
Good point.
Going back to your original suggestion, how about the following?

# tuna --cpus=1 --threads="migration/*" --move
thread 11 cannot be moved as requested
thread 28 cannot be moved as requested
thread 21 cannot be moved as requested


--------------------------

Note that it is simple to get the pid, but the thread name is a bit trickier, so I suggest we leave that as a feature for the future.
Comment 14 Guy Streeter 2015-12-15 11:57:57 EST
That looks good to me.
Comment 15 John Kacur 2015-12-15 12:04 EST
Created attachment 1106091 [details]
proposed fix
Comment 16 John Kacur 2015-12-17 06:26:10 EST
Fixed in tuna-0.12-2.el6 and up
Comment 21 errata-xmlrpc 2016-05-10 16:53:53 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0807.html

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