NuWro / nuwro

The main distribution of NuWro
GNU General Public License v3.0
14 stars 15 forks source link

Rare DISNC events to cause nuwro to crash #30

Open karuboniru opened 1 year ago

karuboniru commented 1 year ago

params.txt to reproduce the error

The reason turns to be this line https://github.com/NuWro/nuwro/blob/c8d29a6c61e65b847642bab7b29c1683a5853ea6/src/dis/disevent.cc#L248 was unable to catch a rare events with cth = 1.0000000000014864. And cause nuwro to crash with backtrace:

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
    at pthread_kill.c:44
#1  0x00007ffff52afc03 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff525eaee in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff524787f in __GI_abort () at abort.c:79
#4  0x00007ffff524779b in __assert_fail_base (fmt=0x7ffff53c4a98 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x532913 "vv < 1", file=file@entry=0x532908 "src/vect.h", line=line@entry=167, 
    function=function@entry=0x5328f0 "vect& vect::boost1(vec)") at assert.c:92
#5  0x00007ffff5257177 in __assert_fail (assertion=0x532913 "vv < 1", file=0x532908 "src/vect.h", line=167, 
    function=0x5328f0 "vect& vect::boost1(vec)") at assert.c:101
#6  0x0000000000448ffd in vect::boost1 (this=0x7fffffffb480, v=...) at src/vect.h:167
#7  0x000000000044946c in vect::boost (this=0x7fffffffb480, v=...) at src/vect.h:224
#8  0x00000000005098f0 in disevent (p=..., e=..., t=..., cc=false) at src/dis/disevent.cc:310
#9  0x000000000047e800 in NuWro::makeevent (this=0xbf5e60 <nuwro>, e=0x1f70e30, p=...) at src/nuwro.cc:352
#10 0x00000000004806d7 in NuWro::test_events (this=0xbf5e60 <nuwro>, p=...) at src/nuwro.cc:629
#11 0x00000000004837a1 in NuWro::main (this=0xbf5e60 <nuwro>, argc=5, argv=0x7fffffffd3b8) at src/nuwro.cc:1005
#12 0x00000000004cc1f7 in main (argc=5, argv=0x7fffffffd3b8) at src/main.cc:35

I understood that this is pure numeric error during calculation but maybe we can consider relaxing the range on that line?