#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
Milestone: | v2.3.1 → v2.3.2 |
---|
comment:2 Changed 8 years ago by
Milestone: | v2.3.2 → v2.4.0 |
---|
comment:3 Changed 7 years ago by
Milestone: | v2.4.0 → v2.4.1 |
---|
comment:4 Changed 7 years ago by
Status: | new → assigned |
---|
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
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.)
comment:6 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in trunk in r7853.
Milestone renamed