whizard is hosted by Hepforge, IPPP Durham

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#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)

bug12.sin (276 bytes) - added by sschmidt 14 years ago.
single input file

Download all attachments as: .zip

Change History (10)

comment:1 Changed 14 years ago by Juergen Reuter

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.

comment:2 Changed 14 years ago by Juergen Reuter

The error appears only when increasing, not when decreasing the number of events.

comment:3 Changed 14 years ago by Juergen Reuter

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 14 years ago by Juergen Reuter

Milestone: v2.0finalv2.0-rc2

comment:5 Changed 14 years ago by kilian

Status: newassigned

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 14 years ago by sschmidt

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

Changed 14 years ago by sschmidt

Attachment: bug12.sin added

single input file

comment:7 Changed 14 years ago by sschmidt

just an idea: Could it be possible that the cause for this behaviour is the same as in #152 ?

Might be because #152 also doesn't appear on all machines. Could anybody check if these bugs appear always together?

comment:8 Changed 14 years ago by Christian Speckner

Resolution: fixed
Status: assignedclosed

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 :)

comment:9 Changed 14 years ago by Juergen Reuter

Milestone: v2.0-rc2

Milestone v2.0-rc2 deleted

Note: See TracTickets for help on using tickets.