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, if --mesh folder does not exist or contains wrong data #11

Closed
BenjaminRodenberg opened this issue May 8, 2020 · 1 comment

Comments

@BenjaminRodenberg
Copy link
Member

When reviewing precice/tutorials#73 I forgot to convert the output data to aste format using precice_to_aste.py as described in the tutorial's README.md. Therefore the folder preCICE-output only contained preCICE-output/Solid-fenics.dt*.vtk files. However, aste expects preCICE-output/Solid-fenics.dt* to work properly.

Running ./preciceMap -v -c precice-config.xml -p A --mesh preCICE-output/Solid-fenics led to a segmentation fault:

benjamin@benjamin-ThinkPad-X1-Yoga-2nd:~/aste/build$ ./preciceMap -v -c precice-config.xml -p A --mesh preCICE-output/Solid-fenics
2020-05-08 16:11:01,513 VERBOSE-1 [default] Basename: preCICE-output/Solid-fenics
2020-05-08 16:11:01,513 DEBUG [default] [benjamin@unknown-host] [std::vector<std::__cxx11::basic_string<char> > getMeshes(std::__cxx11::string, int)] [/home/benjamin/aste/src/preciceMap.cpp:47] Meshes:
(0) 16:11:01 [impl::SolverInterfaceImpl]:120 in configure: This is preCICE version 2.0.2
(0) 16:11:01 [impl::SolverInterfaceImpl]:121 in configure: Revision info: v2.0.1-146-g15fb6857-dirty
(0) 16:11:01 [impl::SolverInterfaceImpl]:122 in configure: Configuring preCICE with configuration "precice-config.xml"
(0) 16:11:01 [impl::SolverInterfaceImpl]:123 in configure: I am participant "A"
[benjamin-ThinkPad-X1-Yoga-2nd:11346] *** Process received signal ***
[benjamin-ThinkPad-X1-Yoga-2nd:11346] Signal: Segmentation fault (11)
[benjamin-ThinkPad-X1-Yoga-2nd:11346] Signal code: Address not mapped (1)
[benjamin-ThinkPad-X1-Yoga-2nd:11346] Failing at address: (nil)
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f4be1993890]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 1] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv+0x0)[0x7f4be1212470]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 2] ./preciceMap(_ZN2el4base14MessageBuilderlsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1c)[0x5646e908d448]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 3] ./preciceMap(_ZN2el4base6WriterlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS1_RKT_+0x33)[0x5646e908e0c7]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 4] ./preciceMap(_Z12readMainFileR4MeshRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x120)[0x5646e9082cfc]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 5] ./preciceMap(_Z8readMeshRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x60)[0x5646e9083534]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 6] ./preciceMap(main+0x3dd)[0x5646e9083ab8]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f4be0b04b97]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] [ 8] ./preciceMap(_start+0x2a)[0x5646e90821da]
[benjamin-ThinkPad-X1-Yoga-2nd:11346] *** End of error message ***
Segmentation fault (core dumped)

When does the error occur, how to improve it?

This Segmentation fault occurs in two cases:

  1. The --mesh folder does not exist.
  2. The folder exists, but contains wrong data (like explained above)

A meaningful error message would be more helpful than a segmentation fault.

Reproduce the error

The error can be reproduced by using the attached preCICE-output.zip folder and running ./preciceMap -v -c preCICE-output/precice-config.xml -p A --mesh preCICE-output/Solid-fenics from aste/build. (I've put the precice-config.xml into that folder to simplify the upload.)

@fsimonis
Copy link
Member

fsimonis commented Dec 3, 2020

This was fixed by 2f3a529

@fsimonis fsimonis closed this as completed Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants