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

Segmentation fault from from /lib/libipopt.so.1 #758

Open
cch-cs opened this issue Apr 9, 2024 · 3 comments
Open

Segmentation fault from from /lib/libipopt.so.1 #758

cch-cs opened this issue Apr 9, 2024 · 3 comments

Comments

@cch-cs
Copy link

cch-cs commented Apr 9, 2024

I have configured the Ipopt package (version 3.14) without-hsl.
My module builds successfully, but when I call the solver to solve,
I get segmentation fault for the function call Ipopt::IpoptApplication::OptimizeTNLP(Ipopt::SmartPtr<Ipopt::TNLP> const&) () in the library /lib/libipopt.so.1

I am not sure why this issue happens

I do install the following modules for compiling my module

git clone -b master https://github.com/coin-or/CppAD.git
cd CppAD
mkdir build
cd build
cmake ..
make install

git clone https://github.com/coin-or-tools/ThirdParty-ASL.git
cd ThirdParty-ASL
./get.ASL
./configure
make
make install

git clone https://github.com/coin-or-tools/ThirdParty-Mumps.git
cd ThirdParty-Mumps
./get.Mumps
./configure
make
make install

git clone -b stable/3.14 https://github.com/coin-or/Ipopt.git
cd Ipopt
mkdir build
cd build
../configure --without-hsl
make
make test
make install

It would be great if you guys help me resolve this issue.
Thanks in advance.

@svigerske
Copy link
Member

Maybe build Ipopt with --enable-debug (https://coin-or.github.io/Ipopt/INSTALL.html#CONFIGURE_FLAGS) and then run your code in a debugger or under valgrind.

@ShuqiXu
Copy link

ShuqiXu commented Jul 17, 2024

I got the same issue for version 3.14.16
image

This issue happened rarely, but it happened from time to time.

@svigerske
Copy link
Member

Could you add the following check

--- a/src/Algorithm/IpBacktrackingLineSearch.cpp
+++ b/src/Algorithm/IpBacktrackingLineSearch.cpp
@@ -871,6 +871,9 @@ void BacktrackingLineSearch::StopWatchDog(
 
    in_watchdog_ = false;
 
+   assert(IsValid(watchdog_iterate_));
+   assert(IsValid(watchdog_delta_));
+
    // Reset all fields in IpData to reference point
    SmartPtr<IteratesVector> old_trial = watchdog_iterate_->MakeNewContainer();
    IpData().set_trial(old_trial);

and build a debug version of Ipopt (configure with --enable-debug) and get the backtrace again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants