spirit icon indicating copy to clipboard operation
spirit copied to clipboard

Segmentation fault when disabling DDI during simulation

Open FinnHoller opened this issue 1 year ago • 6 comments

I have downloaded the new Spirit-2.2.0 release (revision b739e4e06f31c) and noticed a bug in the cpp-ui (qt). Previously it was possible to tweak the Heisenberg Hamiltonian parameters, while running a simulation (tested for LLG and MC). In this new version this still seems possible, although less responsive. Only when enabling or disabling the dipole-dipole interaction, the program crashes with a segmentation fault.

I have compiled the code from source, with following options: cmake -DSPIRIT_USE_OPENMP=OFF ..

System information:

  • OS: Linux Mint 21.1 Vera
  • CMAKE: cmake version 3.22.1
  • CPP: cpp (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  • CPU: Intel Core i5-6400T

FinnHoller avatar Mar 23 '23 09:03 FinnHoller

I just tested and this does not happen in LLG when openMP is enabled. It still happens with MC.

FinnHoller avatar Mar 23 '23 10:03 FinnHoller

I have the suspicion that the GUI might be passing a nullptr to the C API somewhere. Not sure when, but a few misuses of the C API in the GUIs seem to have crept in. On the develop branch I added a bunch of throw_if_nullptr checks around the arguments of the C API functions, which will generate a decent log message if the API is used incorrectly.

Could you try the develop branch to see whether the issue persists for you there?

GPMueller avatar Mar 24 '23 14:03 GPMueller

I have cloned and built the develop branch, but there are no logs when the segmentation fault happens, should these appear in the spirit log or on the standard output?

FinnHoller avatar Mar 27 '23 06:03 FinnHoller

So the segfault still happens?

I'll try to reproduce this as soon as I can. In case it might be helpful please attach your input-config.

GPMueller avatar Mar 27 '23 17:03 GPMueller

Yes it does still happen.

This is the configuration I am using: test_cfg.txt

FinnHoller avatar Mar 28 '23 07:03 FinnHoller

I also got this error while changing the exchange interation during an LLG (solver: LBFGS_Atlas) simulation:

malloc(): unsorted double linked list corrupted
Segmentation fault

FinnHoller avatar Mar 29 '23 08:03 FinnHoller