Red Hat Bugzilla – Bug 1288143
tuna thows an exception instead of an error message when sched_setaffinity returns EINVAL
Last modified: 2016-05-10 16:53:53 EDT
Created attachment 1104366 [details]
I've tested this and it works, but will wait for upstream comments before using it for a build
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.
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.
But we don't know from the error whether requesting it differently would have succeeded. How about "failed to move thread"?
How about, "Cannot move unmovable thread (%pid)"
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.
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.
That looks good to me.
Created attachment 1106091 [details]
Fixed in tuna-0.12-2.el6 and up
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.