execv failed when running my self-built customized minicom

Daniele Palmas dnlplm at gmail.com
Fri Aug 21 12:48:52 UTC 2015


Hello,

I'm trying to build a package with a customized minicom, but when run
in my target system, I have the following error:

execv failed: No such file or directory

When I simply copy the binary and run it with sudo, it works without
issues, so I suspect it is something related to apparmor.

This is strace output when I run it:

execve("/apps/bin/minicom.minicom", ["minicom.minicom"], [/* 21 vars */]) = 0
brk(0)                                  = 0x7ffa3d5fe000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7ffa3c126000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=17216, ...}) = 0
mmap(NULL, 17216, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffa3c121000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\v\2\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1869392, ...}) = 0
mmap(NULL, 3972864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7ffa3b91d000
mprotect(0x7ffa3badd000, 2097152, PROT_NONE) = 0
mmap(0x7ffa3bcdd000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7ffa3bcdd000
mmap(0x7ffa3bce3000, 16128, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffa3bce3000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7ffa3c120000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7ffa3c11f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7ffa3c11e000
arch_prctl(ARCH_SET_FS, 0x7ffa3c11f700) = 0
mprotect(0x7ffa3bcdd000, 16384, PROT_READ) = 0
mprotect(0x7ffa3c128000, 8192, PROT_READ) = 0
mprotect(0x7ffa3bf0a000, 4096, PROT_READ) = 0
munmap(0x7ffa3c121000, 17216)           = 0
getpid()                                = 1980
rt_sigaction(SIGCHLD, {0x7ffa3bf1f460, ~[RTMIN RT_1], SA_RESTORER,
0x7ffa3b9522f0}, NULL, 8) = 0
geteuid()                               = 0
brk(0)                                  = 0x7ffa3d5fe000
brk(0x7ffa3d61f000)                     = 0x7ffa3d61f000
getppid()                               = 1978
stat("/home/ubuntu/apps", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
open("/apps/bin/minicom.minicom", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10)                   = 10
close(3)                                = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x7ffa3bf1f460, ~[RTMIN RT_1], SA_RESTORER,
0x7ffa3b9522f0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER,
0x7ffa3b9522f0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER,
0x7ffa3b9522f0}, NULL, 8) = 0
read(10, "#!/bin/sh\n# !!!never remove this"..., 8192) = 1317
pipe([3, 4])                            = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7ffa3c11f9d0) = 1981
close(4)                                = 0
read(3, "/home/ubuntu/apps\n", 128)     = 18
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1981,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 1981
stat("/tmp/snaps/minicom.sideload/2.7/tmp",
{st_mode=S_IFDIR|S_ISVTX|0777, st_size=40, ...}) = 0
stat("/root/apps/minicom.sideload/2.7", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
pipe([3, 4])                            = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7ffa3c11f9d0) = 1982
close(4)                                = 0
read(3, "/home/ubuntu/apps\n", 128)     = 18
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1982,
si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 1982
chdir("/apps/minicom.sideload/2.7")     = 0
stat("/usr/local/sbin/ubuntu-core-launcher", 0x7ffd3ec7a710) = -1
ENOENT (No such file or directory)
stat("/usr/local/bin/ubuntu-core-launcher", 0x7ffd3ec7a710) = -1
ENOENT (No such file or directory)
stat("/usr/sbin/ubuntu-core-launcher", 0x7ffd3ec7a710) = -1 ENOENT (No
such file or directory)
stat("/usr/bin/ubuntu-core-launcher", {st_mode=S_IFREG|S_ISUID|0755,
st_size=19080, ...}) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7ffa3c11f9d0) = 1983
wait4(-1, execv failed: No such file or directory
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 1983
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1983,
si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 1983
exit_group(1)                           = ?
+++ exited with 1 +++

The following is my package.yaml:

name: minicom
version: 2.7
vendor: dnlplm
type: app
binaries:
 - name: minicom
   description: “minicom”
   security-template: unconfined

Any hint about what is happening?


Thanks,
Daniele



More information about the snappy-app-devel mailing list