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

Ipopt coin-trac at coin-or.org
Fri Jan 31 11:59:50 EST 2014


#231: Segmentation fault in Ipopt::AugRestoSystemSolver::Solve
----------------------+------------------------
Reporter:  bchretien  |      Owner:  ipopt-team
    Type:  defect     |     Status:  new
Priority:  normal     |  Component:  Ipopt
 Version:  3.11       |   Severity:  critical
Keywords:             |
----------------------+------------------------
 Hi, a few days ago I stumbled across a segmentation fault in my code using
 Ipopt 3.11.7 (upstream version). Note that I use Arch Linux x86_64, gcc
 4.8.2, blas/lapack 3.5.0. Here is the backtrace that first got me here
 (tested with MA27 and MA57):

 {{{

 Program received signal SIGSEGV, Segmentation fault.

 #0  0x00007fffe2918f18 in std::vector<Ipopt::SmartPtr<Ipopt::Vector>,
 std::allocator<Ipopt::SmartPtr<Ipopt::Vector> > >::operator[](unsigned
 long) const () from /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-
 sparse.so
 #1  0x00007fffe29184ec in Ipopt::CompoundVector::ConstComp(int) const ()
 from /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #2  0x00007fffe29184aa in Ipopt::CompoundVector::GetComp(int) const ()
 from /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #3  0x00007fffe2a93a56 in
 Ipopt::AugRestoSystemSolver::Solve(Ipopt::SymMatrix const*, double,
 Ipopt::Vector const*, double, Ipopt::Vector const*, double, Ipopt::Matrix
 const*, Ipopt::Vector const*, double, Ipopt::Matrix const*, Ipopt::Vector
 const*, double, Ipopt::Vector const&, Ipopt::Vector const&, Ipopt::Vector
 const&, Ipopt::Vector const&, Ipopt::Vector&, Ipopt::Vector&,
 Ipopt::Vector&, Ipopt::Vector&, bool, int) () from /usr/lib/roboptim-core
 /roboptim-core-plugin-ipopt-sparse.so
 #4  0x00007fffe29ae084 in
 Ipopt::LeastSquareMultipliers::CalculateMultipliers(Ipopt::Vector&,
 Ipopt::Vector&) () from /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-
 sparse.so
 #5  0x00007fffe29b867a in Ipopt::IpoptAlgorithm::AcceptTrialPoint() ()
 from /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #6  0x00007fffe29b5622 in Ipopt::IpoptAlgorithm::Optimize(bool) () from
 /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #7  0x00007fffe29c6597 in
 Ipopt::MinC_1NrmRestorationPhase::PerformRestoration() () from /usr/lib
 /roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #8  0x00007fffe29f5104 in
 Ipopt::BacktrackingLineSearch::FindAcceptableTrialPoint() () from /usr/lib
 /roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #9  0x00007fffe29b65e8 in
 Ipopt::IpoptAlgorithm::ComputeAcceptableTrialPoint() () from /usr/lib
 /roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #10 0x00007fffe29b55c5 in Ipopt::IpoptAlgorithm::Optimize(bool) () from
 /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #11 0x00007fffe2913f5f in Ipopt::IpoptApplication::call_optimize() () from
 /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #12 0x00007fffe2913081 in
 Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&,
 Ipopt::SmartPtr<Ipopt::AlgorithmBuilder>&) () from /usr/lib/roboptim-core
 /roboptim-core-plugin-ipopt-sparse.so
 #13 0x00007fffe2912d7d in
 Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&)
 () from /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #14 0x00007fffe2912970 in
 Ipopt::IpoptApplication::OptimizeTNLP(Ipopt::SmartPtr<Ipopt::TNLP> const&)
 () from /usr/lib/roboptim-core/roboptim-core-plugin-ipopt-sparse.so
 #15 0x00007fffe28f993c 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=0x160bfa0) at
 /home/user/dev/roboptim-core-plugin-ipopt/src/ipopt-common.hxx:117
 #16 0x00007ffff7bc3bf2 in roboptim::GenericSolver::minimum
 (this=this at entry=0x160bfa0) at /home/user/dev/roboptim-core/src/generic-
 solver.cc:57
 }}}


 It fails after a while (in my case 84 iterations, and a previous
 restauration does not seem to lead to this error).

 Then I tried to compile Ipopt will full debugging (''--enable-debug
 --with-pic --with-ipopt-verbosity=5 --with-ipopt-checklevel=1''), but then
 Ipopt's unit tests seem to crash as well:


 {{{
 ./run_unitTests

 Running unitTests...

 Testing AMPL Solver Executable...
     Test passed!
 Testing C++ Example...
     Test passed!
 Testing C Example...
 ./run_unitTests: line 77: 24054 Aborted                 (core dumped)
 ./hs071_c > tmpfile 2>&1

  ---- 8< ---- Start of test program output ---- 8< ----

 ******************************************************************************
 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.

 hs071_c: ../../../../Ipopt/src/Interfaces/IpStdInterfaceTNLP.cpp:390: void
 Ipopt::StdInterfaceTNLP::apply_new_x(bool, Ipopt::Index, const Number*):
 Assertion `non_const_x_ && "non_const_x is NULL after apply_new_x"'
 failed.
  ---- 8< ----  End of test program output  ---- 8< ----

     ******** Test FAILED! ********
 Output of the test program is above.
 Testing Fortran Example...
 ./run_unitTests: line 95: 24059 Aborted                 (core dumped)
 ./hs071_f > tmpfile 2>&1

  ---- 8< ---- Start of test program output ---- 8< ----

 ******************************************************************************
 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.

 hs071_f: ../../../../Ipopt/src/Interfaces/IpStdInterfaceTNLP.cpp:390: void
 Ipopt::StdInterfaceTNLP::apply_new_x(bool, Ipopt::Index, const Number*):
 Assertion `non_const_x_ && "non_const_x is NULL after apply_new_x"'
 failed.

 Program received signal SIGABRT: Process abort signal.

 Backtrace for this error:
 #0  0x7FB8642766C7
 #1  0x7FB864276CCE
 #2  0x7FB86246A3DF
 #3  0x7FB86246A369
 #4  0x7FB86246B767
 #5  0x7FB862463455
 #6  0x7FB862463501
 #7  0x40CBE5 in Ipopt::StdInterfaceTNLP::apply_new_x(bool, int, double
 const*) at IpStdInterfaceTNLP.cpp:390 (discriminator 1)
 #8  0x40C599 in Ipopt::StdInterfaceTNLP::eval_jac_g(int, double const*,
 bool, int, int, int*, int*, double*) at IpStdInterfaceTNLP.cpp:288
 #9  0x42DD5F in
 Ipopt::TNLPAdapter::GetSpaces(Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
 Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
 Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
 Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
 Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
 Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
 Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
 Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
 Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
 Ipopt::SmartPtr<Ipopt::VectorSpace const>&,
 Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
 Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
 Ipopt::SmartPtr<Ipopt::MatrixSpace const>&,
 Ipopt::SmartPtr<Ipopt::SymMatrixSpace const>&) at IpTNLPAdapter.cpp:1074
 (discriminator 4)
 #10  0x467289 in
 Ipopt::OrigIpoptNLP::InitializeStructures(Ipopt::SmartPtr<Ipopt::Vector>&,
 bool, Ipopt::SmartPtr<Ipopt::Vector>&, bool,
 Ipopt::SmartPtr<Ipopt::Vector>&, bool, Ipopt::SmartPtr<Ipopt::Vector>&,
 bool, Ipopt::SmartPtr<Ipopt::Vector>&, bool,
 Ipopt::SmartPtr<Ipopt::Vector>&, Ipopt::SmartPtr<Ipopt::Vector>&) at
 IpOrigIpoptNLP.cpp:244
 #11  0x4CD473 in
 Ipopt::IpoptData::InitializeDataStructures(Ipopt::IpoptNLP&, bool, bool,
 bool, bool, bool) at IpIpoptData.cpp:128
 #12  0x5BAE98 in Ipopt::DefaultIterateInitializer::SetInitialIterates() at
 IpDefaultIterateInitializer.cpp:195 (discriminator 1)
 #13  0x4D5A3E in Ipopt::IpoptAlgorithm::InitializeIterates() at
 IpIpoptAlg.cpp:554
 #14  0x4D43A4 in Ipopt::IpoptAlgorithm::Optimize(bool) at
 IpIpoptAlg.cpp:282
 #15  0x41AE94 in Ipopt::IpoptApplication::call_optimize() at
 IpIpoptApplication.cpp:882
 #16  0x419E66 in
 Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&,
 Ipopt::SmartPtr<Ipopt::AlgorithmBuilder>&) at IpIpoptApplication.cpp:769
 (discriminator 5)
 #17  0x419B62 in
 Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&)
 at IpIpoptApplication.cpp:732
 #18  0x419701 in
 Ipopt::IpoptApplication::OptimizeTNLP(Ipopt::SmartPtr<Ipopt::TNLP> const&)
 at IpIpoptApplication.cpp:711 (discriminator 3)
 #19  0x409974 in IpoptSolve at IpStdCInterface.cpp:272
 #20  0x408564 in ipsolve_ at IpStdFInterface.c:290
 #21  0x40674C in example at hs071_f.f:158
  ---- 8< ----  End of test program output  ---- 8< ----

     ******** Test FAILED! ********
 Output of the test program is above.
 Makefile:674: recipe for target 'test' failed
 make[2]: *** [test] Error 255
 make[2]: Leaving directory '/home/user/dev/ipopt-svn/src/Ipopt-
 svn/build/Ipopt/test'
 Makefile:1050: recipe for target 'unitTest' failed
 make[1]: *** [unitTest] Error 2
 make[1]: Leaving directory '/home/user/dev/ipopt-svn/src/Ipopt-
 svn/build/Ipopt'
 Makefile:687: recipe for target 'test' failed
 make: *** [test] Error 2
 }}}

 I do not know whether these 2 errors could be related, but I guess this is
 worth investigating. If you need more information, please let me know.


 Benjamin

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



More information about the Ipopt-tickets mailing list