Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 784539 - sys-libs/libomp-12.0.0 USE=cuda: ACCESS DENIED: open_wr: /dev/nvidiactl
Summary: sys-libs/libomp-12.0.0 USE=cuda: ACCESS DENIED: open_wr: /dev/nvidiactl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-04-20 19:45 UTC by Bernd
Modified: 2023-04-14 17:59 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info-libomp-12.0.0.txt (emerge-info-libomp-12.0.0.txt,14.69 KB, text/plain)
2021-04-20 19:47 UTC, Bernd
Details
libomp-12.0.0:20210420-123321.log (libomp-12.0.0:20210420-123321.log,14.12 KB, text/plain)
2021-04-20 19:47 UTC, Bernd
Details
non-failing build.log (build.log,89.04 KB, text/x-log)
2021-04-20 20:55 UTC, Miroslav Šulc
Details
ebuild patch (omp.patch,438 bytes, patch)
2021-04-20 21:27 UTC, Michał Górny
Details | Diff
libomp-12.0.0.patch (libomp-12.0.0.patch,796 bytes, patch)
2021-04-21 06:07 UTC, Bernd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd 2021-04-20 19:45:17 UTC
Several sandbox failures happen during configuration stage when cuda USE flag is enabled.

-- Found LIBOMPTARGET_DEP_LIBFFI: /usr/lib64/libffi.so  
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
 * ACCESS DENIED:  open_wr:      /dev/nvidiactl
-- Automatic GPU detection failed. Building for common architectures.


Reproducible: Always




emerge --info attached due to comment size limit.
Comment 1 Bernd 2021-04-20 19:47:05 UTC
Created attachment 701319 [details]
emerge-info-libomp-12.0.0.txt

output of emerge --info libomp
Comment 2 Bernd 2021-04-20 19:47:38 UTC
Created attachment 701322 [details]
libomp-12.0.0:20210420-123321.log

build log
Comment 3 Miroslav Šulc gentoo-dev 2021-04-20 20:55:08 UTC
Created attachment 701343 [details]
non-failing build.log

i cannot trigger this issue. in my case i get "-- check-openmp does nothing." and the compilation goes on.
Comment 4 Bernd 2021-04-20 21:08:04 UTC
(In reply to Miroslav Šulc from comment #3)
> i cannot trigger this issue. in my case i get "-- check-openmp does
> nothing." and the compilation goes on.

Need to test your configuration...

What happens if you enable USE=offload as well? I have this enabled by default and the metadata.xml says for it's cuda entry, cuda needs offload to be enabled. Haven't verified this, but if it's true, there should probably a REQUIRED_USE dependency added for it as well.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-04-20 21:27:53 UTC
Created attachment 701346 [details, diff]
ebuild patch

Could you try applying this change to the ebuild?
Comment 6 Ionen Wolkens gentoo-dev 2021-04-21 02:25:43 UTC
Comment on attachment 701346 [details, diff]
ebuild patch

addpretend /dev/nvidiactl

Typo, should be "addpredict".

I don't currently have cuda stuff setup to test myself though.
Comment 7 Ionen Wolkens gentoo-dev 2021-04-21 03:07:59 UTC
(In reply to Ionen Wolkens from comment #6)
> I don't currently have cuda stuff setup to test myself though.
Scratch that, I do now and could reproduce with same USE.

"addpredict /dev/nvidiactl" works as expected for me.
Comment 8 Bernd 2021-04-21 05:37:32 UTC
(In reply to Michał Górny from comment #5)
> Created attachment 701346 [details, diff] [details, diff]
> ebuild patch
> 
> Could you try applying this change to the ebuild?

Adding the addpredict statement works for me too.


(In reply to Bernd from comment #4)
> default and the metadata.xml says for it's cuda entry, cuda needs offload to
> be enabled. Haven't verified this, but if it's true, there should probably a
> REQUIRED_USE dependency added for it as well.

What about this mention in metadata.xml? Should we add a 
REQUIRED_USE=cuda? ( offload ) 
as well?
Comment 9 Bernd 2021-04-21 06:04:13 UTC
(In reply to Miroslav Šulc from comment #3)
> Created attachment 701343 [details]
> non-failing build.log
> 
> i cannot trigger this issue. in my case i get "-- check-openmp does
> nothing." and the compilation goes on.

I can confirm, your configuration of USE="-offload cuda" does not trigger this. Probably due to USE=cuda does nothing without USE=offload, as noted in metadata.xml?
Comment 10 Bernd 2021-04-21 06:07:35 UTC
Created attachment 701361 [details, diff]
libomp-12.0.0.patch

I tried this patch, and it worked as expected on my machine.
Comment 11 Larry the Git Cow gentoo-dev 2021-04-21 07:00:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2dd91d7e6fae86d831e9231ddda11d03a366a02

commit f2dd91d7e6fae86d831e9231ddda11d03a366a02
Author:     Ionen Wolkens <sudinave@gmail.com>
AuthorDate: 2021-04-21 06:47:35 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-04-21 07:00:29 +0000

    sys-libs/libomp: fix /dev/nvidiactl sandbox issues with cuda+offload
    
    Closes: https://bugs.gentoo.org/784539
    Signed-off-by: Ionen Wolkens <sudinave@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/20483
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-libs/libomp/libomp-12.0.0.9999.ebuild | 3 ++-
 sys-libs/libomp/libomp-12.0.0.ebuild      | 1 +
 sys-libs/libomp/libomp-13.0.0.9999.ebuild | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)