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

[bug] double free or corruption (out) #929

Closed
jaggzh opened this issue Jun 5, 2020 · 7 comments
Closed

[bug] double free or corruption (out) #929

jaggzh opened this issue Jun 5, 2020 · 7 comments
Labels
bug for actual bugs (unsure? use type:question) linux stale for issues that becomes stale (no solution)

Comments

@jaggzh
Copy link

jaggzh commented Jun 5, 2020

[Edit] Added full cgdb backtrace in a reply, below, 2021-01-02

Built alicevision from github. During structureFromMotion I get a "double free or corruption (out)" message.

This is in Debian (stable) Linux.

I ran meshroom, using the paths set to use the compiled AliceVision directory's files (script below):

0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
[06:33:46.157153][info] Fuse matches into tracks: 
        - # tracks: 730
        - # images in tracks: 7
[06:33:46.157237][info] TrackLength, Occurrence
[06:33:46.157264][info]         2       591
[06:33:46.157274][info]         3       139
Automatic selection of an initial pair:
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
[06:33:46.179898][info] Initial pair is:
        - [A] view id: 72979456, filepath: /home/jaggz/futurepotatoes/imgs/IMG_20230427_190010.jpg
        - [B] view id: 1683434131, filepath: /home/jaggz/futurepotatoes/imgs/IMG_20230427_190007.jpg
[06:33:46.180121][info] 284 matches in the image pair for the initial pose estimation.
[06:33:46.249497][info] Bundle adjustment start.
[06:33:46.249638][info] Start bundle adjustment iteration: 0
double free or corruption (out)
Aborted

I don't know what to do with setupInitScriptUnix.py (it just leaves me in the python interpreter).
Here's the script I use to run meshroom:

# voctree used to increase matching like with >200 images
# export ALICEVISION_VOCTREE=/path/to/voctree

export PATH=$PATH:/home/jaggz/github/AliceVision/build/Linux-x86_64
export LD_LIBRARY_PATH=/home/jaggz/github/AliceVision/build/Linux-x86_64
export PYTHONPATH=$PWD
python meshroom/ui
@jaggzh jaggzh added the bug for actual bugs (unsure? use type:question) label Jun 5, 2020
@natowi natowi added the linux label Jun 5, 2020
@jaggzh
Copy link
Author

jaggzh commented Jun 17, 2020

I'm still having this problem, after rebuilding AliceVision and trying all sorts of things. I don't know how to trace down the cause.

@fabiencastan
Copy link
Member

When you select the StructureFromMotion node, in the attribute editor you have a tab called "Status". From there you can retrieve the aliceVision command line.

You can run this command line with:
cgdb --args THE_ALICEVISION_COMMAND_LINE"
Then "run" to start and finally "bt" to get the backtrace. See https://cgdb.github.io for more info.

@jaggzh
Copy link
Author

jaggzh commented Jun 19, 2020

Thank you so much. Having that full commandline sure is handy.
I rebuilt AliceVision with
cmake -DCMAKE_BUILD_TYPE=Debug . ../AliceVision

Here's what I have so far. Trying to investigate:

[21:06:52.259311][info] Start bundle adjustment iteration: 0
double free or corruption (out)

Thread 4 "aliceVision_inc" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdc148700 (LWP 11293)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff13b57bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff13a0535 in __GI_abort () at abort.c:79
#2  0x00007ffff13f7508 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff150228d "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff13fdc1a in malloc_printerr (str=str@entry=0x7ffff1503ff8 "double free or corruption (out)") at malloc.c:5341
#4  0x00007ffff13ff730 in _int_free (av=0x7ffff1539c40 <main_arena>, p=0x7fffc4021370, have_lock=<optimized out>) at malloc.c:4306
#5  0x00007ffff2bdb1f0 in  () at /usr/lib/libceres.so.1
#6  0x00007ffff156f79e in  () at /usr/lib/x86_64-linux-gnu/libgomp.so.1
#7  0x00007ffff2783fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#8  0x00007ffff14774cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

@stale
Copy link

stale bot commented Oct 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale for issues that becomes stale (no solution) label Oct 17, 2020
@stale
Copy link

stale bot commented Oct 24, 2020

This issue is closed due to inactivity. Feel free to re-open if new information is available.

@stale stale bot closed this as completed Oct 24, 2020
@jaggzh
Copy link
Author

jaggzh commented Jan 3, 2021

`Thread 1 "aliceVision_inc" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

#0 0x00007ffff0c537bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff0c3e535 in __GI_abort () at abort.c:79
#2 0x00007ffff0c95508 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff0da028d "%s\n") at ../sysdeps/posix/libc
_fatal.c:181
#3 0x00007ffff0c9bc1a in malloc_printerr (str=str@entry=0x7ffff0da1ff8 "double free or corruption (out)") at malloc.c:5341
#4 0x00007ffff0c9d730 in _int_free (av=0x7ffff0dd7c40 <main_arena>, p=0x555557391f90, have_lock=) at malloc.c:4306
#5 0x00007ffff240ca91 in ceres::internal::FindPolynomialRoots(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -
1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>) () at /usr/local/bin/../lib/libceres.so.2
#6 0x00007ffff240d289 in ceres::internal::MinimizePolynomial(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, double, double, double*,
double*) () at /usr/local/bin/../lib/libceres.so.2
#7 0x00007ffff240d457 in ceres::internal::MinimizeInterpolatingPolynomial(std::vector<ceres::internal::FunctionSample, std::allocato
rceres::internal::FunctionSample > const&, double, double, double*, double*) () at /usr/local/bin/../lib/libceres.so.2
#8 0x00007ffff23e2a78 in ceres::internal::LineSearch::InterpolatingPolynomialMinimizingStepSize(ceres::LineSearchInterpolationType c
onst&, ceres::internal::FunctionSample const&, ceres::internal::FunctionSample const&, ceres::internal::FunctionSample const&, double
, double) const () at /usr/local/bin/../lib/libceres.so.2
#9 0x00007ffff23e322e in ceres::internal::ArmijoLineSearch::DoSearch(double, double, double, ceres::internal::LineSearch::Summary*)
const () at /usr/local/bin/../lib/libceres.so.2
#10 0x00007ffff23e9fb4 in ceres::internal::LineSearch::Search(double, double, double, ceres::internal::LineSearch::Summary*) const ()
at /usr/local/bin/../lib/libceres.so.2
#11 0x00007ffff2450d92 in ceres::internal::TrustRegionMinimizer::DoLineSearch(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::M
atrix<double, -1, 1, 0, -1, 1> const&, double, Eigen::Matrix<double, -1, 1, 0, -1, 1>) () at /usr/local/bin/../lib/libceres.so.2
#12 0x00007ffff2454505 in ceres::internal::TrustRegionMinimizer::Minimize(ceres::internal::Minimizer::Options const&, double
, ceres:
:Solver::Summary*) () at /usr/local/bin/../lib/libceres.so.2
#13 0x00007ffff244574e in ceres::Solver::Solve(ceres::Solver::Options const&, ceres::Problem*, ceres::Solver::Summary*) () at /usr/lo
cal/bin/../lib/libceres.so.2
#14 0x00007ffff244619c in ceres::Solve(ceres::Solver::Options const&, ceres::Problem*, ceres::Solver::Summary*) () at /usr/local/bin/
../lib/libceres.so.2
#15 0x00007ffff7a67edd in aliceVision::sfm::BundleAdjustmentCeres::adjust(aliceVision::sfmData::SfMData&, aliceVision::sfm::BundleAdj
ustment::ERefineOptions) (this=0x7fffffffaf60, sfmData=..., refineOptions=aliceVision::sfm::BundleAdjustment::REFINE_ALL) at /home/.../AliceVision/src/aliceVision/sfm/BundleAdjustmentCeres.cpp:832
#16 0x00007ffff78e4cad in aliceVision::sfm::ReconstructionEngine_sequentialSfM::bundleAdjustment(std::set<unsigned int, std::less, std::allocator >&, bool) (this=0x7fffffffbac0, newReconstructedViews=Python Exception <class 'ValueError'>
Cannot find type class std::set<unsigned int, std::less, std::allocator >::_Rep_type:
std::set with 1 element, isInitialPair=false) at /home/.../AliceVision/src/aliceVision/sfm/pipeline/sequential/Reconstructio
nEngine_sequentialSfM.cpp:681
#17 0x00007ffff78e3621 in aliceVision::sfm::ReconstructionEngine_sequentialSfM::incrementalReconstruction() (this=0x7fffffffbac0) at
/home/.../AliceVision/src/aliceVision/sfm/pipeline/sequential/ReconstructionEngine_sequentialSfM.cpp:453
#18 0x00007ffff78e0f0a in aliceVision::sfm::ReconstructionEngine_sequentialSfM::process() (this=0x7fffffffbac0) at /home/.../AliceVision/src/aliceVision/sfm/pipeline/sequential/ReconstructionEngine_sequentialSfM.cpp:202
#19 0x0000555555594c6f in aliceVision_main(int, char**) (argc=63, argv=0x7fffffffce58) at /home/.../AliceVision/src/software
/pipeline/main_incrementalSfM.cpp:310
#20 0x0000555555592d2b in main(int, char**) (argc=63, argv=0x7fffffffce58) at /home/.../AliceVision/src/aliceVision/system/m
ain.hpp:37
`

@jaggzh
Copy link
Author

jaggzh commented Jan 3, 2021

Okay. The recent builds of ceres seem to have fixed this. :) I can't change the status of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug for actual bugs (unsure? use type:question) linux stale for issues that becomes stale (no solution)
Projects
None yet
Development

No branches or pull requests

3 participants