Comment 4 for bug 1996090

Revision history for this message
Alberto Donato (ack) wrote : Re: Errors during snap refresh from 3.2.6 to 3.3 beta

So, this seems to be a snapd/core22 issue.

The issue can be seen by installing a core22-based snap on bionic, then getting a shell with snap run --shell and running `python -c 'import ssl'`

It can be reproduced with a very simple snap like:

--- snapcraft.yaml
name: test-22-on-bionic
version: '1.0'
summary: test snap
description: test snap
confinement: strict
grade: stable
base: core22

apps:
  test-22-on-bionic:
    command: script

parts:
  local:
    plugin: dump
    source: .
    stage:
      - script

--- script
#!/usr/bin/env python3

import ssl

installing the resulting snap on bionic shows the error:

root@b:~# test-22-on-bionic
Traceback (most recent call last):
  File "/snap/test-22-on-bionic/x2/script", line 3, in <module>
    import ssl
  File "/usr/lib/python3.10/ssl.py", line 98, in <module>
    import _ssl # if we can't import it, let the error propagate
ImportError: /usr/lib/python3.10/lib-dynload/_ssl.cpython-310-x86_64-linux-gnu.so: failed to map segment from shared object