<?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>14511</bug_id>
          
          <creation_ts>2021-08-17 07:07:38 +0000</creation_ts>
          <short_desc>siginfo files in sstate using the wrong hash (probably from hashequiv)</short_desc>
          <delta_ts>2025-09-26 16:04:19 +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>oe-core other</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frans Meulenbroeks">fransmeulenbroeks</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>yoann.congal</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>91192</commentid>
    <comment_count>0</comment_count>
    <who name="Frans Meulenbroeks">fransmeulenbroeks</who>
    <bug_when>2021-08-17 07:07:38 +0000</bug_when>
    <thetext>When analyzing sstate-cache I noticed that some files are in the wrong dir.
My state cache had 98137 files and two files were duplicated, one copy being at the wrong location. It may be that some other files are also in the wrong location but not in the proper one.

These are the two clashes:

-rwxrwxrwx 2 1000 pokyuser 152515 Aug 10 06:49 sstate-cache/e3/8e/sstate:packagegroup-core-boot:jetson_xavier_nx_devkit_emmc-sorama-linux:1.0:r17:jetson_xavier_nx_devkit_emmc:3:e38e75d208a25e2ab119169477b01a0b7a889532e42853185d6a155e0aeee5c5_package.tgz.siginfo
-rwxrwxrwx 1 1000 pokyuser 152515 Aug 10 06:47 sstate-cache/f9/fc/sstate:packagegroup-core-boot:jetson_xavier_nx_devkit_emmc-sorama-linux:1.0:r17:jetson_xavier_nx_devkit_emmc:3:e38e75d208a25e2ab119169477b01a0b7a889532e42853185d6a155e0aeee5c5_package.tgz.siginfo

Note that the first one is in the e3/8e folder which is correct looking at the filename. The second one is in the folder f9/fc. No idea how it landed up there

-rwxrwxrwx 2 1000 pokyuser 1963 Jul 28 09:25 sstate-cache/a0/be/sstate:soramawebinterface-l642vx::1.0+gitAUTOINC+d1d4664093:r0::3:e4976edcbecd740ebf0d35355641d29600328bec5a569d4ef7546ff282a4fe24_fetch.tgz.siginfo
-rwxrwxrwx 1 1000 pokyuser 1963 Jul 28 06:34 sstate-cache/e4/97/sstate:soramawebinterface-l642vx::1.0+gitAUTOINC+d1d4664093:r0::3:e4976edcbecd740ebf0d35355641d29600328bec5a569d4ef7546ff282a4fe24_fetch.tgz.siginfo

Here the first file is in the a0/be folder which is wrong. The second one is in the e4/97 folder which is correct according to the hash in the filename</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91199</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Meulenbroeks">fransmeulenbroeks</who>
    <bug_when>2021-08-17 10:55:45 +0000</bug_when>
    <thetext>*** Bug 14514 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91222</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2021-08-19 14:58:18 +0000</bug_when>
    <thetext>I wrote a little script to look for files in the wrong directory and ran it on my local sstate.  It found 12 files (out of 128GB of sstate).

For example:

7a/9b/sstate:gcc::11.1.0:r0::3:6051b86bc3b9fc3d6e045f6d5a007ff13eff6f8f87359b2488a9e31b4fb807d5_fetch.tgz.siginfo

They were all .siginfo files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91233</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-08-19 15:38:07 +0000</bug_when>
    <thetext>Borrowing Ross&apos; script I see many in my local sstate, also all siginfo files for non-sstate tasks. This pinpoints the code responsible, likely when hash equiv is active.

richard@jet:/media/build1/poky/build/tmp/work/core2-64-poky-linux/lttng-tools$ ~/checksstate /media/sstate/master/ 
/media/sstate/master/72/1d/sstate:libgcrypt-native::1.9.3:r0::3:9d238d74043afc35b62e463fd90f2c90ad23876a1b86928f4ab3bb1f04052d93_fetch.tgz.siginfo
/media/sstate/master/1e/8e/sstate:gettext-native::0.21:r0::3:a35650e3df48dc376b32cfa8e456e2ef3fdc365a224eef0f119cdbc78342e088_fetch.tgz.siginfo
/media/sstate/master/1e/d7/sstate:libffi-native::3.4.2:r0::3:6bdb8672668ab592077855f1a0c41b02695c822140e88e7cb1189e3bf950b1a9_patch.tgz.siginfo
/media/sstate/master/68/13/sstate:libunistring-native::0.9.10:r0::3:57041c2202204dc2eaf0294401057f618ff780f1147391475e79390be7f0f532_unpack.tgz.siginfo
/media/sstate/master/68/83/sstate:texinfo-dummy-native::1.0:r0::3:228a8c69eacbcb4ec92309405b53de69ebd7b5393dcdd765168cce86f12d46e2_patch.tgz.siginfo
/media/sstate/master/68/f2/sstate:libffi-native::3.4.2:r0::3:9a8318c48c7b54057acdf80c706422d7f50356d63d98b44c187216d48c57ec24_unpack.tgz.siginfo
/media/sstate/master/f3/cf/sstate:pkgconfig-native::0.29.2+gitAUTOINC+edf8e6f0ea:r0::3:7f71df1daef53249ddabb0decb3053e293c079dcb4f163476ac4d895362e0683_unpack.tgz.siginfo
/media/sstate/master/f3/50/sstate:opkg-utils-native::0.4.5:r0::3:a417d2029c4155c405afed5ee341e8cfdbde479530f55b656d865653f6753dd1_patch.tgz.siginfo
/media/sstate/master/b6/45/sstate:texinfo-dummy-native::1.0:r0::3:19b0a546f6541598179be821e9899ad1b0dba881ebc4de416ff393eec7e97452_unpack.tgz.siginfo
/media/sstate/master/67/6a/sstate:texinfo-dummy-native::1.0:r0::3:610ed4b8e8bf78bbcd4a667b6645a0276f5c8bfce5de4822923850d44d032bbe_fetch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:gperf-native::3.1:r0::3:22c33ca53b7d6ed96f6d00c58fbe29f73e961d35d7ff6bdbe57b5e008c3567b7_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:libarchive-native::3.5.1:r0::3:191bef23e54e2c3d07a23ff1e988f05f9daad498762932f3a3b81a68da089e63_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:file-native::5.40:r0::3:e0b9d4944fcae0a44e777eeb7f04f472d0eb8783ea6b0cae99f1fbea13c2ef98_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:sqlite3-native::3.36.0:r0::3:ddd91f354e98169f487620d979b6fcd636b7bbabb6af7686ed39b1e78f1e1b5e_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:xz-native::5.2.5:r0::3:89ce6e27eed4e28b66c51636c95fb45e1d60bc27ba9bfc204b22be9589b44b45_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:libidn2-native::2.3.1:r0::3:d9f61bc972c67488505fdd06581d81a0bec2a52ec2ce081d74e152cf93b2c8bd_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:libmpc-native::1.2.1:r0::3:51213908c4adcc6a7ccdb3f84331f0cad3b5966ad87fb93e802b55720dbc6af6_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:libpcre2-native::10.37:r0::3:69487653cc795c853593b0e3915d74bbbfcd68f831fd102a5007c6e6372ad839_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:libnsl2-native::1.3.0:r0::3:a6b80843999761ac1433fc6e171b2e3e23966e80bffde05ca18358902789a65c_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:libmicrohttpd-native::0.9.73:r0::3:efecc50687766a20fbf72f1f28462d0293040859acb32b52c672fdadc42f7f31_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:popt-native::1.18:r0::3:204ad4a09f5188ca73df954091ac2d49475e902a8b02cf60b5f1420ed4cd0683_patch.tgz.siginfo
/media/sstate/master/e6/7e/sstate:libtirpc-native::1.3.2:r0::3:96dd13d8c0593608cc3c8b29d6178a71c751f0479cd3ae69561e22ec22d52efe_patch.tgz.siginfo
/media/sstate/master/e6/6d/sstate:acl-native::2.3.1:r0::3:05771a46cec44b1af2812c5b6fa085b403ff30c495497a24e51a22c4f195c9ac_fetch.tgz.siginfo
/media/sstate/master/10/87/sstate:perlcross-native::1.3.6:r0::3:639d7845b5b2f653b5c3f6a6683b2dd1567f986382536350505af8e3054cf3fa_patch.tgz.siginfo
/media/sstate/master/10/9a/sstate:flex-native::2.6.4:r0::3:471670d41e6c62c12905af367109f717c7668701de7e93598b661ebb933473a5_patch.tgz.siginfo
/media/sstate/master/21/61/sstate:lzo-native::2.10:r0::3:c8297d7f651884a03ad4fb7684a8aab4f7995fde462fe20967c3cf1fbd3ed4c9_fetch.tgz.siginfo
/media/sstate/master/5a/49/sstate:perl-native::5.34.0:r0::3:fdd0d27d59174bb7447f1f811ac33288303db2a101eaf66af809afa2045ceba8_fetch.tgz.siginfo
/media/sstate/master/63/d7/sstate:patch-native::2.7.6:r0::3:83ce20d39285eb7620a327de1f1e6c79341c28babf66bdfe4fff81e76b94c173_patch.tgz.siginfo
/media/sstate/master/aa/b2/sstate:gmp-native::6.2.1:r0::3:38b1a130c4b93e47a90f76ccd7b1a7772bb17156dc810c63796e22fe1b3d43ff_fetch.tgz.siginfo
/media/sstate/master/bb/18/sstate:pkgconfig-native::0.29.2+gitAUTOINC+edf8e6f0ea:r0::3:ec301f059f1df92f897e8347fc133ffbaf6e3019c88ae36e0e1f4d9fbd48b489_patch.tgz.siginfo
/media/sstate/master/32/62/sstate:libgpg-error-native::1.42:r0::3:1e7bb7e91e3ce4265d419c7a0866dc7c3d9e7ad7486d8764ac5b026c92f06f08_unpack.tgz.siginfo
/media/sstate/master/32/5c/sstate:libtool-native::2.4.6:r0::3:750961b43eac850b9a1bb1089b13dc6c7c85ec244f5def47155ded0fc02808a5_fetch.tgz.siginfo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91234</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-08-19 15:38:47 +0000</bug_when>
    <thetext>I&apos;d also note these files are not used by the build itself, only for debugging so this is why we&apos;ve not seen other issues due to this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91235</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-08-19 15:39:38 +0000</bug_when>
    <thetext>(for info I have 191 of these in my local sstate)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91395</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-09-14 13:13:23 +0000</bug_when>
    <thetext>Having stared at the code long and hard, the only way this can happen is this code in siggen.py:

    bb.error(&quot;Taskhash mismatch %s versus %s for %s&quot; % (computed_taskhash, self.taskhash[tid], tid))
    sigfile = sigfile.replace(self.taskhash[tid], computed_taskhash)

since everywhere else, the function at the top of sstate.bbclass us used to generate both the directory prefix and the filename which are done with the same hash.

As such I&apos;m not sure these files are worth worrying about too much, they&apos;re debug only and the build generating them would show errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96535</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-09-21 14:58:34 +0000</bug_when>
    <thetext>May still exist. Comment if this is important to you. - YP bug review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102830</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-09-25 15:12:14 +0000</bug_when>
    <thetext>Probably worth re-running the check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102831</commentid>
    <comment_count>9</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-09-25 15:22:19 +0000</bug_when>
    <thetext>Quick &amp; dirty one-liner:
  cd .../sstate-cache; fdfind -t f --exclude universal/ |grep -v &apos;\(..\)/\(..\)/.*:\1\2&apos;

It catches my test file (a550 -&gt; a55f):
  a5/50/sstate:gdbm:x86-64-v3-poky-linux:1.26:r0:x86-64-v3:14:a55f1bd467e1e1bfcd7503ea889eba148adadabf0c03658ab46c5e026807a4e0_configure_ptest_base.tar.zst.siginfo_TEST</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102838</commentid>
    <comment_count>10</comment_count>
      <attachid>5143</attachid>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-09-26 16:04:19 +0000</bug_when>
    <thetext>Created attachment 5143
sstate-check.py

I lost the script I mentioned in the comments so I wrote it again. It needs py3 because life is too short to not use pathlib.

For my local sstate of two years work of work, it has quite a few files which are in the wrong path.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>5143</attachid>
            <date>2025-09-26 16:04:19 +0000</date>
            <delta_ts>2025-09-26 16:04:19 +0000</delta_ts>
            <desc>sstate-check.py</desc>
            <filename>sstate-check.py</filename>
            <type>text/x-python-script</type>
            <size>982</size>
            <attacher name="Ross Burton">ross.burton</attacher>
            
              <data encoding="base64">IyEgL3Vzci9iaW4vZW52IHB5dGhvbjMKCmltcG9ydCBzeXMKaW1wb3J0IHBhdGhsaWIKZnJvbSBk
YXRldGltZSBpbXBvcnQgZGF0ZXRpbWUgYXMgZHQKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6
CiAgICBzc3RhdGVfZGlyID0gcGF0aGxpYi5QYXRoKHN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dF9tdGltZSkpCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>