All of lore.kernel.org
 help / color / mirror / Atom feed
* do_rootfs OSError: [Errno 13] Permission denied
@ 2016-07-19  7:17 Maier, Chris
  2016-07-19 12:47 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Maier, Chris @ 2016-07-19  7:17 UTC (permalink / raw)
  To: yocto@yoctoproject.org


[-- Attachment #1.1.1: Type: text/plain, Size: 1341 bytes --]

Hello together,

I ran into an “Permission denied” error while trying to setup a nightly build on our Jenkins server and I can’t figure out where the problem comes from.
It seems that the problem is coming from creating and executing a child process, but why?

The build is working fine on my linux machine but it doesn’t finish successfully on the server (SUSE Linux Enterprise Server 12 SP1  (x86_64)).

The build log and the error message is attached.

What I already did:

-          Checking the file system space (11GB left)

-          Deleted the whole build directory and did a rebuild

-          Checked the filesystem permission, seems normal. It all belongs to user and group Jenkins.

Thanks for your time.

Regards

Chris

 i.A. Chris Maier 
Software-Entwicklungsingenieur 

Phone: +49 7152 203 6741 | Fax: +49 7152 203 76741 | C.Maier@geze.com 
GEZE GmbH, Reinhold-Vöster-Straße 21-29, 71229 Leonberg | www.geze.com 
    SAVE PAPER - THINK BEFORE YOU PRINT
               Geschäftsführung: Brigitte Vöster-Alber (Vorsitzende), Andrea Alexandra Alber, Marc Alber, Florian Birkenmayer, Thomas Kirn 
Vorsitzender des Aufsichtsrates: Prof. Dr. Dr. Ulli Arnold, Amtsgericht Stuttgart HRB 250329, Tel: +49 7152 203 0 
GEZE GmbH, Reinhold-Vöster-Straße 21-29, 71229 Leonberg, Germany 

[-- Attachment #1.1.2: Type: text/html, Size: 9476 bytes --]

[-- Attachment #1.2: GEZE_Logo.jpg --]
[-- Type: image/jpeg, Size: 34022 bytes --]

[-- Attachment #1.3: LinkedIn.jpg --]
[-- Type: image/jpeg, Size: 1599 bytes --]

[-- Attachment #1.4: facebook.jpg --]
[-- Type: image/jpeg, Size: 1477 bytes --]

[-- Attachment #1.5: Twitter.jpg --]
[-- Type: image/jpeg, Size: 1484 bytes --]

[-- Attachment #1.6: Xing.jpg --]
[-- Type: image/jpeg, Size: 1533 bytes --]

[-- Attachment #1.7: YouTube.jpg --]
[-- Type: image/jpeg, Size: 1864 bytes --]

[-- Attachment #1.8: Trenn_Linie.jpg --]
[-- Type: image/jpeg, Size: 5279 bytes --]

[-- Attachment #1.9: Erdkugel.jpg --]
[-- Type: image/jpeg, Size: 8517 bytes --]

[-- Attachment #2: buildlog.txt --]
[-- Type: text/plain, Size: 7082 bytes --]

DEBUG: Shell function sstate_create_package finished
DEBUG: Python function sstate_task_postfunc finished
DEBUG: Marking task 44 (/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/recipes-core/glibc/glibc_2.20.bb, do_build) as buildable
DEBUG: Stampfile /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/stamps/cortexa8hf-vfp-neon-poky-linux-gnueabi/glibc/2.20-r0.do_build.ba36c747c95651b6422d9923c884cdef not available
+ ret=0
+ '[' 0 -ne 0 ']'
+ set -e
+ chmod 0664 /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/sstate-cache/00/sstate:linux-yocto:cu4xx-poky-linux-gnueabi:3.14.24+gitAUTOINC+a227f20eff_dbe5b52e93:r0:cu4xx:3:00ff0ad3db17c1293d9e3d8de815969f_populate_sysroot.tgz.iFoXRToe

+ mv -f /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/sstate-cache/00/sstate:linux-yocto:cu4xx-poky-linux-gnueabi:3.14.24+gitAUTOINC+a227f20eff_dbe5b52e93:r0:cu4xx:3:00ff0ad3db17c1293d9e3d8de815969f_populate_sysroot.tgz.iFoXRToe /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/sstate-cache/00/sstate:linux-yocto:cu4xx-poky-linux-gnueabi:3.14.24+gitAUTOINC+a227f20eff_dbe5b52e93:r0:cu4xx:3:00ff0ad3db17c1293d9e3d8de815969f_populate_sysroot.tgz

+ cd /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/work/cu4xx-poky-linux-gnueabi/linux-yocto/3.14.24+gitAUTOINC+a227f20eff_dbe5b52e93-r0
+ rm -rf /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/work/cu4xx-poky-linux-gnueabi/linux-yocto/3.14.24+gitAUTOINC+a227f20eff_dbe5b52e93-r0/sstate-build-populate_sysroot/

+ ret=0
+ trap '' 0
+ exit 0

DEBUG: Shell function sstate_create_package finished
DEBUG: Python function sstate_task_postfunc finished
DEBUG: Marking task 87 (/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/recipes-kernel/linux/linux-yocto_3.14.bb, do_build) as buildable
DEBUG: Stampfile /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/stamps/cu4xx-poky-linux-gnueabi/linux-yocto/3.14.24+gitAUTOINC+a227f20eff_dbe5b52e93-r0.do_build.5e40216e9e64ea6fbc6c091aabcecd89 not available
ERROR: Error executing a python function in /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta-cu4xx/recipes-core/images/core-image-cu4xx.bb:

The stack trace of python calls that resulted in this exception/failure was:
File: 'do_rootfs', lineno: 17, function: <module>
     0013:    # generate final images
     0014:    create_image(d)
     0015:
     0016:
 *** 0017:do_rootfs(d)
     0018:
File: 'do_rootfs', lineno: 11, function: do_rootfs
     0007:    # generate the initial manifest
     0008:    create_manifest(d)
     0009:
     0010:    # generate rootfs
 *** 0011:    create_rootfs(d)
     0012:
     0013:    # generate final images
     0014:    create_image(d)
     0015:
File: '/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/lib/oe/rootfs.py', lineno: 774, function: create_rootfs
     0770:    img_type = d.getVar('IMAGE_PKGTYPE', True)
     0771:    if img_type == "rpm":
     0772:        RpmRootfs(d, manifest_dir).create()
     0773:    elif img_type == "ipk":
 *** 0774:        OpkgRootfs(d, manifest_dir).create()
     0775:    elif img_type == "deb":
     0776:        DpkgRootfs(d, manifest_dir).create()
     0777:
     0778:    os.environ.clear()
File: '/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/lib/oe/rootfs.py', lineno: 106, function: create
     0102:        bb.utils.mkdirhier(sysconfdir)
     0103:        with open(sysconfdir + "/version", "w+") as ver:
     0104:            ver.write(self.d.getVar('BUILDNAME', True) + "\n")
     0105:
 *** 0106:        self._run_intercepts()
     0107:
     0108:        execute_pre_post_process(self.d, post_process_cmds)
     0109:
     0110:        if bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
File: '/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/lib/oe/rootfs.py', lineno: 184, function: _run_intercepts
     0180:
     0181:            bb.note("> Executing %s intercept ..." % script)
     0182:
     0183:            try:
 *** 0184:                subprocess.check_output(script_full)
     0185:            except subprocess.CalledProcessError as e:
     0186:                bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details!" %
     0187:                        (script, e.returncode))
     0188:
File: '/usr/lib64/python2.7/subprocess.py', lineno: 566, function: check_output
     0562:    'ls: non_existent_file: No such file or directory\n'
     0563:    """
     0564:    if 'stdout' in kwargs:
     0565:        raise ValueError('stdout argument not allowed, it will be overridden.')
 *** 0566:    process = Popen(stdout=PIPE, *popenargs, **kwargs)
     0567:    output, unused_err = process.communicate()
     0568:    retcode = process.poll()
     0569:    if retcode:
     0570:        cmd = kwargs.get("args")
File: '/usr/lib64/python2.7/subprocess.py', lineno: 710, function: __init__
     0706:                                cwd, env, universal_newlines,
     0707:                                startupinfo, creationflags, shell, to_close,
     0708:                                p2cread, p2cwrite,
     0709:                                c2pread, c2pwrite,
 *** 0710:                                errread, errwrite)
     0711:        except Exception:
     0712:            # Preserve original exception in case os.close raises.
     0713:            exc_type, exc_value, exc_trace = sys.exc_info()
     0714:
File: '/usr/lib64/python2.7/subprocess.py', lineno: 1335, function: _execute_child
     1331:                except OSError as e:
     1332:                    if e.errno != errno.ECHILD:
     1333:                        raise
     1334:                child_exception = pickle.loads(data)
 *** 1335:                raise child_exception
     1336:
     1337:
     1338:        def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
     1339:                _WTERMSIG=os.WTERMSIG, _WIFEXITED=os.WIFEXITED,
Exception: OSError: [Errno 13] Permission denied

DEBUG: Python function do_rootfs finished
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/work/cu4xx-poky-linux-gnueabi/core-image-cu4xx/1.0-r0/temp/log.do_rootfs.7870
ERROR: Task 7 (/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta-cu4xx/recipes-core/images/core-image-cu4xx.bb, do_rootfs) failed with exit code '1'
DEBUG: Teardown for bitbake-worker
DEBUG: Teardown for bitbake-worker
NOTE: Tasks Summary: Attempted 2705 tasks of which 11 didn't need to be rerun and 1 failed.
No currently running tasks (2705 of 2706)

Summary: 1 task failed:
  /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta-cu4xx/recipes-core/images/core-image-cu4xx.bb, do_rootfs
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
jenkins@gc49ua23:~/jobs/Cu450/workspace/poky/build-cu4xx>

[-- Attachment #3: errorlog.txt --]
[-- Type: text/plain, Size: 5894 bytes --]

NOTE: Installing complementary packages ...
NOTE: Installing the following packages: mc-locale-en-gb avahi-locale-en-gb glibc-locale-en-gb libglib-2.0-locale-en-gb
NOTE: /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/sysroots/x86_64-linux/usr/bin/opkg-cl -f /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/work/cu4xx-poky-linux-gnueabi/core-
image-cu4xx/1.0-r0/opkg.conf -o /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/work/cu4xx-poky-linux-gnueabi/core-image-cu4xx/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version   i
nstall mc-locale-en-gb avahi-locale-en-gb glibc-locale-en-gb libglib-2.0-locale-en-gb
NOTE: Installing mc-locale-en-gb (4.8.12-r0) on root.
Downloading file:/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/deploy/ipk/cortexa8hf-vfp-neon/mc-locale-en-gb_4.8.12-r0_cortexa8hf-vfp-neon.ipk.
Installing avahi-locale-en-gb (0.6.31-r11.1) on root.
Downloading file:/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/deploy/ipk/cortexa8hf-vfp-neon/avahi-locale-en-gb_0.6.31-r11.1_cortexa8hf-vfp-neon.ipk.
Installing glibc-locale-en-gb (2.20-r0) on root.
Downloading file:/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/deploy/ipk/cortexa8hf-vfp-neon/glibc-locale-en-gb_2.20-r0_cortexa8hf-vfp-neon.ipk.
Installing libglib-2.0-locale-en-gb (1:2.40.0-r0) on root.
Downloading file:/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/tmp/deploy/ipk/cortexa8hf-vfp-neon/libglib-2.0-locale-en-gb_2.40.0-r0_cortexa8hf-vfp-neon.ipk.
Configuring glibc-locale-en-gb.
Configuring mc-locale-en-gb.
Configuring avahi-locale-en-gb.
Configuring libglib-2.0-locale-en-gb.

NOTE: Running intercept scripts:
NOTE: > Executing .svn intercept ...
ERROR: Error executing a python function in /var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta-cu4xx/recipes-core/images/core-image-cu4xx.bb:

The stack trace of python calls that resulted in this exception/failure was:
File: 'do_rootfs', lineno: 17, function: <module>
     0013:    # generate final images
     0014:    create_image(d)
     0015:
     0016:
 *** 0017:do_rootfs(d)
     0018:
File: 'do_rootfs', lineno: 11, function: do_rootfs
     0007:    # generate the initial manifest
     0008:    create_manifest(d)
     0009:
     0010:    # generate rootfs
 *** 0011:    create_rootfs(d)
     0012:
     0013:    # generate final images
     0014:    create_image(d)
     0015:
File: '/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/lib/oe/rootfs.py', lineno: 774, function: create_rootfs
     0770:    img_type = d.getVar('IMAGE_PKGTYPE', True)
     0771:    if img_type == "rpm":
     0772:        RpmRootfs(d, manifest_dir).create()
     0773:    elif img_type == "ipk":
 *** 0774:        OpkgRootfs(d, manifest_dir).create()
     0775:    elif img_type == "deb":
     0776:        DpkgRootfs(d, manifest_dir).create()
     0777:
     0778:    os.environ.clear()
File: '/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/lib/oe/rootfs.py', lineno: 106, function: create
     0102:        bb.utils.mkdirhier(sysconfdir)
     0103:        with open(sysconfdir + "/version", "w+") as ver:
     0104:            ver.write(self.d.getVar('BUILDNAME', True) + "\n")
     0105:
 *** 0106:        self._run_intercepts()
     0107:
     0108:        execute_pre_post_process(self.d, post_process_cmds)
     0109:
     0110:        if bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
File: '/var/lib/jenkins/jobs/Cu450/workspace/poky/build-cu4xx/../meta/lib/oe/rootfs.py', lineno: 184, function: _run_intercepts
     0180:
     0181:            bb.note("> Executing %s intercept ..." % script)
     0182:
     0183:            try:
 *** 0184:                subprocess.check_output(script_full)
     0185:            except subprocess.CalledProcessError as e:
     0186:                bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details!" %
     0187:                        (script, e.returncode))
     0188:
File: '/usr/lib64/python2.7/subprocess.py', lineno: 566, function: check_output
     0562:    'ls: non_existent_file: No such file or directory\n'
     0563:    """
     0564:    if 'stdout' in kwargs:
     0565:        raise ValueError('stdout argument not allowed, it will be overridden.')
 *** 0566:    process = Popen(stdout=PIPE, *popenargs, **kwargs)
     0567:    output, unused_err = process.communicate()
     0568:    retcode = process.poll()
     0569:    if retcode:
     0570:        cmd = kwargs.get("args")
File: '/usr/lib64/python2.7/subprocess.py', lineno: 710, function: __init__
     0706:                                cwd, env, universal_newlines,
     0707:                                startupinfo, creationflags, shell, to_close,
     0708:                                p2cread, p2cwrite,
     0709:                                c2pread, c2pwrite,
 *** 0710:                                errread, errwrite)
     0711:        except Exception:
     0712:            # Preserve original exception in case os.close raises.
     0713:            exc_type, exc_value, exc_trace = sys.exc_info()
     0714:
File: '/usr/lib64/python2.7/subprocess.py', lineno: 1335, function: _execute_child
     1331:                except OSError as e:
     1332:                    if e.errno != errno.ECHILD:
     1333:                        raise
     1334:                child_exception = pickle.loads(data)
 *** 1335:                raise child_exception
     1336:
     1337:
     1338:        def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
     1339:                _WTERMSIG=os.WTERMSIG, _WIFEXITED=os.WIFEXITED,
Exception: OSError: [Errno 13] Permission denied

DEBUG: Python function do_rootfs finished
ERROR: Function failed: do_rootfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: do_rootfs OSError: [Errno 13] Permission denied
  2016-07-19  7:17 do_rootfs OSError: [Errno 13] Permission denied Maier, Chris
@ 2016-07-19 12:47 ` Richard Purdie
  2016-07-19 14:16   ` Maier, Chris
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2016-07-19 12:47 UTC (permalink / raw)
  To: Maier, Chris, yocto@yoctoproject.org

On Tue, 2016-07-19 at 07:17 +0000, Maier, Chris wrote:
> Hello together,
>  
> I ran into an “Permission denied” error while trying to setup a
> nightly build on our Jenkins server and I can’t figure out where the
> problem comes from.
> It seems that the problem is coming from creating and executing a
> child process, but why?
>  
> The build is working fine on my linux machine but it doesn’t finish
> successfully on the server (SUSE Linux Enterprise Server 12 SP1 
> (x86_64)).
>  
> The build log and the error message is attached.
>  
> What I already did:
> -          Checking the file system space (11GB left)
> -          Deleted the whole build directory and did a rebuild
> -          Checked the filesystem permission, seems normal. It all
> belongs to user and group Jenkins.

It looks like you have the source code under svn control and its
finding a .svn directory in the "intercepts" directory and trying to
execute it. I'm guessing this is the scripts/postinst-intercepts
directory where its finding it.

Somehow you'd need to teach the code to skip the .svn directory, remove
that directory before the build or use a different source control
system.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: do_rootfs OSError: [Errno 13] Permission denied
  2016-07-19 12:47 ` Richard Purdie
@ 2016-07-19 14:16   ` Maier, Chris
  0 siblings, 0 replies; 3+ messages in thread
From: Maier, Chris @ 2016-07-19 14:16 UTC (permalink / raw)
  To: Richard Purdie, yocto@yoctoproject.org

[-- Attachment #1: Type: multipart/related, Size: 2 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-19 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19  7:17 do_rootfs OSError: [Errno 13] Permission denied Maier, Chris
2016-07-19 12:47 ` Richard Purdie
2016-07-19 14:16   ` Maier, Chris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.