phil-mansfield / shellfish

A Go-based package which identifies the splashback shell of halos from N-body simulations.
MIT License
13 stars 5 forks source link

Segfaults in header reading code under certain setups #150

Closed phil-mansfield closed 7 years ago

phil-mansfield commented 7 years ago

It's not clear exact what factors cause this:

config:

  [config]
  Version = 1.0.0
  SnapshotType = LGadget-2
  HaloType = nil
  TreeType = nil
  SnapshotFormat =
/vol/porciani2/data1/emiliord/accretion/data/halo1202_4096_baryons/nbody/gdgt_%03d_l1
  SnapshotFormatMeanings = Snapshot
  SnapMin = 681
  SnapMax = 681
  MemoDir = /vol/porciani2/data1/egaraldi/accretion/shellfish/memodir
  Endianness = SystemOrder
  ValidateFormats = false
  Threads = -1
  Logging = nil

Stacktrace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x4cc989]

goroutine 1 [running]:
github.com/phil-mansfield/shellfish/cmd/memo.readUnmemoizedHeaders(0x2a9,
0x0, 0x0, 0xc420126150, 0x8e0240, 0xc4200ccf30, 0xe, 0x5f8660, 0x4,
0x25, ...)

/vol/aibn230/data1/egaraldi/golang/go/src/github.com/phil-mansfield/shellfish/cmd/memo/memoize.go:250
+0x169
github.com/phil-mansfield/shellfish/cmd/memo.ReadHeaders(0x2a9, 0x0,
0x0, 0xc420126150, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

/vol/aibn230/data1/egaraldi/golang/go/src/github.com/phil-mansfield/shellfish/cmd/memo/memoize.go:270
+0x252
github.com/phil-mansfield/shellfish/cmd.loop(0xc4201505f8, 0x1, 0x1,
0xc420150610, 0x1, 0x1, 0xc4200c6a80, 0x4, 0x4, 0xc4200d8080, ...)

/vol/aibn230/data1/egaraldi/golang/go/src/github.com/phil-mansfield/shellfish/cmd/shell.go:303
+0x955
github.com/phil-mansfield/shellfish/cmd.(*ShellConfig).Run(0xc4200d8080,
0xc4201281c0, 0xc420126150, 0xc4200dc1c0, 0x1, 0x2, 0x0, 0x0, 0x5, 0x1, ...)

/vol/aibn230/data1/egaraldi/golang/go/src/github.com/phil-mansfield/shellfish/cmd/shell.go:239
+0x49d
main.main()

/vol/aibn230/data1/egaraldi/golang/go/src/github.com/phil-mansfield/shellfish/shellfish.go:407
+0x51c