Summary: | sys-devel/gcc: ICE when building media-libs/libjxl in function 'bool jxl_skcms_Parse(const void*, size_t, skcms_ICCProfile*)': at skcms/skcms.cc:1004:6 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tt_1 <herrtimson> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | dnovomesky, proxy-maint |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106466 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
compressed build log
compressed preprocessed source output from emerge --info |
Description
tt_1
2022-08-02 05:39:41 UTC
Created attachment 796735 [details]
compressed preprocessed source
Its very difficult for me to nail this bug down: it has a chance of about 1/7 to 1/5 to be triggered, so if I repeat the compile ten times in a row its going to show up at least once. this sort of heisenbug behavior gives me a headace, especially as I've talked to the gcc devs and they were unable to reproduce this with the preprocessed sources and their cross compiler setups. so, I'm actually asking if some of the toolchain people is able to guide me a bit maybe in how to use valgrind maybe? I'm not a dev obviously, and not anywhere close to being a compiler expert as well, so feel a bit lost. I wasn't lazy and did some extensive testing, the ICE was introduced with this bugfix: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105998 - possibly incomplete fix then? all upstream discussion is in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106466 Created attachment 796738 [details]
output from emerge --info
I think you'd be best to just report upstream with what you know, and comment on the bug which introduced it to link to yours. yes, there is some progress in debugging this - valgrind shows a memory leak and a possible problem with garbage collection. Now, I'm just an average user and not a compiler expert for a second - do you understand what the gcc dev is asking me here? I need some directions :D > I suspect this is a GC (garbage collection) issue. > It might be easier to reduce it using --param ggc-min-expand=1 --param ggc-min->heapsize=1 (and then moving them both to 0 afterwards). > https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction?highlight=%28reduce%29 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106466#c14 I think what they're saying is that if you add those flags to when you call gcc (they're CFLAGS), it might make the issue way more reproducible, so it's easier for you to then put it into cvise (see our wiki page) like this? LANG=C valgrind --leak-check=full /usr/bin/aarch64-unknown-linux-gnu-g++ --param ggc-min-expand=1 --param ggc-min-heapsize=1 -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/third_party/skcms -O2 -pipe -save-temps -fno-rtti -funwind-tables -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fmacro-prefix-map=/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999=. -Wno-builtin-macro-redefined -Wall -Wno-psabi -DJPEGXL_BUNDLE_SKCMS=1 -include /var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/third_party/../lib/jxl/enc_jxl_skcms.h -std=c++11 -MD -MT third_party/CMakeFiles/skcms-obj.dir/skcms/skcms.cc.o -MF third_party/CMakeFiles/skcms-obj.dir/skcms/skcms.cc.o.d -o third_party/CMakeFiles/skcms-obj.dir/skcms/skcms.cc.o -c /var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/third_party/skcms/skcms.cc ( if it's correct - swaping to --param ggc-min-expand=0 --param ggc-min-heapsize=0 hangs for some 10 minutes - is that normal? ) That looks right. Does it fail a bit more often with that? Or always? As for hang: try without valgrind? I've never used those options so I'm unsure. I think it might be that we have to use =1 to do the reducing but play with =0 once reduced. there is no obvious change in ICE behavior when swapping --param ggc-min-expand=1 --param ggc-min-heapsize=1 to 0 , even the preprocessed file skcms.ii are identical, as in they have the same md5 checksum. would you like to see them nonetheless? |