[Ipopt-tickets] [Ipopt] #231: Segmentation fault in Ipopt::AugRestoSystemSolver::Solve

Ipopt coin-trac at coin-or.org
Mon Feb 3 08:44:02 EST 2014


#231: Segmentation fault in Ipopt::AugRestoSystemSolver::Solve
------------------------+----------------------
  Reporter:  bchretien  |      Owner:  stefan
      Type:  defect     |     Status:  assigned
  Priority:  normal     |  Component:  Ipopt
   Version:  3.11       |   Severity:  critical
Resolution:             |   Keywords:
------------------------+----------------------

Comment (by bchretien):

 @kelman: making a repro code would be borderline impossible, this is part
 of a very large project not released yet.

 @stefan: indeed, I just figured that I would report it to kill two birds
 with one stone. I tried running valgrind, but a good ol' "'''valgrind
 --tool=memcheck --track-origins=yes  --show-reachable=yes --error-
 limit=no'''" took a lot more time than I had on my hand. I just realized
 that Arch Linux's makepkg removed debug symbols while I was building the
 package with appropriate debug flags. I ended up finding another assert
 triggered, and here's a more thorough debug backtrace:

 {{{

 test_prog: ../../../../../Ipopt/src/LinAlg/TMatrices/IpGenTMatrix.cpp:119:
 virtual void Ipopt::GenTMatrix::TransMultVectorImpl(Ipopt::Number, const
 Ipopt::Vector&, Ipopt::Number, Ipopt::Vector&) const: Assertion
 `dynamic_cast<const DenseVector*>(&x)' failed.

 Program received signal SIGABRT, Aborted.

 #0  0x00007ffff38ad369 in raise () from /usr/lib/gcc/x86_64-unknown-linux-
 gnu/4.8.2/../../../../lib/libc.so.6
 #1  0x00007ffff38ae768 in abort () from /usr/lib/gcc/x86_64-unknown-linux-
 gnu/4.8.2/../../../../lib/libc.so.6
 #2  0x00007ffff38a6456 in __assert_fail_base () from /usr/lib/gcc/x86_64
 -unknown-linux-gnu/4.8.2/../../../../lib/libc.so.6
 #3  0x00007ffff38a6502 in __assert_fail () from /usr/lib/gcc/x86_64
 -unknown-linux-gnu/4.8.2/../../../../lib/libc.so.6
 #4  0x00007fffe21a482e in Ipopt::GenTMatrix::TransMultVectorImpl
 (this=0x1870310, alpha=1, x=..., beta=0, y=...) at
 ../../../../../Ipopt/src/LinAlg/TMatrices/IpGenTMatrix.cpp:119
 #5  0x00007fffe206ad1f in Ipopt::Matrix::TransMultVector (this=0x1870310,
 alpha=1, x=..., beta=0, y=...) at
 ../../../../Ipopt/src/Algorithm/../LinAlg/IpMatrix.hpp:64
 #6  0x00007fffe212a660 in Ipopt::LimMemQuasiNewtonUpdater::UpdateHessian
 (this=0x17a19e0) at
 ../../../../Ipopt/src/Algorithm/IpLimMemQuasiNewtonUpdater.cpp:302
 #7  0x00007fffe20ce0dc in Ipopt::IpoptAlgorithm::UpdateHessian
 (this=0x17a1c30) at ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:481
 #8  0x00007fffe20cd261 in Ipopt::IpoptAlgorithm::Optimize (this=0x17a1c30,
 isResto=0x1) at ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:300
 #9  0x00007fffe20e119a in
 Ipopt::MinC_1NrmRestorationPhase::PerformRestoration (this=0x17a1ce0) at
 ../../../../Ipopt/src/Algorithm/IpRestoMinC_1Nrm.cpp:176
 #10 0x00007fffe211a4fb in
 Ipopt::BacktrackingLineSearch::FindAcceptableTrialPoint (this=0x17a1ea0)
 at ../../../../Ipopt/src/Algorithm/IpBacktrackingLineSearch.cpp:574
 #11 0x00007fffe20ce6f2 in
 Ipopt::IpoptAlgorithm::ComputeAcceptableTrialPoint (this=0x17a24e0) at
 ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:542
 #12 0x00007fffe20cd59b in Ipopt::IpoptAlgorithm::Optimize (this=0x17a24e0,
 isResto=0x0) at ../../../../Ipopt/src/Algorithm/IpIpoptAlg.cpp:346
 #13 0x00007fffe2013a3d in Ipopt::IpoptApplication::call_optimize
 (this=0x1625df0) at
 ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:882
 #14 0x00007fffe2012a0f in Ipopt::IpoptApplication::OptimizeNLP
 (this=0x1625df0, nlp=..., alg_builder=...) at
 ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:769
 #15 0x00007fffe201270b in Ipopt::IpoptApplication::OptimizeNLP
 (this=0x1625df0, nlp=...) at
 ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:732
 #16 0x00007fffe20122aa in Ipopt::IpoptApplication::OptimizeTNLP
 (this=0x1625df0, tnlp=...) at
 ../../../../Ipopt/src/Interfaces/IpIpoptApplication.cpp:711
 #17 0x00007fffe1ff9842 in
 roboptim::IpoptSolverCommon<roboptim::Solver<roboptim::GenericDifferentiableFunction<roboptim::EigenMatrixSparse>,
 boost::mpl::vector<roboptim::GenericLinearFunction<roboptim::EigenMatrixSparse>,
 roboptim::GenericDifferentiableFunction<roboptim::EigenMatrixSparse>,
 mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
 mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
 mpl_::na, mpl_::na, mpl_::na, mpl_::na> > >::solve (this=0x160c0f0) at
 /home/user/dev/roboptim-core-plugin-ipopt/src/ipopt-common.hxx:117
 #18 0x00007ffff7bc3bf2 in roboptim::GenericSolver::minimum
 (this=this at entry=0x160c0f0) at /home/user/dev/roboptim-core/src/generic-
 solver.cc:57
 }}}

 Some GDB investigation:

 {{{

 gdb$ up
 #4  0x00007fffe21a482e in Ipopt::GenTMatrix::TransMultVectorImpl
 (this=0x1870310, alpha=1, x=..., beta=0, y=...) at
 ../../../../../Ipopt/src/LinAlg/TMatrices/IpGenTMatrix.cpp:119
 119         DBG_ASSERT(dynamic_cast<const DenseVector*>(&x));
 gdb$ print x
 $1 = (const Ipopt::Vector &) @0x3fecf30: {<Ipopt::TaggedObject> =
 {<Ipopt::ReferencedObject> = {_vptr.ReferencedObject = 0x7fffe26e3d50
 <vtable for Ipopt::CompoundVector+16>, reference_count_ = 0x2},
 <Ipopt::Subject> = {_vptr.Subject = 0x7fffe26e3e40 <vtable for
 Ipopt::CompoundVector+256>, observers_ = std::vector of length 5, capacity
 8 = {0x27d0f80, 0x31e3de0, 0x1b84990, 0x1620be0, 0x3f57bb0}}, tagcount_ =
 0x177029a, cache_priority_ = 0x3dd25d5c}, owner_space_ =
 {<Ipopt::Referencer> = {<No data fields>}, ptr_ = 0x17a2d70}, dot_cache_ =
 {_vptr.CachedResults = 0x7fffe26dfd70 <vtable for
 Ipopt::CachedResults<double>+16>, max_cache_size_ = 0xa, cached_results_ =
 0x0}, nrm2_cache_tag_ = {first = 0x0, second = 0x0}, cached_nrm2_ = 0,
 asum_cache_tag_ = {first = 0x3fecf30, second = 0x177029a}, cached_asum_ =
 0, amax_cache_tag_ = {first = 0x0, second = 0x0}, cached_amax_ =
 -6.9982839308066039e-08, max_cache_tag_ = {first = 0x0, second = 0x0},
 cached_max_ = -1.7005648209720812e-08, min_cache_tag_ = {first = 0x0,
 second = 0x0}, cached_min_ = -2.7031617443180433e-08, sum_cache_tag_ =
 {first = 0x0, second = 0x0}, cached_sum_ = 1.8901401448517707,
 sumlogs_cache_tag_ = {first = 0x0, second = 0x0}, cached_sumlogs_ =
 3.3051829664380375e-316, valid_cache_tag_ = {first = 0x0, second = 0x0},
 cached_valid_ = 0x0}
 gdb$ print dense_x
 $2 = (const Ipopt::DenseVector *) 0x3fecf30
 gdb$ print *dense_x
 $3 = {<Ipopt::Vector> = {<Ipopt::TaggedObject> =
 {<Ipopt::ReferencedObject> = {_vptr.ReferencedObject = 0x7fffe26e3d50
 <vtable for Ipopt::CompoundVector+16>, reference_count_ = 0x2},
 <Ipopt::Subject> = {_vptr.Subject = 0x7fffe26e3e40 <vtable for
 Ipopt::CompoundVector+256>, observers_ = std::vector of length 5, capacity
 8 = {0x27d0f80, 0x31e3de0, 0x1b84990, 0x1620be0, 0x3f57bb0}}, tagcount_ =
 0x177029a, cache_priority_ = 0x3dd25d5c}, owner_space_ =
 {<Ipopt::Referencer> = {<No data fields>}, ptr_ = 0x17a2d70}, dot_cache_ =
 {_vptr.CachedResults = 0x7fffe26dfd70 <vtable for
 Ipopt::CachedResults<double>+16>, max_cache_size_ = 0xa, cached_results_ =
 0x0}, nrm2_cache_tag_ = {first = 0x0, second = 0x0}, cached_nrm2_ = 0,
 asum_cache_tag_ = {first = 0x3fecf30, second = 0x177029a}, cached_asum_ =
 0, amax_cache_tag_ = {first = 0x0, second = 0x0}, cached_amax_ =
 -6.9982839308066039e-08, max_cache_tag_ = {first = 0x0, second = 0x0},
 cached_max_ = -1.7005648209720812e-08, min_cache_tag_ = {first = 0x0,
 second = 0x0}, cached_min_ = -2.7031617443180433e-08, sum_cache_tag_ =
 {first = 0x0, second = 0x0}, cached_sum_ = 1.8901401448517707,
 sumlogs_cache_tag_ = {first = 0x0, second = 0x0}, cached_sumlogs_ =
 3.3051829664380375e-316, valid_cache_tag_ = {first = 0x0, second = 0x0},
 cached_valid_ = 0x0}, owner_space_ = 0x3452a10, values_ = 0x3452a18,
 expanded_values_ = 0x3452a18, initialized_ = 0xe0, homogeneous_ = 0x62,
 scalar_ = 1.1474706244864285e-316}

 }}}


 Ipopt's traces:

 {{{

 ******************************************************************************
 This program contains Ipopt, a library for large-scale nonlinear
 optimization.
  Ipopt is released as open source code under the Eclipse Public License
 (EPL).
          For more information visit http://projects.coin-or.org/Ipopt
 ******************************************************************************

 This is Ipopt version trunk, running with linear solver ma27.

 Number of nonzeros in equality constraint Jacobian...:        0
 Number of nonzeros in inequality constraint Jacobian.:    94304
 Number of nonzeros in Lagrangian Hessian.............:        0

 Total number of variables............................:      196
                      variables with only lower bounds:        0
                 variables with lower and upper bounds:      196
                      variables with only upper bounds:        0
 Total number of equality constraints.................:        0
 Total number of inequality constraints...............:     1216
         inequality constraints with only lower bounds:        0
    inequality constraints with lower and upper bounds:     1216
         inequality constraints with only upper bounds:        0

 iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du
 alpha_pr  ls
    0  0.0000000e+00 3.22e-02 0.00e+00   0.0 0.00e+00    -  0.00e+00
 0.00e+00   0
    1  0.0000000e+00 1.66e-02 1.34e+00  -1.7 9.88e-02    -  8.79e-01
 1.00e+00f  1
    2  0.0000000e+00 5.66e-02 9.86e+01  -0.6 2.38e+00    -  8.03e-01 1.54e-
 01f  1
    3  0.0000000e+00 3.75e-01 4.99e+02  -0.6 1.32e+00    -  1.00e+00
 1.00e+00f  1
    4  0.0000000e+00 3.93e-01 1.10e+02  -0.6 6.49e-01    -  1.00e+00
 1.00e+00h  1
    5  0.0000000e+00 2.28e-01 1.06e+02  -0.6 5.73e-01    -  1.00e+00
 1.00e+00h  1
    6  0.0000000e+00 2.32e-01 5.40e+02  -0.6 4.12e-01    -  1.00e+00
 1.00e+00h  1
    7  0.0000000e+00 3.00e-01 2.39e+02  -0.6 4.21e-01    -  1.00e+00
 1.00e+00h  1
    8  0.0000000e+00 2.26e-01 1.30e+02  -0.6 2.26e-01    -  1.00e+00 5.00e-
 01h  2
    9  0.0000000e+00 1.74e-01 2.78e+02  -0.6 1.75e-01    -  1.00e+00
 1.00e+00h  1
 iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du
 alpha_pr  ls
   10  0.0000000e+00 7.23e-02 1.23e+02  -0.6 1.05e-01    -  1.00e+00
 1.00e+00h  1
   11  0.0000000e+00 6.99e-02 1.12e+02  -0.6 7.59e-02    -  1.00e+00 2.50e-
 01h  3
   12  0.0000000e+00 8.65e-02 2.00e+02  -0.6 5.90e-02    -  1.00e+00 5.00e-
 01h  2
   13  0.0000000e+00 1.17e-01 8.45e+01  -0.6 1.33e-01    -  1.00e+00 5.00e-
 01h  2
   14  0.0000000e+00 8.84e-02 2.35e+02  -0.6 1.19e-01    -  1.00e+00
 1.00e+00h  1
   15  0.0000000e+00 1.19e-01 1.78e+02  -0.6 1.88e-01    -  1.00e+00 2.50e-
 01h  3
   16  0.0000000e+00 1.19e-01 1.77e+02  -0.6 1.21e-01    -  1.00e+00 3.12e-
 02h  6
   17  0.0000000e+00 1.20e-01 1.81e+02  -0.6 1.28e-01    -  1.00e+00 1.95e-
 03h 10
   18  0.0000000e+00 1.20e-01 1.85e+02  -0.6 1.24e-01    -  1.00e+00 9.77e-
 04h 11
   19  0.0000000e+00 1.20e-01 1.90e+02  -0.6 1.21e-01    -  1.00e+00 4.88e-
 04h 12
 iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du
 alpha_pr  ls
   20  0.0000000e+00 1.25e-01 2.08e+02  -0.6 9.82e-02    -  1.00e+00 2.50e-
 01h  3
   21  0.0000000e+00 1.47e-01 1.04e+02  -0.6 8.65e-02    -  1.00e+00 5.00e-
 01h  2
   22  0.0000000e+00 7.99e-02 7.55e+02  -0.6 1.20e-01    -  1.00e+00
 1.00e+00h  1
   23  0.0000000e+00 1.02e-01 9.70e+02  -0.6 1.98e-01    -  1.00e+00 2.50e-
 01h  3
   24  0.0000000e+00 1.07e-01 9.32e+02  -0.6 2.09e-01    -  1.00e+00 3.12e-
 02h  6
   25  0.0000000e+00 2.44e-01 3.53e+02  -0.6 2.12e-01    -  1.00e+00
 1.00e+00s 22
   26r 0.0000000e+00 2.44e-01 9.99e+02  -0.6 0.00e+00    -  0.00e+00
 0.00e+00R  1
 }}}

--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/231#comment:3>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list