QuadrupoleStepper abort for reference particle in fieldmaps branch

Issue #135 resolved
Jochem Snuverink created an issue

In the fieldmaps branch the test 1_bunchtest_Reference fails with:

---> Begin of event: 0

Program received signal SIGABRT, Aborted.
0x00007fff861a1286 in __pthread_kill ()
(gdb) bt
#0  0x00007fff861a1286 in __pthread_kill ()
#1  0x00007fff8a6559f9 in pthread_kill ()
#2  0x00007fff8d0c1a4b in __abort ()
#3  0x00007fff8d0c2329 in __stack_chk_fail ()
#4  0x00000001001f42cf in BDSIntegratorQuadrupole::Stepper (this=0x1077488c0, yInput=0x7fff5fbfcd70, dydx=0x7fff5fbfd0d0, h=499.99999999900001, yOut=0x7fff5fbfcd10, yErr=0x7fff5fbfcdd0) at /Users/jsnuverink/Documents/bdsim/src/BDSIntegratorQuadrupole.cc:248

This is an indication of a stack overflow. I couldn't pinpoint it but this happens when the backupstepper is invoked in AdvanceHelix() (since the particle goes through the centre and sees no magnetic field).

Calling the backupstepper here might be a bit of an overkill since this does several steps on top of the steps from BDSIntegratorQuadrupole::Stepper while the advance will just be a linear step.

When replacing the backupstepper with the linear step like is done for kappa==0, there is no crash.

Comments (2)

  1. Jochem Snuverink reporter

    This issue currently prevents the reporting back to cdash for the fieldmaps branch. Since the fieldmaps branch is planned to merge soon into develop, I will upgrade its priority.

  2. Log in to comment