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

std::length_error when starting roscore #114

Open
Karsten1987 opened this issue Feb 18, 2018 · 7 comments
Open

std::length_error when starting roscore #114

Karsten1987 opened this issue Feb 18, 2018 · 7 comments

Comments

@Karsten1987
Copy link

I am putting the error mentioned in #110 (comment) into a separate issue.

After digging a bit around, the std::length_error is thrown in the XMLRpcServer(), when calling 'resize` on the vector. https://github.com/ros/ros_comm/blob/lunar-devel/utilities/xmlrpcpp/src/XmlRpcServer.cpp#L37

When commenting out the following section, the roscore doesn't throw the length_error exception anymore, however pub/sub still doesn't seem to work correctly.

https://github.com/ros/ros_comm/blob/lunar-devel/utilities/xmlrpcpp/src/XmlRpcServer.cpp#L32-L36

if(getrlimit(RLIMIT_NOFILE, &limit) == 0) {
   max_files = limit.rlim_max;
} else {
  XmlRpcUtil::error("Could not get open file limit: %s", strerror(errno));
}
@ejalaa12
Copy link

ejalaa12 commented Feb 20, 2018

👍 . Same here.
The roscore throws the following error:

[ERROR] [1519167618.751419000]: [registerService] Failed to contact master at [ejalaa.home:11311].  Retrying...

@qh-huang
Copy link

Same here. I tried to replace
max_files = limit.rlim_max;
with
max_files = std::min((unsigned long long)limit.rlim_max, (unsigned long long)pollfds.max_size());
but the issue was not solved...

@SHTseng
Copy link

SHTseng commented Mar 5, 2018

Hi, I currently solve this problem by replacing most of the ros_comm sub-package to lunar-edge branch,
but keep the rosbag and rosbag_storage with lunar-devel branch.
I am able to pass the compilation and start the roscore, however there are still several issues that I can't test turtlesim successfully.

@tomlankhorst
Copy link

Was anyone able to fix this issue?
I feel like compiling with GCC instead of Clang might solve some of the issues but that would also require compilation of some dependencies with GCC to maintain compatibility.
@SHTseng , how can I configure another source of lunar packages (edge, devel)?

@NikolausDemmel
Copy link

Reverting ros_comm to 1.13.5 is a workaround, see also ros/ros_comm#1357 (comment)

@NikolausDemmel
Copy link

how can I configure another source of lunar packages (edge, devel)?

Depends a bit how you created your workspace? With the install script from this repository?

@dirk-thomas
Copy link

dirk-thomas commented Mar 30, 2018

Please consider filling a problem like this upstream in the future. It has been over a month that this issue is known here but until now no ticket was filled in the ros_comm repo containing the code in question. My comment there describes what the actual problem is.

PS: Thank you @NikolausDemmel for just doing that.

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

7 participants