Bug 1707422 - Wrong shebang in /usr/libexec/snapd/snap-device-helper
Summary: Wrong shebang in /usr/libexec/snapd/snap-device-helper
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: snapd
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-07 13:38 UTC by markusN
Modified: 2019-11-27 22:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 22:29:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
shebang fix (282 bytes, patch)
2019-05-08 15:25 UTC, markusN
no flags Details | Diff

Description markusN 2019-05-07 13:38:38 UTC
Description of problem:


Version-Release number of selected component (if applicable):

snap run cloudcompare.CloudCompare
...
execl failed: No such file or directory


# with debug
SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run cloudcompare.CloudCompare 
2019/05/07 15:12:58.132603 cmd_linux.go:70: DEBUG: re-exec not supported on distro "fedora" yet
2019/05/07 15:12:58.136275 cmd_run.go:356: DEBUG: SELinux not enabled
2019/05/07 15:12:58.136352 cmd_run.go:521: WARNING: XAUTHORITY environment value is not a clean path: "/run/lightdm/mneteler/xauthority"
DEBUG: security tag: snap.cloudcompare.CloudCompare
DEBUG: executable:   /usr/lib/snapd/snap-exec
DEBUG: confinement:  non-classic
DEBUG: base snap:    core18
DEBUG: ruid: 1001, euid: 0, suid: 0
DEBUG: rgid: 1001, egid: 0, sgid: 0
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: opening lock file: /run/snapd/lock/.lock
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: acquiring exclusive lock (scope (global), uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: ensuring that snap mount directory is shared
DEBUG: unsharing snap namespace directory
DEBUG: releasing lock 4
DEBUG: opened snap-update-ns executable as file descriptor 4
DEBUG: opened snap-discard-ns executable as file descriptor 5
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: opening lock file: /run/snapd/lock/cloudcompare.lock
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: acquiring exclusive lock (scope cloudcompare, uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: cloudcompare
DEBUG: forked support process 11086
DEBUG: helper process waiting for command
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: block device of snap core18, revision 941 is 7:3
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: joining preserved mount namespace for inspection
DEBUG: block device of the root filesystem is 7:3
DEBUG: sanity timeout reset and disabled
DEBUG: preserved mount namespace can be reused
DEBUG: joined preserved mount namespace cloudcompare
DEBUG: joining preserved per-user mount namespace
DEBUG: unsharing the mount namespace (per-user)
DEBUG: sc_setup_user_mounts: cloudcompare
DEBUG: NOT preserving per-user mount namespace
DEBUG: moved process 11080 to freezer cgroup hierarchy for snap cloudcompare
DEBUG: releasing lock 6
DEBUG: sending command 0 to helper process (pid: 11086)
DEBUG: waiting for response from helper
DEBUG: sanity timeout reset and disabled
DEBUG: helper process received command 0
DEBUG: helper process exitingDEBUG: 
waiting for the helper process to exit
DEBUG: helper process exited normally
DEBUG: resetting PATH to values in sync with core snap
DEBUG: snappy_udev_init
DEBUG: setup_devices_cgroup
DEBUG: write_string_to_file /sys/fs/cgroup/devices/snap.cloudcompare.CloudCompare/tasks 11080
DEBUG: write_string_to_file /sys/fs/cgroup/devices/snap.cloudcompare.CloudCompare/devices.deny a
DEBUG: run_snappy_app_dev_add: /sys/class/mem/null snap_cloudcompare_CloudCompare
DEBUG: running snap-device-helper add snap_cloudcompare_CloudCompare /sys/class/mem/null 1:3
execl failed: No such file or directory
child exited with status 1

The reason is that the shebang in this file is wrong:

For me (F29) this change helped to get snap running in general (didn't test here):

```
diff -u /usr/libexec/snapd/snap-device-helper.orig /usr/libexec/snapd/snap-device-helper
--- /usr/libexec/snapd/snap-device-helper.orig	2019-04-23 20:52:07.000000000 +0200
+++ /usr/libexec/snapd/snap-device-helper	2019-05-07 15:15:42.341304463 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/bin/bash
 # udev callout to allow a snap to access a device node
 set -e
 # debugging
```

I got that from https://bugs.launchpad.net/snapd/+bug/1824158


Additional info:

snap version
snap    2.38-3.fc29
snapd   2.38-3.fc29
series  16
fedora  29
kernel  5.0.10-200.fc29.x86_64

Comment 1 Zygmunt Krynicki 2019-05-08 13:35:39 UTC
Thank you for reporting this bug.

We know about this issue for a while but haven't got the time to fix it yet. Help is appreciated!

Comment 2 markusN 2019-05-08 15:25:21 UTC
Created attachment 1565705 [details]
shebang fix

Patch attached

Comment 3 Ben Cotton 2019-10-31 19:22:16 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2019-11-27 22:29:58 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.