question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CxxStrip output is cached even when cxx.cache_links = false

See original GitHub issue

When setting the config value cxx.cache_links = false, CxxLink rules are not cached. The option does not apply to CxxStrip rules however, so the stripped binary is still cached. This has caused issues for us as certain changes will result in an app binary being relinked with a new dSYM created, but then the cached stripped binary is fetched and put in the app bundle. This causes symbolication to fail as the dSYM UUID is different from the binary.

The obvious option is to disable caching of CxxStrip when cache_links = false too, but I’m wondering if its ever safe to cache stripped binary output, at least on apple platforms. Is it possible that a change that would not affect the rulekeys would still cause a binary to be relinked with a different UUID?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rmazcommented, Oct 12, 2018

Thanks for the detailed comment. I had not noticed the UUIDs were being scrubbed, that definitely changes things. I’ll take a closer look at this and update the PR. What is interesting about the issue is that it only occurred for a single architecture of a fat binary, need to think about what could cause that.

I think the right way of fixing this is not actually disabling the ability to cache the CxxStrip, this will mitigate an actual issue for you but the root won’t be touched.

You are right when it comes to fixing this bug, but I think it still makes sense to not cache stripped binaries and fat binaries for the same reason that it makes sense to not cache linked binaries in the first place. That can be a separate PR though.

0reactions
rmazcommented, Oct 26, 2018

Also, I wonder when have you started experiencing this issue? Could it be related to a recent Apple toolchain/Xcode updates?

I would like to say that we noticed this straight away, but TBH this could have been happening for years (ever?), we only discovered it recently by accident. We would have to dig through the build archives to know for sure.

Perhaps you could try and investigate why rule key is the same for the binaries with different UUIDs.

I will try and script this to see if I can repro locally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found