Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault Sensitive To Ordering of 2D Binning #245

Open
BenJarg opened this issue Dec 13, 2024 · 1 comment
Open

Segfault Sensitive To Ordering of 2D Binning #245

BenJarg opened this issue Dec 13, 2024 · 1 comment
Labels
Bug Fix Something isn't working

Comments

@BenJarg
Copy link
Contributor

BenJarg commented Dec 13, 2024

Describe the bug

When running for DUNE atmospheric event rates with DUNE MaCh3, I get segfaults with specific configuration of 2D binnings. Specifically, this binning with the otherwise nominal configuration causes a segfault:

Binning:
  XVarStr: "RecoNeutrinoEnergy"
  XVarBins: [0., 0.25, 0.5, 0.75, 1.,  1.25, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.25, 3.5, 3.75, 4., 4.25, 4.5, 4.75, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 100000.]
  YVarStr: "RecoCosineZ"
  YVarBins: [-1.0, -0.7777777777777778, -0.5555555555555556, -0.33333333333333337, -0.11111111111111116, 0.11111111111111116, 0.33333333333333326, 0.5555555555555554, 0.7777777777777777, 1.0]

but this binning does not

Binning:
  YVarStr: "RecoNeutrinoEnergy"
  YVarBins: [0., 0.25, 0.5, 0.75, 1.,  1.25, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.25, 3.5, 3.75, 4., 4.25, 4.5, 4.75, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 100000.]
  XVarStr: "RecoCosineZ"
  XVarBins: [-1.0, -0.7777777777777778, -0.5555555555555556, -0.33333333333333337, -0.11111111111111116, 0.11111111111111116, 0.33333333333333326, 0.5555555555555554, 0.7777777777777777, 1.0]

where the only difference is swapping the x and y axes.

To Reproduce

Running the DUNE MaCh3 EventRates executable with the atmospheric config, with the above prescribed binning.

Additional context

DUNE MaCh3 is pulling the v1.2.0_alpha tag of MaCh3 core. The relevent backtrace spit out by ROOT is

v1.2.0_alpha
#0  0x00007f333e5075a7 in __GI___wait4 (pid=11514, stat_loc=stat_loc
entry=0x7ffc841dfe78, options=options
entry=0, usage=usage
entry=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007f333e5076b7 in __GI___waitpid (pid=<optimized out>, stat_loc=stat_loc
entry=0x7ffc841dfe78, options=options
entry=0) at ./posix/waitpid.c:38
#2  0x00007f333e465e5b in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:172
#3  0x00007f334056745e in TUnixSystem::StackTrace() () from /usr/lib/root/libCore.so
#4  0x00007f3340566dd4 in TUnixSystem::DispatchSignals(ESignals) () from /usr/lib/root/libCore.so
#5  <signal handler called>
#6  0x00007f334095cb78 in _ZN15samplePDFFDBase12fillArray_MPEv._omp_fn.0(void) () at MaCh3_DUNE/build/_deps/mach3-src/samplePDF/samplePDFFDBase.cpp:660
#7  0x00007f3340747dd6 in GOMP_parallel () from /usr/lib/libgomp.so.1
#8  0x00007f334095c372 in samplePDFFDBase::fillArray_MP (this=this
entry=0x55a7241ab518) at MaCh3_DUNE/build/_deps/mach3-src/samplePDF/samplePDFFDBase.cpp:521
#9  0x00007f334095f090 in samplePDFFDBase::fillArray (this=this
entry=0x55a7241ab518) at MaCh3_DUNE/build/_deps/mach3-src/samplePDF/samplePDFFDBase.cpp:383
#10 0x00007f334095f207 in samplePDFFDBase::reweight (this=0x55a7241ab518) at MaCh3_DUNE/build/_deps/mach3-src/samplePDF/samplePDFFDBase.cpp:363
#11 0x000055a6f339cbf6 in main (argc=<optimized out>, argv=<optimized out>) at MaCh3_DUNE/src/EventRates.cpp:63

This points to where Sample->reweight(); is called in EventRates, leading to somewhere in fillArray_MP in core.

@BenJarg BenJarg added the Bug Fix Something isn't working label Dec 13, 2024
Copy link

This is your first issue, thank you for contributing to MaCh3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant