<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15123</bug_id>
          
          <creation_ts>2023-05-18 19:53:41 +0000</creation_ts>
          <short_desc>AB-INT: gcc 12.3.1 segfault while building ccache - fedora 37 specific</short_desc>
          <delta_ts>2023-11-16 15:44:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandre Belloni">alexandre.belloni</reporter>
          <assigned_to name="Naveen Gowda">Naveen.Gowda</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>luca.ceresoli</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sundeep.kokkonda</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95559</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-05-18 19:53:41 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5185/steps/14/logs/stdio

| FAILED: src/CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o
| /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/hosttools/g++ -DUSE_XXH_DISPATCH -DXXH_STATIC_LINKING_ONLY -I/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/build -I/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src -isystem/home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -std=c++17 -include /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/build/config.h -Wall -MD -MT src/CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o -MF src/CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o.d -o src/CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o -c /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src/storage/local/LocalStorage.cpp
| In file included from /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src/storage/local/LocalStorage.cpp:25:
| /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src/storage/local/LocalStorage.cpp: In instantiation of ‘storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt; [with auto:39 = unsigned char; auto:40 = std::function&lt;void(double)&gt;]’:
| /usr/include/c++/12/type_traits:2559:26:   required by substitution of ‘template&lt;class _Fn, class ... _Args&gt; static std::__result_of_success&lt;decltype (declval&lt;_Fn&gt;()((declval&lt;_Args&gt;)()...)), std::__invoke_other&gt; std::__result_of_other_impl::_S_test(int) [with _Fn = storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;&amp;; _Args = {unsigned char, const std::function&lt;void(double)&gt;&amp;}]’
| /usr/include/c++/12/type_traits:2570:55:   required from ‘struct std::__result_of_impl&lt;false, false, storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;&amp;, unsigned char, const std::function&lt;void(double)&gt;&amp;&gt;’
| /usr/include/c++/12/bits/std_function.h:348:9:   recursively required by substitution of ‘template&lt;class _Result, class _Ret&gt; struct std::__is_invocable_impl&lt;_Result, _Ret, true, std::__void_t&lt;typename _CTp::type&gt; &gt; [with _Result = std::__invoke_result&lt;storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;&amp;, unsigned char, const std::function&lt;void(double)&gt;&amp;&gt;; _Ret = void]’
| /usr/include/c++/12/bits/std_function.h:348:9:   required from ‘struct std::function&lt;void(unsigned char, const std::function&lt;void(double)&gt;&amp;)&gt;::_Callable&lt;storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;, storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;, std::__invoke_result&lt;storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;&amp;, unsigned char, const std::function&lt;void(double)&gt;&amp;&gt; &gt;’
| /usr/include/c++/12/bits/std_function.h:353:8:   required by substitution of ‘template&lt;class _Res, class ... _ArgTypes&gt; template&lt;class _Cond, class _Tp&gt; using _Requires = std::__enable_if_t&lt;_Cond::value, _Tp&gt; [with _Cond = std::function&lt;void(unsigned char, const std::function&lt;void(double)&gt;&amp;)&gt;::_Callable&lt;storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;, storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;, std::__invoke_result&lt;storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;&amp;, unsigned char, const std::function&lt;void(double)&gt;&amp;&gt; &gt;; _Tp = void; _Res = void; _ArgTypes = {unsigned char, const std::function&lt;void(double)&gt;&amp;}]’
| /usr/include/c++/12/bits/std_function.h:434:9:   required by substitution of ‘template&lt;class _Functor, class _Constraints&gt; std::function&lt;void(unsigned char, const std::function&lt;void(double)&gt;&amp;)&gt;::function(_Functor&amp;&amp;) [with _Functor = storage::local::LocalStorage::recompress(std::optional&lt;signed char&gt;, uint32_t, const storage::local::ProgressReceiver&amp;)::&lt;lambda(const auto:39&amp;, const auto:40&amp;)&gt;; _Constraints = &lt;missing&gt;]’
| /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src/storage/local/LocalStorage.cpp:701:24:   required from here
| /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src/Logging.hpp:33:7: internal compiler error: Segmentation fault
|    33 |       Logging::log(std::string_view(message_));                                \
|       |       ^~~~~~~
| /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src/Logging.hpp:39:27: note: in expansion of macro ‘LOG_RAW’
|    39 | #define LOG(format_, ...) LOG_RAW(fmt::format(FMT_STRING(format_), __VA_ARGS__))
|       |                           ^~~~~~~
| /home/pokybuild/yocto-worker/oe-selftest-fedora/build/build-st-2675876/tmp/work/x86_64-linux/ccache-native/4.8-r0/ccache-4.8/src/storage/local/LocalStorage.cpp:710:13: note: in expansion of macro ‘LOG’
|   710 |             LOG(&quot;Failed to acquire content lock for {}/{}&quot;, l1_index, l2_index);
|       |             ^~~
| Please submit a full bug report, with preprocessed source.
| See &lt;http://bugzilla.redhat.com/bugzilla&gt; for instructions.
| Preprocessed source stored into /tmp/ccCNaot3.out file, please attach this to your bugreport.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95560</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-05-18 19:55:32 +0000</bug_when>
    <thetext>/tmp/ccCNaot3.out and build-st-2675876 are saved in bug-15123 on fedora37-ty-2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95591</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-05-25 14:38:07 +0000</bug_when>
    <thetext>Please report to Fedora and see if they can fix it since it&apos;s a host gcc bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95593</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-05-25 14:46:31 +0000</bug_when>
    <thetext>The &quot;good&quot; news is that this replicates on demand.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95632</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-06-05 16:48:52 +0000</bug_when>
    <thetext>Filed https://bugzilla.redhat.com/show_bug.cgi?id=2212474.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95698</commentid>
    <comment_count>5</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-06-09 17:52:33 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5244/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95902</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-07-11 10:44:04 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5432/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95965</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-07-19 14:41:04 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5338/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95969</commentid>
    <comment_count>8</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-07-19 16:59:46 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5346/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95979</commentid>
    <comment_count>9</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-07-19 22:57:30 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5490/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95993</commentid>
    <comment_count>10</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-07-20 14:42:15 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5314/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96003</commentid>
    <comment_count>11</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-07-20 17:43:26 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5325/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96168</commentid>
    <comment_count>12</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-08-02 15:39:54 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5537/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96171</commentid>
    <comment_count>13</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-08-02 19:47:52 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5542/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96307</commentid>
    <comment_count>14</comment_count>
    <who name="Luca Ceresoli">luca.ceresoli</who>
    <bug_when>2023-08-25 14:40:26 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5643/steps/14/logs/stdio

oe-selftest-fedora on fedora37-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96528</commentid>
    <comment_count>15</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-09-20 22:17:41 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5726/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97037</commentid>
    <comment_count>16</comment_count>
    <who name="Naveen Gowda">Naveen.Gowda</who>
    <bug_when>2023-10-30 11:41:59 +0000</bug_when>
    <thetext>The issue has been fixed in gcc trunk and gcc-12
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109241</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97039</commentid>
    <comment_count>17</comment_count>
    <who name="Naveen Gowda">Naveen.Gowda</who>
    <bug_when>2023-10-30 12:49:44 +0000</bug_when>
    <thetext>Master branch has gcc-13 and the patch is present in yocto source.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97040</commentid>
    <comment_count>18</comment_count>
    <who name="Naveen Gowda">Naveen.Gowda</who>
    <bug_when>2023-10-30 12:49:44 +0000</bug_when>
    <thetext>Master branch has gcc-13 and the patch is present in yocto source.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97041</commentid>
    <comment_count>19</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-10-30 14:19:39 +0000</bug_when>
    <thetext>This is building ccache-native using gcc from the host system so the Yocto Project version of gcc won&apos;t help here unfortunately</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97171</commentid>
    <comment_count>20</comment_count>
    <who name="Naveen Gowda">Naveen.Gowda</who>
    <bug_when>2023-11-01 02:58:48 +0000</bug_when>
    <thetext>Thanks very much for the clarification.

I am trying to reproduce the issue on Fedora-38 without much luck. 
Linux yow-fedora-builder1 6.5.7-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 11 04:07:58 UTC 2023 x86_64 GNU/Linux

Its using the gcc-13 which probably has the fix
/usr/bin/gcc --version
gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)

As I understand, the solution to the issue is upgrading host gcc to latest version gcc-13 which has the patch. Can you please let me know if its right?

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97172</commentid>
    <comment_count>21</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-11-01 13:12:36 +0000</bug_when>
    <thetext>Naveen, no the solution has to only involve changes in bitbake/oe-core or sending a patch to Fedora (37) to fix this issue. Have you tried to reproduce the issue in a F37 docker container? I has never been seen in Fedora 38.

F37 is almost at EOL, based on this trend: 
   https://docs.fedoraproject.org/en-US/releases/eol/
but it&apos;s possible that it would be the basis of RHEL 10:
   https://docs.fedoraproject.org/en-US/quick-docs/fedora-and-red-hat-enterprise-linux/index.html

See if you can make progress using a F37 container but otherwise, it may be best to just wait this out until the F37 EOL date and resolve the issue as obsolete.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97178</commentid>
    <comment_count>22</comment_count>
    <who name="Naveen Gowda">Naveen.Gowda</who>
    <bug_when>2023-11-02 10:20:05 +0000</bug_when>
    <thetext>Hi Randy,

Thanks for the detailed clarification about the status and issue.

Naveen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97264</commentid>
    <comment_count>23</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-11-16 15:44:12 +0000</bug_when>
    <thetext>Fedora 37 is EOL and this bug was only seen in that distro.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>