whizard is hosted by Hepforge, IPPP Durham

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#798 closed defect (fixed)

Simple decays sindarin segfaults

Reported by: Bijan Chokoufe Nejad Owned by: kilian
Priority: P1 Milestone: v2.5.0
Component: core Version: 2.3.0
Severity: normal Keywords:
Cc:

Description

With the following, we get a segmentation fault

n_events = 1
process dec_T = t => b, Wp

!process eeWW = e1, E1 => t, T     !!! At this location -> all fine
integrate (dec_T)
process eeWW = e1, E1 => t, T     !!! At this location -> SIGSEGV

unstable t (dec_T)
sqrts = 450 GeV
simulate (eeWW)

As indicated above, it works when you integrate the decay after the definition of the production process. Using whizard --debug transforms, we see that it fails in the decay event transformation:

 Current event transform:
 Event transform: trivial (hard process)
 Current event transform:
 Event transform: partonic decays

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Change History (7)

comment:1 Changed 8 years ago by Juergen Reuter

Milestone: v2.3.1v2.3.2

comment:2 Changed 8 years ago by Juergen Reuter

Milestone: v2.3.2v2.4.0

Milestone renamed

comment:3 Changed 7 years ago by Juergen Reuter

Milestone: v2.4.0v2.4.1

comment:4 Changed 7 years ago by kilian

Status: newassigned

The actual issue is that event generation has to call the matrix element of the decay. After the decay process has been generated and integrated, a new process is added, and the whole process library is recompiled. The old matrix element (compiled) code is lost. However, the matrix element call occurs via a procedure pointer to the old library. This has to fail, and it is outside of the control of the Fortran runtime, therefore no backtrace (Nagfor).

Possible cure: recompiling the library has to invalidate all previous references to it. I'll have to think about the level where this can be detected.

comment:5 Changed 7 years ago by kilian

Fixed. Recompiling the process library invalidates all pointers to it. I inserted a counter that is incremented whenever this occurs. When a process instance is created, it will check the process whether the counter still agrees with a stored value.

In effect, the program aborts with a fatal error if an invalid library is accessed.

(NB: The bugfix branch contains a leftover bug from the fix of #792, so make check will fail at that point. To be resolved when the #792 branch has been successfully merged.)

Last edited 7 years ago by kilian (previous) (diff)

comment:6 Changed 7 years ago by Juergen Reuter

Resolution: fixed
Status: assignedclosed

Fixed in trunk in r7853.

comment:7 Changed 7 years ago by Juergen Reuter

Milestone: v2.4.1v2.5.0

Milestone renamed

Note: See TracTickets for help on using tickets.