#154 closed defect (fixed)
running with different n_events gives segfault
Reported by: | sschmidt | Owned by: | kilian |
---|---|---|---|
Priority: | P3 | Milestone: | |
Component: | core | Version: | 2.0.0beta |
Severity: | normal | Keywords: | |
Cc: |
Description
Running e.g. test/qedtest.sin with n_events = 10 and afterwards increasing n_events and running it again produces a segfault when reading the events file:
Reading events from file 'whizard.evx' ... Segmentation fault
Attachments (1)
Change History (10)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
The error appears only when increasing, not when decreasing the number of events.
comment:3 Changed 15 years ago by
Here is the gdb backtrace for the case of increasing from 15 to 16 events:
#0 data_transfer_init (dtp=0xbf1c20ec, read_flag=1) at ../../../libgfortran/io/transfer.c:2070 #1 0xb7d8c2b5 in __flavors_MOD_flavor_read_raw () at flavors.f90:222 #2 0xb7d9040c in __quantum_numbers_MOD_quantum_numbers_read_raw () at quantum_numbers.f90:380 #3 0xb7d9555d in __state_matrices_MOD_node_read_raw_rec () at state_matrices.f90:303 #4 0xb7d95707 in __state_matrices_MOD_node_read_raw_rec () at state_matrices.f90:311 #5 0xb7d95707 in __state_matrices_MOD_node_read_raw_rec () at state_matrices.f90:311 .... (going up to #57) ....
comment:4 Changed 15 years ago by
Milestone: | v2.0final → v2.0-rc2 |
---|
comment:5 Changed 15 years ago by
Status: | new → assigned |
---|
I can't reproduce this, neither with nagfor, neither with gfortran. Could you double-check and/or be more specific on the input?
(Maybe it's gone with a recent update?)
comment:6 Changed 15 years ago by
I still have the error with both nagfor and gfortran and r1634
I assembled the three steps into one sin file (see attached), the output is
n_events = 10 | No analysis setup has been provided. | Reading events from file 'whizard.evx' ... | ... 10 events read. n_events = 100 | No analysis setup has been provided. | Reading events from file 'whizard.evx' ... Segmentation fault
comment:7 Changed 15 years ago by
comment:8 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in r1641. WHIZARD checked iostat only after trying to read in the event including the density matrices, resulting ultimately in read being called on invalid memory (a null pointer on my system). WK might want to check if he likes the place I put the check :)
The problem appears only if the user changes the number of events from n1 /= n2, but does not rerun with the "-r" option. If the user correctly uses that option then everything is fine. But, there should be a MD5 checksum mismatch for the first case, or something similar.