[Bonmin] Segfault in simple example

Paul Lange paul.lange at fcc.chalmers.se
Thu Jan 19 05:07:33 EST 2017


Hello,

I'm trying to use Bonmin but unfortunately have problems with getting a 
simple example to work.

See the code here [1], it's basically a cleaned up version of the 
provided example.
When I run it, I get a segfault like shown below. I tried compiling with 
different versions of gcc. Below is the output from a version compiled 
with clangs address sanitizer.

Any help, ideas or tips are greatly appreciated.

Thanks and best regards,
Paul

[1] https://gist.github.com/anonymous/7c5d9cfb3b69ae51f7c9ccd4b68d6b85







/clangsantitize> ./bonmin_test
ASAN:SIGSEGV
=================================================================
==22261==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 
(pc 0x7f1d1334849c sp 0x7ffcc74f9990 bp 0x7ffcc74f99d0 T0)
     #0 0x7f1d1334849b in Bonmin::TMINLP2TNLP::get_nlp_info(int&, int&, 
int&, int&, Ipopt::TNLP::IndexStyleEnum&) 
/usr/src/debug/Bonmin-1.8.4/src/Interfaces/BonTMINLP2TNLP.cpp:339
     #1 0x7f1d14168f1e in 
Ipopt::OrigIpoptNLP::Initialize(Ipopt::Journalist const&, 
Ipopt::OptionsList const&, std::string const&) 
(/home/software/IpOpt/lib/libipopt.so.1+0x118f1e)
     #2 0x7f1d141266eb in 
Ipopt::IpoptAlgorithm::InitializeImpl(Ipopt::OptionsList const&, 
std::string const&) (/home/software/IpOpt/lib/libipopt.so.1+0xd66eb)
     #3 0x7f1d140b3535 in Ipopt::IpoptApplication::call_optimize() 
(/home/software/IpOpt/lib/libipopt.so.1+0x63535)
     #4 0x7f1d140bcb9e in 
Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&, 
Ipopt::SmartPtr<Ipopt::AlgorithmBuilder>&) 
(/home/software/IpOpt/lib/libipopt.so.1+0x6cb9e)
     #5 0x7f1d140bc9dc in 
Ipopt::IpoptApplication::OptimizeNLP(Ipopt::SmartPtr<Ipopt::NLP> const&) 
(/home/software/IpOpt/lib/libipopt.so.1+0x6c9dc)
     #6 0x7f1d13360fb6 in 
Bonmin::IpoptSolver::OptimizeTNLP(Ipopt::SmartPtr<Ipopt::TNLP> const&) 
/usr/src/debug/Bonmin-1.8.4/src/Interfaces/Ipopt/BonIpoptSolver.cpp:144
     #7 0x7f1d1333a3ea in 
Bonmin::OsiTMINLPInterface::solveAndCheckErrors(bool, bool, char const*) 
/usr/src/debug/Bonmin-1.8.4/src/Interfaces/BonOsiTMINLPInterface.cpp:2616
     #8 0x7f1d1333cb69 in Bonmin::OsiTMINLPInterface::initialSolve(char 
const*) 
/usr/src/debug/Bonmin-1.8.4/src/Interfaces/BonOsiTMINLPInterface.cpp:2797
     #9 0x7f1d12d335cd (/lib64/libCbc.so.3+0xa45cd)
     #10 0x7f1d132dfe7e in 
Bonmin::Bab::branchAndBound(Bonmin::BabSetupBase&) 
/usr/src/debug/Bonmin-1.8.4/src/CbcBonmin/BonCbc.cpp:452
     #11 0x47d1c0 in main 
/home/lange/workspace/Playground/ipopt_test/MyBonmin.cpp:39
     #12 0x7f1d0f6a6b14 in __libc_start_main (/lib64/libc.so.6+0x21b14)
     #13 0x47ce4c in _start 
(/scratch/lange/Playground/ipopt_test/clangsantitize/bonmin_test+0x47ce4c)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV 
/usr/src/debug/Bonmin-1.8.4/src/Interfaces/BonTMINLP2TNLP.cpp:339 
Bonmin::TMINLP2TNLP::get_nlp_info(int&, int&, int&, int&, 
Ipopt::TNLP::IndexStyleEnum&)
==22261==ABORTING



More information about the Bonmin mailing list