Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace PWD sometimes contains @ which causes Yocto jobs to fail #180

Open
gmacario opened this issue Mar 25, 2017 · 7 comments
Open

Workspace PWD sometimes contains @ which causes Yocto jobs to fail #180

gmacario opened this issue Mar 25, 2017 · 7 comments

Comments

@gmacario
Copy link
Owner

gmacario commented Mar 25, 2017

Error caught while building stable-build-rpi3 using easy-jenkins master and m3s-pipelines master, the job fails with the following error:

ERROR: OE-core's config sanity checker detected a potential misconfiguration.
...
Error, you have an invalid character (@) in your COREBASE directory path.
Please move the installation to a directory which doesn't include any @ characters.

Excerpt from http://192.168.64.239:9080/job/m3s-pipelines/job/stable-build-rpi3/3/console

Started by user Admin (itm-gmacario-w7)
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to https://[email protected]/gmacario/m3s-pipelines.git
 > git config remote.origin.url https://[email protected]/gmacario/m3s-pipelines.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/master
Seen branch in repository origin/stable-build-rpi3
Seen branch in repository origin/test-build-rpi3
Seen 3 remote branches
Obtained Jenkinsfile from dc8e14d1f3c3a26061619c02173c676c5d022bf0
[Pipeline] node
Running on master in /var/jenkins_home/workspace/pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA@2
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository https://[email protected]/gmacario/m3s-pipelines.git
...
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] sh
[pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA@2] Running shell script
+ id
uid=1000(jenkins) gid=1000(jenkins) groups=1000(jenkins)
+ pwd
/var/jenkins_home/workspace/pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA@2
...
+ printenv
+ sort
BRANCH_NAME=stable-build-rpi3
BUILD_DISPLAY_NAME=#3
BUILD_ID=3
BUILD_NUMBER=3
BUILD_TAG=jenkins-m3s-pipelines-stable-build-rpi3-3
CLASSPATH=
EXECUTOR_NUMBER=2
HOME=/home/jenkins
HOSTNAME=48372b4bfbb5
HUDSON_HOME=/var/jenkins_home
HUDSON_SERVER_COOKIE=510352e676f29026
JENKINS_SERVER_COOKIE=durable-0bcf12c221c2a7150c50c1f9b854bb79
JOB_BASE_NAME=stable-build-rpi3
JOB_DISPLAY_URL=http://unconfigured-jenkins-location/job/m3s-pipelines/job/stable-build-rpi3/display/redirect
JOB_NAME=m3s-pipelines/stable-build-rpi3
NODE_LABELS=docker master
NODE_NAME=master
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/var/jenkins_home/workspace/pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA@2
...
You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
+++ unset OEROOT
+++ '[' -z /var/jenkins_home/workspace/pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA@2/gdp-src-build ']'
+++ cd /var/jenkins_home/workspace/pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA@2/gdp-src-build
+++ '[' -z '' ']'
+++ '[' -f bitbake.lock ']'
++ echo

++ echo 'Now run:  bitbake genivi-dev-platform'
Now run:  bitbake genivi-dev-platform
++ whoami
+ '[' jenkins = root ']'
+ bitbake core-image-minimal
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, you have an invalid character (@) in your COREBASE directory path. Please move the installation to a directory which doesn't include any @ characters.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Test)
Stage 'Test' skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Deploy)
Stage 'Deploy' skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
$ docker stop --time=1 48372b4bfbb5bf768d44c19cc97d0115ee40435d10610b4095ad137582b04c5e
$ docker rm -f 48372b4bfbb5bf768d44c19cc97d0115ee40435d10610b4095ad137582b04c5e
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
@gmacario gmacario changed the title ERROR: OE-core's config sanity checker detected a potential misconfiguration. WORKSPACE pwd may contain '@' which causes Yocto jobs to fail Mar 25, 2017
@gmacario
Copy link
Owner Author

If I retrigger the build, the workspace changes and the @ character may disappear.

Excerpt from http://192.168.64.239:9080/job/m3s-pipelines/job/stable-build-rpi3/4/console

Started by user Admin (itm-gmacario-w7)
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to https://[email protected]/gmacario/m3s-pipelines.git
 > git config remote.origin.url https://[email protected]/gmacario/m3s-pipelines.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/master
Seen branch in repository origin/stable-build-rpi3
Seen branch in repository origin/test-build-rpi3
Seen 3 remote branches
Obtained Jenkinsfile from dc8e14d1f3c3a26061619c02173c676c5d022bf0
[Pipeline] node
Running on master in /var/jenkins_home/workspace/pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
...
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] sh
[pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA] Running shell script
+ id
uid=1000(jenkins) gid=1000(jenkins) groups=1000(jenkins)
+ pwd
/var/jenkins_home/workspace/pipelines_stable-build-rpi3-PM2ULQGDBOW6IR36SRVEN6XFHGF6JEFPVDNIGDCL6YJLUU2EYLKA
...
[Pipeline] stage
[Pipeline] { (Deploy)
[Pipeline] echo
deploying
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
$ docker stop --time=1 f57f62e0920d4e1b0f99f29c47ba6655f389169c480ee870bf5a5b9a653eb246
$ docker rm -f f57f62e0920d4e1b0f99f29c47ba6655f389169c480ee870bf5a5b9a653eb246
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

@gmacario
Copy link
Owner Author

gmacario commented Mar 25, 2017

It is not quite clear to me why workspace PWD sometimes contains the @ character.
Maybe I had triggered the same job name twice (i.e. from different pipelines?)

Keeping the issue open while investigating

@gmacario gmacario changed the title WORKSPACE pwd may contain '@' which causes Yocto jobs to fail Workspace PWD sometimes contains @ which causes Yocto jobs to fail Mar 25, 2017
@ptsneves
Copy link

ptsneves commented Aug 10, 2017

Hit by this also. Can you confirm me that launching jenkins the following way solves the problem?
java -Dhudson.slaves.WorkspaceList=- -jar jenkins.war

@dbrill
Copy link

dbrill commented Dec 1, 2017

Has anyone found a way of stabilizing this?

@ptsneves
Copy link

I can confirm that the fix i provided above works for me. Before it was @ and after my fix the separator is -

@pinktrink
Copy link

I have absolutely no idea about any of the relevant technologies beyond bash/Jenkins in this project, so keep that in mind with this comment.

I ran into this in my own Jenkins system, in which I've manually specified bash as the shell (Manage Jenkins -> Configure System -> Shell -> Shell Executable). The reasoning behind @ failures is likely that Jenkins is using bash, not sh (could be that sh is symlinked to bash, or that you specifically told it to use bash). In bash, @ is a special character whereas in sh it is not, which explains the failures.

@coreyoconnor
Copy link

Hello,
Jenkins pipelines will run concurrently. Multiple concurrent executions on the same executor will have "@" followed by the executor number. This provides each a unique workspace.

The hudson.slaves.WorkspaceList java property should control this. See

(this is what @ptsneves said but with more explanation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants