<?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>15961</bug_id>
          
          <creation_ts>2025-09-01 08:02:15 +0000</creation_ts>
          <short_desc>AB-INT: qemuriscv64-tc: rust.RustSelfTestSystemEmulated.test_rust failure: kernel segfault</short_desc>
          <delta_ts>2026-07-28 08:02:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Functional (self) Testing</product>
          <component>oe-selftest</component>
          <version>unspecified</version>
          <rep_platform>RISCV</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Harish Sadineni">Harish.Sadineni</assigned_to>
          <cc>kexin.hao</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sundeep.kokkonda</cc>
    
    <cc>tgamblin</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>102674</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-09-01 08:02:15 +0000</bug_when>
    <thetext>A bit complicated to analyze logs.

I believe the main error is shown by:

runqemu - INFO - Host uptime: 386158.75
...
Reached login banner in 7.49 seconds (08/29/25 01:15:51)
Logged in as root in serial console
Data received serial thread [
Data received serial thread   356.779402] a
Data received serial thread [768]: unhandled signal 11 code 0x1 at 0x00
Data received serial thread 00000000000
Data received serial thread 000 in a[22
Data received serial thread 52,2ad23
Data received serial thread 49000+
Data received serial thread 4000]
Data received serial thread 
...

Which, when formatted correctly corresponds to:

[  356.779402] a[768]: unhandled signal 11 code 0x1 at 0x0000000000000000 in a[2252,2ad2349000+4000]
[  356.782704] CPU: 3 UID: 0 PID: 768 Comm: a Not tainted 6.12.42-yocto-standard #1
[  356.784291] Hardware name: riscv-virtio,qemu (DT)
[  356.785688] epc : 0000002ad234b252 ra : 0000002ad234b250 sp : 0000003fd51633c0
[  356.786809]  gp : 0000002ad234e800 tp : 0000003f87716760 t0 : 0000000000000030
[  356.788704]  t1 : 0000002ad234a57c t2 : ffffffffffffffc0 s0 : 0000002ad234f890
[  356.789628]  s1 : 0000000000000002 a0 : 0000000000000000 a1 : 0000000000000001
[  356.790383]  a2 : 0000002ad234f8c8 a3 : 0000000000000074 a4 : ffffffffffffc156
[  356.791571]  a5 : 0000000000000000 a6 : 0000000000000041 a7 : 0000000000000020
[  356.792464]  s2 : 0000002ad234f8e0 s3 : 0000002ad234f8e0 s4 : aaaaaaaaaaaaaaab
[  356.793579]  s5 : 0000000000000018 s6 : 8000000000000000 s7 : 0000000000000008
[  356.794349]  s8 : 0000003f87a0b008 s9 : 0000000000000003 s10: 0000003f8ef2a3b8
[  356.795824]  s11: 0000003feba39938 t3 : 0000003f87794740 t4 : ffffffffffffff8f
[  356.797162]  t5 : 0000000000000002 t6 : 0000000000000003
[  356.798134] status: 0000000200004020 badaddr: 0000000000000000 cause: 000000000000000f
[  356.799991] Code: f097 ffff 80e7 3320 ed01 0097 0000 80e7 5920 4585 (0023) 00b5 
[  381.471276] a[10345]: unhandled signal 4 code 0x1 at 0x0000002ac3346c7e in a[1c7e,2ac3345000+3000]
[  381.472952] CPU: 3 UID: 0 PID: 10345 Comm: a Not tainted 6.12.42-yocto-standard #1
[  381.473995] Hardware name: riscv-virtio,qemu (DT)
[  381.474606] epc : 0000002ac3346c7e ra : 0000002ac3346c7c sp : 0000003fe1e9ce10
[  381.476082]  gp : 0000002ac3349800 tp : 0000003f89828760 t0 : 0000000000000030
[  381.476926]  t1 : 0000002ac334616c t2 : ffffffffffffffc0 s0 : 0000002ac334a890
[  381.477792]  s1 : 0000000000000002 a0 : 0000000000000000 a1 : 000000000000006c
[  381.478727]  a2 : 0000002ac334a8c6 a3 : 000000000000006c a4 : ffffffffffffc7ca
[  381.480089]  a5 : 0000002ac334a8c6 a6 : 0000000000000041 a7 : 0000000000000020
[  381.480954]  s2 : 0000002ac334a8e0 s3 : 0000002ac334a8e0 s4 : aaaaaaaaaaaaaaab
[  381.481823]  s5 : 0000000000000018 s6 : 8000000000000000 s7 : 0000000000000006
[  381.482753]  s8 : 0000003f89b1d008 s9 : 0000000000000000 s10: 0000003f8e7653c8
[  381.483926]  s11: 0000003fe49f83f8 t3 : 0000003f898a6740 t4 : ffffffffffffff8f
[  381.484813]  t5 : 0000000000000002 t6 : 0000000000000003
[  381.485507] status: 0000000200004020 badaddr: 0000000000000000 cause: 0000000000000002
[  381.486579] Code: 0597 0000 8593 4205 4619 f097 ffff 80e7 4ec0 e511 (0000) 8963 
[  819.650890] run_with_small_[12890]: unhandled signal 11 code 0x1 at 0x0000003f91ffb1a0 in libc.so.6[7d2a4,3f98525000+148000]
[  819.653637] CPU: 1 UID: 0 PID: 12890 Comm: run_with_small_ Not tainted 6.12.42-yocto-standard #1
[  819.655259] Hardware name: riscv-virtio,qemu (DT)
[  819.656490] epc : 0000003f985a22a4 ra : 0000002aac6d3dec sp : 0000003f91ffb190
[  819.657875]  gp : 0000002aac740800 tp : 0000003f927fc820 t0 : 0000000000000000
[  819.659572]  t1 : 0000002aac6ce87c t2 : 0000000000000000 s0 : 0000000000000019
[  819.661108]  s1 : 0000003f91ffb1a0 a0 : 0000003f91ffb1a0 a1 : 0000000000000000
[  819.662469]  a2 : 0000000000100000 a3 : 0000003f920fb1a0 a4 : 0000000000000000
[  819.664088]  a5 : 0000003f91ffb1a0 a6 : 0000000000004000 a7 : 0000003f91ffb1a0
[  819.665444]  s2 : 0000003f927fb498 s3 : 0000003f927fb4b8 s4 : 0000003f94003730
[  819.666825]  s5 : 0000003f927fb400 s6 : 0000000000000003 s7 : 0000000000010000
[  819.668581]  s8 : 000000000000ffff s9 : 0000000000000002 s10: ffffffffffffffff
[  819.670120]  s11: 0000000000000020 t3 : 0000003f985a2260 t4 : 0000003f98670930
[  819.671757]  t5 : 0000000000000003 t6 : 0000003f7c000038
[  819.672822] status: 0000000200004020 badaddr: 0000003f91ffb1a0 cause: 000000000000000f
[  819.674261] Code: 962a 8e1d 5813 0066 0563 0208 1693 0068 96be 88be (e398) e798</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102675</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-09-01 08:02:45 +0000</bug_when>
    <thetext>qemuriscv64-tc fedora40-vk-4 master completed at 2025-08-29 02:06:48+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/58/builds/380/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103395</commentid>
    <comment_count>2</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-11-27 09:01:03 +0000</bug_when>
    <thetext>I had this one sitting in my failure stack for a few days and I&apos;m not really
sure what to do with it. It is arm64, but it might still be related to this one.
Or not...

qemuarm64-tc debian12-vk-5 master completed at 2025-11-21 03:24:09+00:00
https://valkyrie.yocto.io/pub/non-release/20251121-9/testresults/qemuarm64-tc/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/5/builds/2682/steps/13/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103424</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-11-27 18:10:04 +0000</bug_when>
    <thetext>Accidentally given to Trevor, move to TC team.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103934</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-01-15 16:38:14 +0000</bug_when>
    <thetext>Sundeep: from YP &quot;Bug Stomping meeting&quot;, please prioritize this defect.

The kernel has changed quite a bit so maybe it won&apos;t reproduce but we need data  on that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105105</commentid>
    <comment_count>5</comment_count>
    <who name="Harish Sadineni">Harish.Sadineni</who>
    <bug_when>2026-04-16 10:43:47 +0000</bug_when>
    <thetext>With Latest kernel version 6.18.19 also the issue is being reproduced.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105418</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-05-13 12:38:43 +0000</bug_when>
    <thetext>Hi Harish,

Do you have any further information on how this was reproduced? What command was run, was this on the autobuilder or on your own build environment, what was the host system and what was the command output?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105792</commentid>
    <comment_count>7</comment_count>
    <who name="Harish Sadineni">Harish.Sadineni</who>
    <bug_when>2026-06-10 07:17:28 +0000</bug_when>
    <thetext>We observed the below segfault in riscv64 when testing on our local server (cmd: oe-selftest -r rust.RustSelfTestSystemEmulated.test_rust -K)
The issue we see here is same as reprorted in this bug but at a different stage of build.
The bug reprorted segfault is with a testcase failure but in our case the segfault hapenning during the stage2 build.
 
Host information: 
Ubuntu 22.04.5 LTS (Jammy)
Architecture: x86_64
 
========= Error Text Begin =========
The following output was captured from the serial thread (formatted correctly):
[  702.343315] a[877]: unhandled signal 11 code 0x1 at 0x0000000000000000 in a[1ea8,2ae8ee4000+3000]
[  702.350031] CPU: 2 UID: 0 PID: 877 Comm: a Not tainted 6.18.28-yocto-standard #1 PREEMPT
[  702.351181] Hardware name: riscv-virtio,qemu (DT)
[  702.352035] epc : 0000002ae8ee5ea8 ra : 0000002ae8ee5ea6 sp : 0000003fd77e2230
[  702.358295]  gp : 0000002ae8ee8800 tp : 0000003f9e14a760 t0 : ffffffffffffffbf
[  702.359505]  t1 : 0000002ae8ee540c t2 : 00000000000000f4 s0 : 0000002ae8ee9d80
[  702.360536]  s1 : 0000000000000002 a0 : 0000000000000000 a1 : 0000000000000001
[  702.366502]  a2 : 0000002ae8ee9db8 a3 : 0000000000000074 a4 : 0000000000000000
[  702.367863]  a5 : 0000000000000000 a6 : 0000000000000041 a7 : 0000003f9e413ce0
[  702.368871]  s2 : 0000002ae8ee9dd0 s3 : 0000002ae8ee9dd0 s4 : aaaaaaaaaaaaaaab
[  702.373389]  s5 : 0000000000000018 s6 : 8000000000000000 s7 : 0000000000000008
[  702.374731]  s8 : 0000003f9e3e8aa8 s9 : 0000000000000000 s10: 0000000000000000
[  702.376243]  s11: 0000003fd77e2456 t3 : 0000003f9e1c9bec t4 : 0000000000000002
[  702.382148]  t5 : 0000000000000003 t6 : 00000000000000e0
[  702.383164] status: 0000000200004020 badaddr: 0000000000000000 cause: 000000000000000f
[  702.384520] Code: f097 ffff 80e7 56c0 ed01 0097 0000 80e7 70c0 4585 (0023) 00b5
[  742.545095] a[10583]: unhandled signal 4 code 0x1 at 0x0000002abe97a976 in a[1976,2abe979000+3000]
[  742.551965] CPU: 1 UID: 0 PID: 10583 Comm: a Not tainted 6.18.28-yocto-standard #1 PREEMPT
[  742.552655] Hardware name: riscv-virtio,qemu (DT)
[  742.553501] epc : 0000002abe97a976 ra : 0000002abe97a974 sp : 0000003ffe78f830
[  742.554485]  gp : 0000002abe97d800 tp : 0000003fb924b760 t0 : ffffffffffffffbf
[  742.555344]  t1 : 0000002abe97a08c t2 : 00000000000000f4 s0 : 0000002abe97ed80
[  742.556198]  s1 : 0000000000000002 a0 : 0000000000000000 a1 : 000000000000006c
[  742.556987]  a2 : 0000002abe97edb6 a3 : 000000000000006c a4 : 0000000000000000
[  742.558061]  a5 : 0000000000000000 a6 : 0000000000000041 a7 : 0000003fb9514ce0
[  742.558862]  s2 : 0000002abe97edd0 s3 : 0000002abe97edd0 s4 : aaaaaaaaaaaaaaab
[  742.559657]  s5 : 0000000000000018 s6 : 8000000000000000 s7 : 0000000000000006
[  742.560396]  s8 : 0000003fb94e9aa8 s9 : 0000000000000000 s10: 0000000000000000
[  742.561287]  s11: 0000003ffe78f9d6 t3 : 0000003fb92cabec t4 : 0000000000000002
[  742.562102]  t5 : 0000000000000003 t6 : 00000000000000e0
[  742.562696] status: 0000000200004020 badaddr: 0000000000000000 cause: 0000000000000002
[  742.563610] Code: 0597 0000 8593 5555 4619 f097 ffff 80e7 7140 e511 (0000) 8e63
 
========= Error Text End =========
 
The segfault failure from error message is due to: undefined reference to `__isoc23_strtoul&apos;
 
Additional observations:
We observed the segfaluts are happening when there is a test case failure in riscv64 - 
Ref: https://autobuilder.yoctoproject.org/valkyrie/?#/builders/58/builds/1608/steps/13/logs/stdio
 
In case of qemuarm64 with same test case failure there is no segfault:
Ref: https://autobuilder.yoctoproject.org/valkyrie/?#/builders/5/builds/3783/steps/13/logs/stdio
Based on these results, it looks like the segfault may be a RISC-V specific issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106354</commentid>
    <comment_count>8</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-07-28 08:02:30 +0000</bug_when>
    <thetext>qemuriscv64-tc debian13-vk-2 master completed at 2026-07-23 01:56:21+00:00
https://valkyrie.yocto.io/pub/non-release/20260723-8/testresults/qemuriscv64-tc/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/58/builds/1921/steps/13/logs/stdio</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>