Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: can't set processor affinity without being sudo in some environments #312

Closed
Aaronontheweb opened this issue Feb 24, 2020 · 1 comment
Assignees
Labels
benchmark-execution Execution and discovery engine for the NBench SDK bug
Milestone

Comments

@Aaronontheweb
Copy link
Member

Ran into this here: akkadotnet/HOCON#236

Looks like

2020-02-24T21:44:58.2735223Z Starting Target: NBench (==> Build)
2020-02-24T21:44:58.2790788Z dotnet "run" "--no-build" "-c" "Release" " -- " "--output" "/home/vsts/work/1/s/PerfResults" "--concurrent" "true" "--trace" "true" "--diagnostic" 
2020-02-24T21:44:58.7141448Z DIAG: Executing with parameters [--trace true --concurrent true --output /home/vsts/work/1/s/PerfResults --diagnostic ]
2020-02-24T21:44:58.7148431Z DIAG: Unparsed arguments [/home/vsts/work/1/s/src/Hocon.Tests.Performance/bin/Release/netcoreapp2.1/Hocon.Tests.Performance.dll, -- ,--output,/home/vsts/work/1/s/PerfResults,--concurrent,true,--trace,true,--diagnostic]
2020-02-24T21:44:58.7215226Z DIAG: Captured, but unrecognized arguments: --output:[/home/vsts/work/1/s/PerfResults],--concurrent:[true],--trace:[true],--diagnostic:[]
2020-02-24T21:44:58.7308277Z 
2020-02-24T21:44:58.7472094Z Unhandled Exception: System.ComponentModel.Win32Exception: Permission denied
2020-02-24T21:44:58.7472917Z    at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass value)
2020-02-24T21:44:58.7473593Z    at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value)
2020-02-24T21:44:58.7474197Z    at NBench.Sdk.TestRunner.SetProcessPriority(Boolean concurrent)
2020-02-24T21:44:58.7474646Z    at NBench.Sdk.TestRunner.Execute()
2020-02-24T21:44:58.7475093Z    at NBench.NBenchRunner.Run[TType]()
2020-02-24T21:44:58.7475749Z    at Hocon.Tests.Performance.Program.Main(String[] args) in /home/vsts/work/1/s/src/Hocon.Tests.Performance/Program.cs:line 9
2020-02-24T21:44:58.8733268Z Running build failed.
2020-02-24T21:44:58.8733871Z Error:
@Aaronontheweb Aaronontheweb added bug benchmark-execution Execution and discovery engine for the NBench SDK labels Feb 24, 2020
@Aaronontheweb Aaronontheweb added this to the 2.0.1 milestone Feb 24, 2020
@Aaronontheweb Aaronontheweb self-assigned this Feb 24, 2020
@Aaronontheweb
Copy link
Member Author

Need to make this check:

if (!IsMono)
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;

Work for Linux as a platform, not just Mono.

Aaronontheweb added a commit to Aaronontheweb/NBench that referenced this issue Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark-execution Execution and discovery engine for the NBench SDK bug
Projects
None yet
Development

No branches or pull requests

1 participant