async: Operation not permitted - select_internal_with_gvl:epoll_wait with snap base 'core22'

After switching from the filesystem namespace for Unix domain sockets for ZMQ (ipc:///tmp/my-endpoint) on Linux to the abstact namespace (ipc://@my-endpoint), I’m getting:

/snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/scheduler.rb:383:in `select': Operation not permitted - select_internal_with_gvl:epoll_wait (Errno::EPERM)
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/scheduler.rb:383:in `run_once!'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/scheduler.rb:103:in `block in close'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/scheduler.rb:458:in `block in run_loop'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/scheduler.rb:455:in `handle_interrupt'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/scheduler.rb:455:in `run_loop'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/scheduler.rb:101:in `close'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/async/reactor.rb:27:in `scheduler_close'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/kernel/sync.rb:35:in `set_scheduler'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/kernel/sync.rb:35:in `ensure in Sync'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/async-2.21.0/lib/kernel/sync.rb:35:in `Sync'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/xyz-4.1.19/lib/xyz/runners/single_process.rb:51:in `start_actors'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/xyz-4.1.19/lib/xyz/runners/single_process.rb:28:in `run'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/xyz-4.1.19/lib/xyz/application.rb:96:in `start'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/xyz-4.1.19/lib/xyz/cli/cli.rb:23:in `start'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
        from /snap/xyz-protocol-simulator/x83/app/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
        from /snap/xyz-protocol-simulator/x83/app/bin/simulator:13:in `<top (required)>'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/cli/exec.rb:58:in `load'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/cli/exec.rb:58:in `kernel_load'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/cli/exec.rb:23:in `run'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/cli.rb:456:in `exec'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/cli.rb:35:in `dispatch'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/cli.rb:29:in `start'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/exe/bundle:28:in `block in <top (required)>'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
        from /snap/xyz-protocol-simulator/x83/usr/lib/ruby/gems/3.3.0/gems/bundler-2.5.23/exe/bundle:20:in `<top (required)>'
        from /snap/xyz-protocol-simulator/x83/usr/bin/bundle:25:in `load'
        from /snap/xyz-protocol-simulator/x83/usr/bin/bundle:25:in `<main>'

Is this a known problem? Maybe a readiness notification FD for Unix domain sockets in the abstract namespace is not possible?

Ruby: 3.3.6 Linux: Ubuntu 22.04 inside a Snap

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

Can confirm it works with base22 and base24 when run on the next version v2.67.1 of Snapd, which is currently available with sudo snap refresh --edge.

Thanks, that looks promising.

Relevant PR: https://github.com/canonical/snapd/pull/14885

Or try to require it, rescue Errno::EACCESS, and then have #address_resolve fail with NotImplementedError. That’s maybe too specific already. And this isn’t an actual problem I’m personally running into. My snaps are networked.

I have not seen this before. Are you able to make a small reproduction?