Segmentation fault while running DepositionCosmics with hybrid detectors

Hi,
I’m running a simulation to evaluate response of CMS PS modules on cosmic rays and I encountered the following problem:

A segfault happens randomly, and (if I get that right from the output) it is caused by double free or corruption in G4VPhysicalVolume::GetTranslation(). This happens once per approx. 100k events. So, my assumptions are that my geometry is invalid somewhere, and that causes a rare weird interaction with the deposition module.

The configuration is attached below. Here I am using a user-defined detector, cms_p2_psp.

I also tried to reproduce this crash with different configurations:

  • I couldn’t reproduce that if DepositionGeant4 is used instead of DepositionCosmics
  • I couldn’t reproduce that if another similar user-defined detector (but a monolithic one) is used

Main configuration (just bare deposition):

[Allpix]
detectors_file = "geometry.conf"
log_level = "WARNING"
number_of_events = 1000000
multithreading = true
workers = 6

[GeometryBuilderGeant4]

[DepositionCosmics]
physics_list = FTFP_BERT_LIV
number_of_particles = 1
output_plots = true

A detector that presumably causes trouble:
cms_p2_psp.conf

type = "hybrid"
geometry = "pixel"

number_of_pixels = 960 32
pixel_size = 100um 1.5mm

sensor_thickness = 250um
sensor_excess = 2mm

chip_thickness = 350um
bump_sphere_radius = 10um
bump_cylinder_radius = 7um
bump_height = 20um
chip_excess_right = -2mm
chip_excess_left = -2mm
chip_excess_top = 3mm
chip_excess_bottom = 3mm

# Kapton sheet
[support]
location = "sensor"
size = 104mm 50mm
thickness = 30um
material = "kapton"

# Baseplate
[support]
location = "sensor"
size = 120mm 48mm
thickness = 200um
material = "carbonfiber"

Hi @drastorg

thanks for reporting this!

  • any chance you have a stack trace for the crash?
  • Is this always happening for the same events?
  • Could the issue reported here be related?

Cheers,
Simon