<?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>16283</bug_id>
          
          <creation_ts>2026-05-15 08:31:53 +0000</creation_ts>
          <short_desc>AB-INT: ruby do_compile: Bus Error</short_desc>
          <delta_ts>2026-08-11 08:18:08 +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>FIXED</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>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Paul Barker">paul</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</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>105454</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-05-15 08:31:53 +0000</bug_when>
    <thetext>We got this error once, a few days ago.


ERROR: lib32-ruby-4.0.3-r0 do_compile: Execution of &apos;/srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/temp/run.do_compile.246705&apos; failed with exit code 1
...
| compiling ../../../sources/ruby-4.0.3/ext/openssl/ossl_x509attr.c
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/build/i686-linux-gnu-fake.rb: [BUG] Bus Error at 0x00007fb9686ec000
| ruby 4.0.3 (2026-04-21 revision 85ddef263a) +PRISM [x86_64-linux-gnu]
| 
| -- Control frame information -----------------------------------------------
| c:0003 p:---- s:0009 e:000008 l:y b:---- DUMMY  [FINISH]
| c:0002 p:---- s:0006 e:000005 l:y b:---- CFUNC  :require
| c:0001 p:0000 s:0003 E:0004f0 l:y b:---- DUMMY  [FINISH]
| 
| -- Ruby level backtrace information ----------------------------------------
| ../../../../../../sources/ruby-4.0.3/tool/ln_sr.rb:0:in &apos;require&apos;
| 
| -- Threading information ---------------------------------------------------
| Total ractor count: 1
| Ruby thread count for this ractor: 1
| 
| -- Machine register context ------------------------------------------------
|  RIP: 0x00007fb96815b035 RBP: 0x0000000000000000 RSP: 0x00007ffd5ffeca90
|  RAX: 0x00007fb9686ec000 RBX: 0x00007ffd5ffecea8 RCX: 0x00005636bd391e88
|  RDX: 0x0000000000000000 RDI: 0x00007ffd5ffecea8 RSI: 0x00007ffd5ffece78
|   R8: 0x00005636bd391dc0  R9: 0x00000000000002b8 R10: 0x000000000000002a
|  R11: 0x00007fb967c9eac8 R12: 0x00007fb9686ec000 R13: 0x00007ffd5ffecbb0
|  R14: 0x00007ffd5ffecdf0 R15: 0x0000000000000786 EFL: 0x0000000000010206
| 
| -- C level backtrace information -------------------------------------------
| i686-linux-gnu-fake.rb updated
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb9680d7268) [0x7fb9680d7268]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb967f15b9a) [0x7fb967f15b9a]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb9680373d2) [0x7fb9680373d2]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/sysroots-uninative/x86_64-linux/lib/libc.so.6(0x7fb967afc8e0) [0x7fb967afc8e0]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb96815b035) [0x7fb96815b035]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb967ee32b1) [0x7fb967ee32b1]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb967f74cc5) [0x7fb967f74cc5]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb967f7686a) [0x7fb967f7686a]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb967f768f8) [0x7fb967f768f8]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(rb_require_string+0x27) [0x7fb967f76f47]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb9680c6b0e) [0x7fb9680c6b0e]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(rb_funcallv+0x213) [0x7fb9680ca783]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb96802a00f) [0x7fb96802a00f]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(0x7fb96802bdb2) [0x7fb96802bdb2]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(ruby_process_options+0xc0) [0x7fb96802c120]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/../lib/libruby.so.4.0(ruby_options+0xb5) [0x7fb967f1f375]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/ruby(0x5636b79700ea) [0x5636b79700ea]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/sysroots-uninative/x86_64-linux/lib/libc.so.6(0x7fb967ae6fab) [0x7fb967ae6fab]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/sysroots-uninative/x86_64-linux/lib/libc.so.6(__libc_start_main+0x8b) [0x7fb967ae70cb]
| /srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.3/recipe-sysroot-native/usr/bin/ruby(_start+0x21) [0x5636b7970121]
| 
| -- Other runtime information -----------------------------------------------
| 
| * Loaded script: ../../../../../../sources/ruby-4.0.3/tool/ln_sr.rb
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105460</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-05-15 08:53:21 +0000</bug_when>
    <thetext>qemux86-world debian12-vk-7 mathieu/master-next&amp;mathieu/master-next-tests completed at 2026-05-10 09:48:43+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/3762/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105521</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-05-21 14:33:45 +0000</bug_when>
    <thetext>could be lack of memory, let&apos;s see if it happens again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106153</commentid>
    <comment_count>3</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-07-10 13:39:33 +0000</bug_when>
    <thetext>qemux86-world ubuntu2504-vk-1 master completed at 2026-07-10 03:05:25+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/4134/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106331</commentid>
    <comment_count>4</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-07-24 15:11:41 +0000</bug_when>
    <thetext>qemux86-world debian13-vk-1 mathieu/master-next completed at 2026-07-23 13:11:07+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/4220/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106401</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-07-31 09:21:04 +0000</bug_when>
    <thetext>&quot;Bus Error&quot; indicates SIGBUS was received, this is not an out-of-memory error.

The build log from 2026-07-23 shows the failing address is 0x00007fee11f02765, inside the memory mapping of the file &quot;/srv/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ruby/4.0.5/build/i686-linux-gnu-fake.rb&quot;.

This is likely a race condition or missing dependency in ruby&apos;s Makefiles, leading to i686-linux-gnu-fake.rb being re-written by one process while another process is trying to parse it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106408</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-07-31 15:18:21 +0000</bug_when>
    <thetext>Partial fix landed upstream: https://github.com/ruby/ruby/commit/bb235bddd4ce7d9e73a80931782f0f0b3971d12b

Further testing showed this wasn&apos;t a complete fix, so I opened another PR: https://github.com/ruby/ruby/pull/18141

I&apos;m pretty confident that this is now fully solved:
- Before applying the above we have 3 instances of &quot;generating i686-linux-gnu-fake.rb&quot; in log.do_compile for ruby.
- After applying the above we have just 1 instance :)

Upstream are responsive so I&apos;ll wait until they&apos;ve reviewed the second PR before I send patches for OE-core.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106488</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-08-11 08:18:08 +0000</bug_when>
    <thetext>Fix merged to OE-core in commit 074a5d9c4dd225811f22ea5552029c54bd1423cd. Hopefully that resolves the issue, reopen if the failure happens again.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>