Core 2381 breaks ld-linux.so.2

Hi All,

I’m unable to run 32 bit applications with core 2381 because
ld-linux.so.2 fails with “Bad system call”.

Reverting to core 2312 by changing /snap/core/current to point to 2312
resolves the problem.

  1. Where should I report this?
  2. Is there a way to build and run snaps with a particular core version?

Thanks,
Alistair

Hello.

Can you please tell me more about your environment? Which architecture (x86 or arm?) and distribution is this happening on. Can you also look at dmesg and attach the part of the log when the application dies please?

you should not manually tinker with the link but use “snap revert core” so that all meta-data, configs etc are properly rolled back too …

Thanks for your bugreport! If the 32bit application you are using available in the store? If so, could you please tell us the name so that we can try to reproduce it?

Thanks everyone for your quick followup.

Sorry for not including platform information: This is running on Ubuntu 16.04 (x86, 64 bit). The package was built with snapcraft 2.29.

you should not manually tinker with the link but use “snap revert core” so that all meta-data, configs etc are properly rolled back too

Thanks, that answers part of my second question. Is there also a way to specify this as part of the build process (snapcraft)?

The application is pharo, although I don’t think you actually need it. You should be able to run the shell for any application with the broken core and see the problem, e.g.:

snap run --shell pharo
/snap/core/2381/lib/ld-linux.so.2

Note that if a different version of core is current, the error won’t occur.

If you still want to try pharo: to force the 32 bit version to run (it also contains a 64 bit version, which is the default):

sudo snap install pharo --classic
mkdir pharo
cd pharo
pharo.cleanimage32
pharo.ui Pharo.image

Thanks again,
Alistair

Thanks a lot for your report @akgrant! We debugged the issue and found that for snaps that use @unrestricted and multi-arch there is a bug. The fix is in https://github.com/snapcore/snapd/pull/3602 and we plan to merge it tonight.

Hi @mvo,

Thanks very much for your quick follow-up! I’ll take a look at tomorrow’s update.

Thanks again,
Alistair

Can you please try the core snap from the beta channel? We think this issue is fixed now and your confirmation would help us a lot.

That has solved the problem, thanks!

Is there a way to specify which version of core to use when building the snap package? I’ve currently got:

SNAPCRAFT_SETUP_CORE=1

set as environment variable.

Also, it would be great if an automated test that checks ld-linux.so.2 runs could be added to prevent any regressions.

Thanks again,
Alistair

As for building question I’ll defer to @sergiusens as I don’t know

The regression test for this issue is coming up, we just didn’t commit it with the fix last night because we wanted to release as soon as possible. The test will be added so this kind of bi-arch issue doesn’t strike us again.

Thanks for the confirmation re automated tests. (My focus is on Pharo, not snapcraft, so I’m not aware of where the tests are located, etc.).

Thanks again,
Alistair

But you should know the answer :wink: You cannot pick the revision unless you are the publisher of the snap

But you should know the answer
You cannot pick the revision unless you are the publisher of the snap

Well, I am the publisher of the snap, but I don’t know how to build (run the snapcraft command) with a particular version of core.