Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 928149

Summary: sys-libs/libomp-17.0.6 * ACCESS DENIED: fopen_wr: /proc/self/task/2173/comm CUDA error: OS call failed or operation not supported on this OS
Product: Gentoo Linux Reporter: Arniii <lg3dx6fd>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Status: RESOLVED FIXED    
Severity: normal CC: dememax, lg3dx6fd, llvm, mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=928148
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log . Setup : profile 17.1 desktop plasma stable gcc + -O3 + lto + march=native but verbose + graphite + -ggdb3 . A notebook with intel's iGPU and Nvidia's GeForce RTX 4070 laptop .
libomp-17.0.6 ACCESS DENIED fopen_wr llvm/17 nvptx-arch
Proposed patch

Description Arniii 2024-03-30 03:29:17 UTC
Created attachment 889030 [details]
build.log . Setup : profile 17.1 desktop plasma stable gcc + -O3 + lto + march=native but verbose + graphite + -ggdb3 . A notebook with intel's iGPU and Nvidia's GeForce RTX 4070 laptop  .

...
-- Found LIBOMPTARGET_DEP_LIBFFI: /usr/lib64/libffi.so
 * ACCESS DENIED:  fopen_wr:           /proc/self/task/2173/comm
CUDA error: OS call failed or operation not supported on this OS
...
...

 * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY -----------------------
 * LOG FILE: "/var/tmp/portage/sys-libs/libomp-17.0.6/temp/sandbox.log"
 *
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: fopen_wr
S: deny
P: /proc/self/task/2173/comm
A: /proc/self/task/2173/comm
R: /proc/2172/task/2173/comm
C: /usr/lib/llvm/17/bin/nvptx-arch
 * --------------------------------------------------------------------------------
...

Tried to build this without lto, though still the same
Comment 1 Arniii 2024-03-30 03:31:10 UTC
Maybe it has a relationship to next bug: https://bugs.gentoo.org/926612
Comment 2 Maxim P. Dementiev 2024-04-21 16:52:48 UTC
Created attachment 891272 [details]
libomp-17.0.6 ACCESS DENIED fopen_wr llvm/17 nvptx-arch

I've got the same problem on my gentoo after switching to gcc-14
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-04-21 17:00:43 UTC
Created attachment 891274 [details, diff]
Proposed patch

Could you try if this patch fixes the issue for you?
Comment 4 Maxim P. Dementiev 2024-04-21 23:38:29 UTC
(In reply to Michał Górny from comment #3)
> Created attachment 891274 [details, diff] [details, diff]
> Proposed patch
> 
> Could you try if this patch fixes the issue for you?

The patch works for me!
Comment 5 Larry the Git Cow gentoo-dev 2024-04-22 03:40:30 UTC
The bug has been closed via the following commit(s):

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

commit f2f7a9615fad47260a47d6fc398acdb896f6cd7a
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-04-22 03:20:57 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-04-22 03:40:17 +0000

    sys-libs/libomp: Disable GPU autodetection in 17.0.6 too
    
    Closes: https://bugs.gentoo.org/928149
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-libs/libomp/libomp-17.0.6.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)