Attached is the backtrace. 

Maybe there is an issue with the libmwmvm.so library. 
This library is not explicitly listed under the linked dependencies (ldd 
./step-1), 
but I do not know if this is the problem or not.

Maybe you have a better understanding of the backtrace.

Best,
Math

Matthias Maier schrieb am Freitag, 23. Juni 2023 um 06:48:35 UTC+2:

> In the debugger after you ran with the command »r« could you please try
> to generate a back trace with »bt«?
>
> (gdb) r
> ...
> (gdb) bt
> ...
>
> Best,
> Matthias
>
>
>
> On Thu, Jun 22, 2023, at 17:12 CDT, Mathieu <mathi...@gmail.com> wrote:
>
> > See ldd.txt for the output of 
> > $ ldd ./step-1
> > and gdb.txt for the output of
> > $ gdb ./step-1
> >
> > Does this help?
> >
> >
> >
> > Matthias Maier schrieb am Donnerstag, 22. Juni 2023 um 23:28:16 UTC+2:
> >
> >> The most likely issue will be a "symbol clash" either due to ABI
> >> incompatible versions of the same external shared library linked into
> >> the executable, or due to the matlab shared library you are linking
> >> against containing these.
> >>
> >> Can you send us the output of $ ldd executable (for a faulty one)?
> >>
> >> Furthermore, have you tried running the startup in a debugger such as
> >> gdb? If possible, the stacktrace for the segfault will be very
> >> illuminating:
> >>
> >> $ gdb executable
> >> > run
> >> > bt
> >>
> >> Best,
> >> Matthias
> >>
> >>
> >>
> >> On Thu, Jun 22, 2023, at 14:46 CDT, Mathieu <mathi...@gmail.com> wrote:
> >>
> >> > Thanks Matthias for clarification. 
> >> > But as I said, I do not have this problem using the default compiler 
> on 
> >> my 
> >> > system. 
> >> >
> >> > Since I have no experience with a debugger, I let valgrind run on the 
> >> > program:
> >> > valgrind --tool=memcheck --leak-check=full --track-origins=yes 
> ./step-1
> >> > (see the attachment for the output). 
> >> >
> >> > From the memcheck, I can not deduce anything that would bring me 
> closer 
> >> to 
> >> > the bottom.
> >> > Do you have any suggestions based on the memcheck?
> >> > I could imagine there is a mismatch between some deal.II dependencies 
> >> (TBB 
> >> > ?) and the 
> >> > corresponding versions shipped with matlab.
> >> >
> >> > Best,
> >> > Math
> >> >
> >> >
> >> >
> >> > Matthias Maier schrieb am Donnerstag, 22. Juni 2023 um 20:14:02 UTC+2:
> >> >
> >> >
> >> > On Thu, Jun 22, 2023, at 04:13 CDT, Mathieu <mathi...@gmail.com> 
> wrote: 
> >> >
> >> >> Good point to narrow down the problem. 
> >> >> I modified step-1 so that the main function only calls matlab via 
> >> >> callFevalsqrt(). 
> >> >> This works fine, even if I use the mpi compiler mentioned in my 
> >> original 
> >> >> post. 
> >> >> However, if I just add a second line in the main function, 
> >> >> dealii::Triangulation<2> triangulation, 
> >> >> I run again into the segfault. 
> >> >
> >> > What happens when you include this statement in yourr main function 
> is 
> >> > that your main.cc compilation unit now contains a symbol to the 
> deal.II 
> >> > library. The linker will then keep libdeal_ii.so as a shared object 
> >> > dependency. If you do not actually use any symbol from the deal.II 
> >> > library itself then the linker might drop the shared object 
> altogether 
> >> > and the final result is as if you never linked to deal.II in the 
> first 
> >> > place. You can verify this by running "ldd" on the executable: 
> >> >
> >> > $ ldd executable 
> >> > libdeal_II.so.9999 => /usr/lib64/libdeal_II.so 
> >> >
> >> > Best, 
> >> > Matthias 
> >>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7d70c52b-fb95-4570-a9b4-def880438ca2n%40googlegroups.com.
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./step-1...
(gdb) r
Starting program: /opt/dealii-9.4.1/examples/step-1/step-1 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffbddff640 (LWP 3220190)]
[New Thread 0x7fffbd5fe640 (LWP 3220191)]

Thread 3 "step-1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffbd5fe640 (LWP 3220191)]
0x00007fffc60cab83 in ?? () from /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so
(gdb) bt
#0  0x00007fffc60cab83 in ?? () from /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so
#1  0x00007fffd7099f68 in __pthread_once_slow (once_control=0x5555558569a0, 
init_routine=0x7fffd74dadb0 <__once_proxy>) at ./nptl/pthread_once.c:116
#2  0x00007fffc60ca6cd in mvm::detail::DefaultSession::getTransportSession() 
const () from /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so
#3  0x00007fffc60bc8e1 in ?? () from /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so
#4  0x00007fffc60f9cbd in ?? () from /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so
#5  0x00007fffc60fa152 in 
mvm::MatlabFactory::createFactory(mwboost::shared_ptr<mvm::Session> const&, 
mvm::FactoryOptions const&, mvm::ShutdownPolicy, bool, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > 
const&, fl::filesystem::basic_path<char, char16_t, 
fl::filesystem::detail::path_traits<char, char16_t> >, 
std::shared_ptr<mvm::Credentials>, std::map<std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > >, 
std::allocator<std::pair<std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > 
> > >, bool, unsigned long, std::optional<mwboost::chrono::duration<long, 
mwboost::ratio<1l, 1l> > >, bool) ()
   from /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so
#6  0x00007fffc6408a54 in ?? () from 
/opt/MATLAB/R2023a/bin/glnxa64/libmwengine_api.so
#7  0x00007fffc641ac1c in 
std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, 
std::__future_base::_Result_base::_Deleter> (), 
std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<unsigned
 long long>, std::__future_base::_Result_base::_Deleter>, 
std::thread::_Invoker<std::tuple<unsigned long long 
(*)(std::vector<std::__cxx11::basic_string<char16_t, 
std::char_traits<char16_t>, std::allocator<char16_t> >, 
std::allocator<std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, 
std::allocator<char16_t> > > >), 
std::vector<std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, 
std::allocator<char16_t> >, std::allocator<std::__cxx11::basic_string<char16_t, 
std::char_traits<char16_t>, std::allocator<char16_t> > > > > >, unsigned long 
long> >::_M_invoke(std::_Any_data const&) () from 
/opt/MATLAB/R2023a/bin/glnxa64/libmwengine_api.so
#8  0x00005555555f781a in 
std::function<std::unique_ptr<std::__future_base::_Result_base, 
std::__future_base::_Result_base::_Deleter> ()>::operator()() const 
(this=0x7fffbd5ef780) at /usr/include/c++/12/bits/std_function.h:591
#9  0x00005555555efb8e in 
std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base,
 std::__future_base::_Result_base::_Deleter> ()>*, bool*) (this=0x7fffb8000b80, 
__f=0x7fffbd5ef780, 
    __did_set=0x7fffbd5ef757) at /usr/include/c++/12/future:572
#10 0x00007fffd7099f68 in __pthread_once_slow (once_control=0x7fffb8000b98, 
init_routine=0x7fffd74dadb0 <__once_proxy>) at ./nptl/pthread_once.c:116
#11 0x00007fffc641d3fc in 
std::thread::_State_impl<std::thread::_Invoker<std::tuple<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<unsigned
 long long (*)(std::vector<std::__cxx11::basic_string<char16_t, 
std::char_traits<char16_t>, std::allocator<char16_t> >, 
std::allocator<std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, 
std::allocator<char16_t> > > >), 
std::vector<std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, 
std::allocator<char16_t> >, std::allocator<std::__cxx11::basic_string<char16_t, 
std::char_traits<char16_t>, std::allocator<char16_t> > > > > >, unsigned long 
long>::_Async_state_impl(std::thread::_Invoker<std::tuple<unsigned long long 
(*)(std::vector<std::__cxx11::basic_string<char16_t, 
std::char_traits<char16_t>, std::allocator<char16_t> >, 
std::allocator<std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, 
std::allocator<char16_t> > > >), 
std::vector<std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, 
std::allocator<char16_t> >, std::allocator<std::__cxx11::basic_string<char16_t, 
std::char_traits<char16_t>, std::allocator<char16_t> > > > > 
>&&)::{lambda()#1}> > >::_M_run() ()
   from /opt/MATLAB/R2023a/bin/glnxa64/libmwengine_api.so
#12 0x00007fffd74dc2b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x00007fffd7094b43 in start_thread (arg=<optimized out>) at 
./nptl/pthread_create.c:442
#14 0x00007fffd7126a00 in clone3 () at 
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) quit
A debugging session is active.

        Inferior 1 [process 3220065] will be killed.

Quit anyway? (y or n) y

Reply via email to