ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

venkisagunner's profile - activity

2023-03-13 20:25:22 -0500 marked best answer Most jobs fail in my buildfarm

I configured a buildfarm and triggered an import upstream job with the build parameters as mentioned in the documentation. But, most of the jobs failed to build. Also, is there any way one can educate me or point me to some material that tells how to start a job for my ros package (which is in my git repo right now) in my buildfarm ?

I tried starting a job in my buildfarm but it just clones the repo from github and doesn't perform any build on it. I'm new to jenkins and I'm learning.

Also I performed everything as mentioned here in this link.

I don't know whether I should be doing this but, I updated my jenkins to 2.121 from 2.89. Please tell me if this is wrong. Also in my lab currently everyone is developing in lunar, but I see that the distributions in ros_buildfarm_config show only jade, indigo and kinetic. Is this fine ? Can I still build packages developed in lunar or melodic in the buildfarm I configured ?

image description

I apologize if this isn't much information. I can improve this post to help others who wants to setup a buildfarm. Inputs are welcome.

Thanks !

EDIT - 1

I scrapped the entire deployment and redid everything from scratch. I still ended up having all my jobs fail. This time I had my jenkins version set to default (2.89).

2021-10-06 01:25:16 -0500 received badge  Notable Question (source)
2021-10-06 01:25:16 -0500 received badge  Famous Question (source)
2020-10-30 08:35:04 -0500 received badge  Nice Question (source)
2020-06-03 08:27:00 -0500 marked best answer Install a package parallel to /opt/ros

I have a custom package that I built. I ran bloom-generate rosdebian on the package and generated a debian folder. When I looked into debian/rules, I saw the following,

-DCMAKE_INSTALL_PREFIX="/opt/ros/melodic" \
-DCMAKE_PREFIX_PATH="/opt/ros/melodic"

I want to install my package to a location something like /opt/custom/melodic. These are the steps I'm following right now. Currently, I clone the package, run the following commands to generate a binary. I'm resolving the dependencies with a python script I custom brewed.

bloom-generate rosdebian
dpkg-buildpackage -b -us -uc

When the binary is installed, it gets installed into /opt/ros/melodic. Help much appreciated. Thanks !

2020-05-15 01:16:30 -0500 received badge  Popular Question (source)
2020-05-14 12:49:37 -0500 marked best answer pthread_recursive_mutex - assertion failed error

I'm getting the following error. I have all the latest ros codebase and I don't have any activity servers. I only have publishers, subscribers and services. I'm attaching the backtrace as well.

/usr/include/boost/thread/pthread/recursive_mutex.hpp:113: void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed

backtrace
#0  0x00007fffeebaefff in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffeebb042a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fffeeba7e67 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007fffeeba7f12 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x000055555566120d in boost::recursive_mutex::lock() ()
#5  0x000055555566fce5 in boost::unique_lock<boost::recursive_mutex>::lock() ()
#6  0x00007ffff2ed1795 in ros::Connection::drop(ros::Connection::DropReason) () from /opt/ros/melodic/lib/libroscpp.so
#7  0x00007ffff2f4ca97 in ros::TransportTCP::close() () from /opt/ros/melodic/lib/libroscpp.so
#8  0x00007ffff2f4daa5 in ros::TransportTCP::socketUpdate(int) () from /opt/ros/melodic/lib/libroscpp.so
#9  0x00007ffff2f8b39e in ros::PollSet::update(int) () from /opt/ros/melodic/lib/libroscpp.so
#10 0x00007ffff2f0ae75 in ros::PollManager::threadFunc() () from /opt/ros/melodic/lib/libroscpp.so
#11 0x00007ffff0206116 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.62.0
#12 0x00007fffef9c44a4 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#13 0x00007fffeec64d0f in clone () from /lib/x86_64-linux-gnu/libc.so.6

The codebase is very big and I really cannot share it due to confidentiality. I really don't have any clue as to where to start to solve this problem. All threads I have been reading regarding this problem has been only for pthread_recursive_mutex errors in activity servers.

Also I saw there were some updates released in ros/ros_comm may have caused this problem. I have a ros_comm package version from last year and I'm not getting the pthread_recursive_mutex error. Are there any parameters that got changed in the updates this year that might cause this issue. More than willing to accommodate the fix in our codebase. But would like to know what might be the potential causes.

I may be doing something very silly. I can try to provide more information as needed. I would like to resolve this issue. I'm not able to reproduce this behavior consistently and also the backtrace shows nothing but some ROS library calls (probably to ros_comm libraries).

Help much appreciated.

2020-05-14 12:49:25 -0500 answered a question pthread_recursive_mutex - assertion failed error

Fixed in a pull request. Problem in ros/ros_comm library itself. Refer pull request 1950 in ros/ros_comm repository.

2020-05-10 13:25:16 -0500 edited question pthread_recursive_mutex - assertion failed error

pthread_recursive_mutex - assertion failed error I'm getting the following error. I have all the latest ros codebase and

2020-05-10 12:45:45 -0500 commented question pthread_recursive_mutex - assertion failed error

That's fine. I should have read the guidelines. I already had the screenshot with me and that's why I posted the screens

2020-05-10 12:43:26 -0500 edited question pthread_recursive_mutex - assertion failed error

pthread_recursive_mutex - assertion failed error I'm getting the following error. I have all the latest ros codebase and

2020-05-06 16:03:19 -0500 asked a question pthread_recursive_mutex - assertion failed error

pthread_recursive_mutex - assertion failed error I'm getting the following error. I have all the latest ros codebase and

2020-04-23 16:15:53 -0500 received badge  Famous Question (source)
2019-10-18 00:19:29 -0500 received badge  Famous Question (source)
2019-10-18 00:19:29 -0500 received badge  Notable Question (source)
2019-08-09 17:04:18 -0500 marked best answer ssh problems in buildfarm

This is a continuation of this post. This is the error log from running lunar_rosdistro_cache job.

14:50:51 The command '/bin/sh -c python3 -u /tmp/wrapper_scripts/apt.py update-install-clean -q -y git python3-catkin-pkg-modules python3-rosdistro python3-yaml' returned a non-zero code: 100
14:50:51 Build step 'Execute shell' marked build as failure
14:50:51 SSH: Current build result is [FAILURE], not going to run.

I followed everything mentioned in the documentation. When I tried to test the connection in jenkins to the repo machine, the test configuration fails and sends me this error message.

Failed to connect or change directory
jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [repo]. Message [Auth fail]]
2019-07-23 13:18:52 -0500 received badge  Notable Question (source)
2019-07-23 13:18:52 -0500 received badge  Famous Question (source)
2019-07-23 13:18:52 -0500 received badge  Popular Question (source)
2019-05-20 01:00:18 -0500 marked best answer ROS Build farm help

I’m trying to be as exhaustive as possible. I have no previous experience in setting up a ros buildfarm before and I have very little knowledge about it. I tried to follow the documentation here ( https://github.com/ros-infrastructure... ). I got to the second step after mirroring this ( https://github.com/ros-infrastructure... ) repository and tried to change the parameters inside the common.yaml file. I changed the master ip, repo ip, jenkins uname and password. But the other things listed in the documentation is not available in the common.yaml file.

I’m making my machine as the master and a raspberry pi as the repo and another raspberry pi as agent. The master IP is my machine’s IP and the repo and the agent IPs are the two raspi’s IP. In common.yaml file, I edited these stuffs and changed the jenkins::slave::ui_user and ui_pass to my github username and password which is authorized in my jenkins account. Then, autoreconfigure is setup to be false in the common.yaml file but it is listed as branch in the documentation. Should I go about changing this ?

Coming to ssh keys, the key specified is the public key I generated using the ssh keygen command in my master machine ?

Anybody who has setup a buildfarm before, it will be great if you could provide me with an example and if possible explain why we are performing each step along the way.

P.S: This is not my homework. This is something I’m really willing to learn. Thanks !

2019-04-01 20:19:18 -0500 received badge  Notable Question (source)
2019-04-01 20:19:18 -0500 received badge  Famous Question (source)
2019-04-01 20:19:18 -0500 received badge  Popular Question (source)
2019-02-27 15:12:03 -0500 commented answer Install a package parallel to /opt/ros

It didnt work. I guess, there is capability to change the prefix path as you mentioned but the front end doesnt support

2019-02-27 14:05:33 -0500 commented answer Install a package parallel to /opt/ros

It didnt work. I guess, there is capability to change the prefix path as you mentioned but the front end doesnt support

2019-02-27 10:08:36 -0500 received badge  Popular Question (source)
2019-02-26 16:45:44 -0500 asked a question Install a package parallel to /opt/ros

Install a package parallel to /opt/ros I have a custom package that I built. I ran bloom-generate rosdebian on the packa

2019-02-22 19:17:53 -0500 marked best answer Unable to run a python script inside docker from jenkins pipeline

The reason why I'm asking this question here is due to ros buildfarm. This could be completely out of context for the community. I'm just looking for any sort of help possible.

I created a python package (for automating the build stages in jenkins) that can be installed using pip. Also I created a dockerfile that will clone the python package from the github, perform pip install and export the path where the executables (entry points, however you would like to call it) are installed in the container (example: ~/.local/bin). This is how my dockerfile looks like.

FROM ros:melodic-ros-core-stretch
RUN apt-get update && apt-get -y install python-pip
RUN git clone <private-repo-with-personal-access-token>
RUN pip install <package-name>
RUN export PATH=~/.local/bin:$PATH

So I built this image, ran the container and typed in one of the executables (entry points) that prints hello world. Works perfectly fine. Have no problem whatsoever on that. Coming to the big picture, I want to call this executable (entry points) in the jenkins pipeline. I initially had a problem with that and then I learnt that the jenkins pipeline when setup with a docker image, runs on top of the container but uses the workspace allocated for jenkins which will be /var/lib/jenkins/workspace. This is how my jenkins pipeline script looks like

pipeline {
    agent {
         docker {
              args '--network host -u root:root'
              image '<private-docker-hub-image>'
              registryCredentialsId 'docker-credentials'
              registryUrl 'https://registry.hub.docker.com'
         }
    }
    stages {
        stage('Test') {
            steps {
                sh 'test-build'
            }
        }
    }
}

This is the error I'm getting.

Started by user Automated Build Environment
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /var/lib/jenkins/workspace/First_item
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withDockerRegistry
$ docker login -u <docker username> -p ******** https://registry.hub.docker.com
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /var/lib/jenkins/workspace/First_item@tmp/251189be-62eb-4134-84ca-d70190ab080f/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
[Pipeline] {
[Pipeline] sh
+ docker inspect -f . <private-dockerhub-image>

Error: No such object: <private-dockerhub-image>
[Pipeline] sh
+ docker inspect -f . registry.hub.docker.com/<private-dockerhub-image>
.
[Pipeline] withDockerContainer
Jenkins does not seem to be running inside a container
$ docker run -t -d -u 125:130 --network host -u root:root -v /var/lib/jenkins:/var/lib/jenkins -w /var/lib/jenkins/workspace/First_item -v /var/lib/jenkins/workspace/First_item:/var/lib/jenkins/workspace/First_item:rw,z -v /var/lib/jenkins/workspace/First_item@tmp:/var/lib/jenkins/workspace/First_item@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** registry.hub.docker.com/<private-dockerhub-image> cat
$ docker top ab1f2ec9b503f9b916ee96943dc849acc90716f7543b4841ff3901b7a65aea54 -eo pid,comm
[Pipeline] {
[Pipeline] stage (hide)
[Pipeline] { (Test)
[Pipeline] sh
+ test-build
/var/lib/jenkins/workspace/First_item@tmp/durable-7cb108f7/script.sh: 1: /var/lib/jenkins/workspace/First_item@tmp/durable-7cb108f7/script.sh: test-build: not found
[Pipeline] }
[Pipeline] // stage ...
(more)
2019-02-22 19:17:48 -0500 answered a question Unable to run a python script inside docker from jenkins pipeline

Sorry. The solution was really simple. The mistake I was making was I updated the dockerfile and created a new image, pu

2019-02-22 13:02:25 -0500 edited question Unable to run a python script inside docker from jenkins pipeline

Unable to run a python script inside docker from jenkins pipeline The reason why I'm asking this question here is due to

2019-02-22 11:30:59 -0500 edited question Unable to run a python script inside docker from jenkins pipeline

Unable to run a python script inside docker from jenkins pipeline The reason why I'm asking this question here is due to

2019-02-22 11:26:46 -0500 asked a question Unable to run a python script inside docker from jenkins pipeline

Unable to run a python script inside docker from jenkins pipeline The reason why I'm asking this question here is due to

2019-02-20 02:59:33 -0500 received badge  Notable Question (source)
2019-02-19 06:53:34 -0500 received badge  Famous Question (source)
2019-02-11 16:12:00 -0500 received badge  Popular Question (source)
2019-02-07 16:24:14 -0500 edited question Problem running dpkg-buildpackage

Problem running dpkg-buildpackage I have two packages; msgsrv_pkg - holds the custom messages and services motor_dri

2019-02-07 15:53:01 -0500 edited question Problem running dpkg-buildpackage

Problem running dpkg-buildpackage I have two packages; msgsrv_pkg - holds the custom messages and services motor_dri

2019-02-07 15:47:17 -0500 edited question Problem running dpkg-buildpackage

Problem running dpkg-buildpackage I have two packages; msgsrv_pkg - holds the custom messages and services motor_dri

2019-02-07 10:08:43 -0500 edited question Problem running dpkg-buildpackage

Problem running dpkg-buildpackage I have two packages; msgsrv_pkg - holds the custom messages and services motor_dri

2019-02-07 09:54:27 -0500 edited question Problem running dpkg-buildpackage

Problem running dpkg-buildpackage I have two packages; msgsrv_pkg - holds the custom messages and services motor_dri

2019-02-07 09:54:27 -0500 received badge  Associate Editor (source)
2019-02-07 09:53:53 -0500 asked a question Problem running dpkg-buildpackage

Problem running dpkg-buildpackage I have two packages; msgsrv_pkg - holds the custom messages and services motor_dri

2019-01-30 15:31:24 -0500 marked best answer catkin_make_isolated /usr/bin/ld: cannot find -l<lib_name>

I'm trying to run catkin_make_isolated on my workspace and it fails.

==> Processing catkin package: 'motor_driver_pkg'
==> Building with env: '/home/user/catkin_ws/devel_isolated/kinematics/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/user/catkin_ws/build_isolated/motor_driver_pkg'
==> make -j6 -l6 in '/home/user/catkin_ws/build_isolated/motor_driver_pkg'
[ 50%] Linking CXX executable /home/user/catkin_ws/devel_isolated/motor_driver_pkg/lib/motor_driver_pkg/dc_motor_driver
/usr/bin/ld: cannot find -lkinematics
collect2: error: ld returned 1 exit status
CMakeFiles/dc_motor_driver.dir/build.make:119: recipe for target '/home/user/catkin_ws/devel_isolated/motor_driver_pkg/lib/motor_driver_pkg/dc_motor_driver' failed
make[2]: *** [/home/user/catkin_ws/devel_isolated/motor_driver_pkg/lib/motor_driver_pkg/dc_motor_driver] Error 1
CMakeFiles/Makefile2:1091: recipe for target 'CMakeFiles/dc_motor_driver.dir/all' failed
make[1]: *** [CMakeFiles/dc_motor_driver.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'motor_driver_pkg': 
  Command '['/home/user/catkin_ws/devel_isolated/kinematics/env.sh', 'make', '-j6', '-l6']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/user/catkin_ws/build_isolated/motor_driver_pkg && /home/user/catkin_ws/devel_isolated/kinematics/env.sh make -j6 -l6

Command failed, exiting.

I have a package called kinematics, this is the CMakeLists.txt of that package

cmake_minimum_required(VERSION 2.8.3)
project(kinematics)

find_package(catkin REQUIRED COMPONENTS
  controller_interface
  roscpp
)

###################################
## catkin specific configuration ##
###################################
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package()

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
 include
  ${catkin_INCLUDE_DIRS}
)

add_library(kinematics 
  src/ackermann.cpp
  src/diff_drive.cpp)
target_link_libraries(kinematics ${catkin_LIBRARIES})


#############
## Install ##
#############

install(DIRECTORY include/${PROJECT_NAME}/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  FILES_MATCHING PATTERN "*.h"
  PATTERN ".svn" EXCLUDE)

install(TARGETS kinematics
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

I have another package called motor_driver_pkg that takes uses the library "kinematics" from kinematics package. This is the CMakeLists.txt for that package.

cmake_minimum_required(VERSION 2.8.3)
project(motor_driver_pkg)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  tf
  kinematics
)

###################################
## catkin specific configuration ##
###################################
catkin_package()

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include 
  ${catkin_INCLUDE_DIRS}
  ${kinematics_INCLUDE_DIRS}
)

add_executable(dc_motor_driver src/dc_motor_driver.cpp)
target_link_libraries(dc_motor_driver kinematics ${catkin_LIBRARIES})

This works completely fine with catkin_make. But fails when I run catkin_make_isolated. I understand that the motor_driver_pkg is not able to find the kinematics library. Need help. Don't know what is going wrong.

2019-01-30 15:31:24 -0500 commented answer catkin_make_isolated /usr/bin/ld: cannot find -l<lib_name>

Yes. Thank you very much. That was the issue. While linking shared libraries while performing catkin_make_isolated, we h