-
Notifications
You must be signed in to change notification settings - Fork 36
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
bcp crashes with stack overflow on ubuntu16.04 #6
Comments
The does not occur when you build it in a Docker container which is running ubuntu 16.04, but the host system is not ubuntu 16.04. If both the container and the host run it the issue occurs. |
On a different system the last log messages differed
|
I'm seeing this too in a 16.04 docker hosted in 18.04 |
I'm unable to reproduce on either MSVC or Ubunutu-19.10, so I will need more information. Infinite recursion in
So for some reason the the check for "have we seen this file before" is failing, even though I assume we really do already have it in the list. Are you able to debug and see what the argument to |
Running in docker might be essential to reproducing the issue. I'm running a 16.04 docker inside a 18.04 host, but it might be possible to reproduce without those exact versions. Here are the commands that lead to the segfault:
|
The thing is you're talking to a non-linux non-docker user here. The output will be voluminous, but what happens if you add:
To the start of BTW the only other situation I can think of that would lead to this, is if there is a link leading to a circular filesystem path - that should obviously not be the case within the boost tree. |
Yes, I added content similar to that cout in a few of the methods there. It doesn't seem to be infinite recursion to me, but I was not able to narrow down the test case. It seems to be non-deterministic to some extent. |
What was the final output before the overflow? |
This is not possible to debug interactively through the medium of github comments. Please try to get access to a linux vm or machine and reproduce it locally with docker. |
The final output is non-deterministic. It is a different output depending on how much I try to trim the files that bcp processes. |
I think what's happening is that the limits of Ubuntu 16.04 are being hit somehow. I can't reproduce this in an 18.04 docker, only a 16.04 one. I added a cout line to add_path and I got This isn't an infinite recursion problem. |
This patch excludes enough files to make it possible for me to run bcp on 16.04:
This also proves that the issue is somehow about processing too many files. With this patch only 42650 files are processed. |
This is probably caused by too many active |
Can you please try again with current develop? I've changed it to a fully non-recursive algorithm, so stack usage is now low. The catch is that a mighty big list of files gets constructed, so dynamic memory usage goes up to ~ 80Mb if you end up pulling in everything. |
I applied the changes to Boost 1.70 and my build was successful. |
Using https://github.com/conan-community/conan-boost with
boost:namespace = boost_ns
andboost:namespace_alias = True
will fail with Boost 1.70 on ubuntu 16.04 with a core dump.The stack trace looks like this and goes on with the same two function calls
The bcp command-line
It worked fine with Boost 1.69. It also works with 1.70 on CentOS 7, ubuntu 18.04, ubuntu 19.04 and Kali 2019.2.
I am using the default compiler on a x86_64 machine.
The text was updated successfully, but these errors were encountered: