Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947137 - gui-apps/sfwbar-1.0_beta16 not appearing and very high CPU usage when built with -flto
Summary: gui-apps/sfwbar-1.0_beta16 not appearing and very high CPU usage when built w...
Status: UNCONFIRMED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: GURU project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-28 22:01 UTC by Linthalo
Modified: 2024-12-29 10:31 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,132.80 KB, text/x-log)
2024-12-28 22:02 UTC, Linthalo
Details
emerge --info (emerge_info,17.95 KB, text/plain)
2024-12-28 22:04 UTC, Linthalo
Details
build.log with Werror enabled (build.log,138.07 KB, text/x-log)
2024-12-28 23:20 UTC, Linthalo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Linthalo 2024-12-28 22:01:57 UTC
Building the beta16 version with -flto leads to the bar either not appearing at all or only after a long time. The cpu usage is very high as well (6.2% in btop). Building without -flto but with -O3 -fno-semantic-interposition works, and sane default flags (-O2 -march=native -pipe) work as well. beta15 had no issues with -flto. The package compiles successfully no matter what. Starting sfwbar in a terminal reports no issues.

Reproducible: Always

Steps to Reproduce:
1.Build with -flto
2.Start sfwbar
Actual Results:  
Sfwbar fails to appear although the process has started. I've had it appear but only after about a minute. The CPU usage is unusually high with 6.2% reported on btop, even more on my laptop. 

Expected Results:  
Appear almost immediately, like in beta15.
Comment 1 Linthalo 2024-12-28 22:02:25 UTC
Created attachment 915397 [details]
build.log

no errors
Comment 2 Linthalo 2024-12-28 22:04:07 UTC
Created attachment 915398 [details]
emerge --info
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-28 22:59:29 UTC
If you use the -Werror flags from https://wiki.gentoo.org/wiki/LTO#Enable_LTO, could you share the new build.log?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-28 23:00:58 UTC
diff b/t beta15 + beta16: https://github.com/LBCrion/sfwbar/compare/v1.0_beta15...v1.0_beta16

It might be useful if you could:
a) attach gdb when it's been stuck for 20 or 30 seconds (gdb -p ... then 'bt')
b) perf record -g ... then perf report when it's stuck
Comment 5 Linthalo 2024-12-28 23:20:50 UTC
Created attachment 915411 [details]
build.log with Werror enabled
Comment 6 Linthalo 2024-12-29 10:27:15 UTC
gdb:

0  0x00007f2b704673de in g_hash_table_lookup () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f2b704addc8 in g_scanner_scope_add_symbol () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f2b71208ce9 in expr_parse () at /usr/lib64/sfwbar/libsfwbar.so
#3  0x00007f2b71214d66 in ??? () at /usr/lib64/sfwbar/libsfwbar.so
#4  0x00007f2b7120ab29 in trigger_emit_in_main_context ()
    at /usr/lib64/sfwbar/libsfwbar.so
#5  0x00007f2b7048b755 in g_main_context_invoke_full () at /usr/lib64/libglib-2.0.so.0
#6  0x00007f2b6c3b6db0 in ??? () at /usr/lib64/sfwbar/network.so
#7  0x00007f2b7048794a in ??? () at /usr/lib64/libglib-2.0.so.0
#8  0x00007f2b70512e5d in ??? () at /usr/lib64/libglib-2.0.so.0
#9  0x00007f2b70486165 in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#10 0x00007f2b7074345d in g_application_run () at /usr/lib64/libgio-2.0.so.0
#11 0x000055ba92ed07b8 in main ()

For perf I get "Failed to collect 'cycles:Pu' for the '12872' workload: No such file or directory", presumably because I got all the debug kernel stuff disabled. If there isn't anything useful in the gdb attach I'll reenable the debug kernel options.
Comment 7 Linthalo 2024-12-29 10:31:07 UTC
I still get perf.data but when I report it fails to process the sample.