On 4/9/20 11:42 AM, Sean McKay wrote:

Anyone have any thoughts or guidance on this?

It seems like a pretty major bug to me.

 

We’re willing to put the work in to fix it, and if it’s not something the upstream community is interested in, I’ll just pick a solution for us and go with it.

But if it’s something that we’d like me to upstream, I’d like some feedback on which path I should start walking down before I start taking things apart.


We have had a recent push for reproducible builds (and they are now enabled by default). Do you have any idea how much effort it would take to make the kernel build reproducibly? It's something we probably want anyway, and can add to the automated testing infrastructure to ensure it doesn't regress.




 

Cheers!

-Sean

 

From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On Behalf Of Sean McKay
Sent: Tuesday, April 7, 2020 12:03 PM
To: yocto@lists.yoctoproject.org
Subject: [yocto] sstate causing stripped kernel vs symbols mismatch

 

Hi all,

 

We’ve discovered that (quite frequently) the kernel that we deploy doesn’t match the unstripped one that we’re saving for debug symbols. I’ve traced the issue to a combination of an sstate miss for the kernel do_deploy step combined with an sstate hit for do_package_write_rpm. (side note: we know we have issues with sstate reuse/stamps including things they shouldn’t which is why we hit this so much. We’re working on that too)

 

The result is that when our debug rootfs is created (where we added the kernel symbols), it’s got the version of the kernel from the sstate cached rpm files, but since do_deploy had an sstate miss, the entire kernel gets rebuilt to satisfy that dependency chain. Since the kernel doesn’t have reproducible builds working, the resulting pair of kernels don’t match each other for debug purposes.

 

So, I have two questions to start:

  1. What is the recommended way to be getting debug symbols for the kernel, since do_deploy doesn’t seem to have a debug counterpart (which is why we originally just set things up to add the rpm to the generated debug rootfs)
  2. Does this seem like a bug that should be fixed? If so, what would be the recommended solution (more thoughts below)?

 

Even if there’s a task somewhere that does what I’m looking for, this seems like a bit of a bug. I generally feel like we want to be able to trust sstate, so the fact that forking dependencies that each generate their own sstate objects can be out of sync is a bit scary.

I’ve thought of several ways around this, but I can’t say I like any of them.

 

 

If you’re interested, this is quite easy to reproduce – these are my repro steps

 

Anyone have thoughts or suggestions?

 

Cheers!

-Sean McKay