Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 780480 - dev-libs/rocr-runtime-4.1.0 emits verbose warnings
Summary: dev-libs/rocr-runtime-4.1.0 emits verbose warnings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2021-04-06 01:22 UTC by Matthew "Archer" Vaughn
Modified: 2021-04-08 19:18 UTC (History)
3 users (show)

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


Attachments
output of emerge --info dev-libs/rocr-runtime (emerge-info.txt,15.11 KB, text/plain)
2021-04-06 01:22 UTC, Matthew "Archer" Vaughn
Details
proposed ebuild (rocr-runtime-4.1.0-r1.ebuild,1.56 KB, text/plain)
2021-04-06 01:23 UTC, Matthew "Archer" Vaughn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew "Archer" Vaughn 2021-04-06 01:22:41 UTC
Created attachment 697836 [details]
output of emerge --info dev-libs/rocr-runtime

During the execution of an OpenCL application (in my case, reliably those of certain BOINC GPU projects, such as the Collatz Sieve application), the following warning may be emitted at a high frequency to stderr:

```
Warning: (!g_use_interrupt_wait || isIPC()) && "Use of non-host signal in host signal wait API." in virtual hsa_signal_value_t rocr::core::BusyWaitSignal::WaitRelaxed(hsa_signal_condition_t, hsa_signal_value_t, uint64_t, hsa_wait_state_t), /var/tmp/portage/dev-libs/rocr-runtime-4.1.0/work/ROCR-Runtime-rocm-4.1.0/src/core/runtime/default_signal.cpp:87
```

Although the warning itself appears to be harmless, the volume of text emitted to stderr can cause the total output size of a BOINC task to exceed its predefined limits, in turn causing the task to be aborted.

This behavior was recently reported to the maintainers of the ROCm PKGBUILD collection for Arch Linux here: https://github.com/rocm-arch/rocm-arch/issues/585

When the behavior was reported upstream, it was discovered that the warning message is the intended output of this debug function: https://github.com/RadeonOpenCompute/ROCR-Runtime/blob/master/src/core/runtime/default_signal.cpp#L87

Since this behavior is controlled by a debug function, the unwanted output can be suppressed by the addition of -DNDEBUG to the compiler flags. This is the approach taken by the Arch Linux package maintainers.

I am attaching a proposed ebuild that accepts the "debug" USE flag; if this flag is unset, it will set mycmakeargs=(-DCMAKE_CXX_FLAGS='-DNDEBUG') during src_configure(). Thus the debug USE flag can be used to restore the suppressed output.
Comment 1 Matthew "Archer" Vaughn 2021-04-06 01:23:26 UTC
Created attachment 697839 [details]
proposed ebuild
Comment 2 Craig Andrews gentoo-dev 2021-04-08 19:18:02 UTC
Thank you!
Comment 3 Larry the Git Cow gentoo-dev 2021-04-08 19:18:21 UTC
The bug has been closed via the following commit(s):

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

commit 46cc53d53d30eee0e4a241efb9c640b5aefb4695
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2021-04-08 19:17:51 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2021-04-08 19:18:16 +0000

    dev-libs/rocr-runtime: add debug USE flag
    
    Closes: https://bugs.gentoo.org/780480
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild |  6 ++++++
 dev-libs/rocr-runtime/rocr-runtime-9999.ebuild  | 12 +++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)