A crash (#5 0x00007f420ba7abf4 in SigHandler(ESignals) () from /opt/root6/lib/libCore.so)

  • ROOT 6.13/01 Built for linuxx8664gcc
    From heads/master@v6-11-02-2013-gd639b6a,
    Mar 09 2018, 10:15:08

I’m using TTree in my macro and I get the following error:

===========================================================
There was a crash (#5 0x00007f420ba7abf4 in SigHandler(ESignals) () from /opt/root6/lib/libCore.so).
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f4209fab07a in __GI___waitpid (pid=5089, stat_loc=stat_loc
entry=0x7ffd374514f0, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00007f4209f23fbb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2  0x00007f420ba7edce in TUnixSystem::Exec(char const*) () from /opt/root6/lib/libCore.so
#3  0x00007f420ba7f68e in TUnixSystem::StackTrace() () from /opt/root6/lib/libCore.so
#4  0x00007f420ba8328b in TUnixSystem::DispatchSignals(ESignals) () from /opt/root6/lib/libCore.so
#5  0x00007f420ba7abf4 in SigHandler(ESignals) () from /opt/root6/lib/libCore.so
#6  0x00007f420ba831dd in sighandler(int) () from /opt/root6/lib/libCore.so
#7  <signal handler called>
#8  0x0000000000402e8b in main ()
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#8  0x0000000000402e8b in main ()
===========================================================

Someone have some tips how to fix this?

Cheers, Andre

Hi,

Can you please post your macro?

Cheers,
Oksana

Thanks for the reply.

I’m trying to run the macro main112.cc from pythia8.230:
main112.cc (10.1 KB)
call the library TTree from root

  • ROOT 6.13/01 Built for linuxx8664gcc
    From heads/master@v6-11-02-2013-gd639b6a,
    Mar 09 2018, 10:15:08

Makefile:

# Makefile is a part of the PYTHIA event generator.
# Copyright (C) 2017 Torbjorn Sjostrand.
# PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
# Please respect the MCnet Guidelines, see GUIDELINES for details.
# Author: Philip Ilten, September 2014.
#
# This is is the Makefile used to build PYTHIA examples on POSIX systems.
# Example usage is:
#     make main01
# For help using the make command please consult the local system documentation,
# i.e. "man make" or "make --help".

################################################################################
# VARIABLES: Definition of the relevant variables from the configuration script.
################################################################################

FLAGS = -w -I/opt/root6/include -I../include -O2  -pedantic -W -Wall -Wshadow -fPIC -L../lib -Wl,-rpath,../lib -lpythia8 -ldl  `root-config --cflags` -Wl,-rpath,./ -Wl,-rpath,/opt/root6/lib `/opt/root6/bin/root-config --glibs`

# Set the shell.
SHELL=/usr/bin/env bash

# Include the configuration.
-include Makefile.inc

# Handle GZIP support.
ifeq ($(GZIP_USE),true)
  CXX_COMMON+= -DGZIPSUPPORT -I$(GZIP_INCLUDE)
  CXX_COMMON+= -L$(GZIP_LIB) -Wl,-rpath,$(GZIP_LIB) -lz
endif

# Check distribution (use local version first, then installed version).
ifneq ("$(wildcard ../lib/libpythia8.*)","")
  PREFIX_LIB=../lib
  PREFIX_INCLUDE=../include
endif
CXX_COMMON:=-I$(PREFIX_INCLUDE) $(CXX_COMMON)
CXX_COMMON+= -L$(PREFIX_LIB) -Wl,-rpath,$(PREFIX_LIB) -lpythia8 -ldl 

################################################################################
# RULES: Definition of the rules used to build the PYTHIA examples.
################################################################################

# Rules without physical targets (secondary expansion for specific rules).
.SECONDEXPANSION:
.PHONY: all clean

# All targets (no default behavior).
all:
	@echo "Usage: make mainXX"

# The Makefile configuration.
Makefile.inc:
	$(error Error: PYTHIA must be configured, please run "./configure"\
                in the top PYTHIA directory)

# PYTHIA libraries.
$(PREFIX_LIB)/libpythia8.a :
	$(error Error: PYTHIA must be built, please run "make"\
                in the top PYTHIA directory)

# Examples without external dependencies.
main% : main%.cc $(PREFIX_LIB)/libpythia8.a
	$(CXX) $< -o $@ $(CXX_COMMON) $(FLAGS)

# MixMax.
main23: $$@.cc $(PREFIX_LIB)/libpythia8.a
	$(CXX) $< -o $@ -std=c++11 -w $(CXX_COMMON)

# GZIP (required).
main34: $$@.cc $(PREFIX_LIB)/libpythia8.a
ifeq ($(GZIP_USE),true)
	$(CXX) $< -o $@ $(CXX_COMMON)
else
	@echo "Error: $@ requires GZIP"
endif

# HEPMC2.
main41 main42 main43 main85 main86 main87 main88 main89: $$@.cc\
	$(PREFIX_LIB)/libpythia8.a
ifeq ($(HEPMC2_USE),true)
	$(CXX) $< -o $@ -I$(HEPMC2_INCLUDE) $(CXX_COMMON)\
	 -L$(HEPMC2_LIB) -Wl,-rpath,$(HEPMC2_LIB) -lHepMC
else
	@echo "Error: $@ requires HEPMC2"
endif

# PROMC.
main46: $$@.cc $(PREFIX_LIB)/libpythia8.a
ifeq ($(PROMC_USE),true)
	$(CXX) $< -o $@ -I$(PROMC_INCLUDE)/src -I$(PROMC_INCLUDE)/include\
	 $(CXX_COMMON) -DPROMC=\"$(PROMC_INCLUDE)\" -Wno-long-long\
	 -L$(PROMC_LIB) -Wl,-rpath,$(PROMC_LIB) -lpromc -lprotoc -lprotobuf\
	 -lprotobuf-lite -lcbook
else
	@echo "Error: $@ requires PROMC"
endif

# EVTGEN (and HEPMC2).
main48: $$@.cc $(PREFIX_LIB)/libpythia8.a
ifeq ($(EVTGEN_USE)$(HEPMC2_USE)$(ENABLE_SHARED),truetruetrue)
	$(CXX) $< -o $@ -I$(EVTGEN_INCLUDE) $(CXX_COMMON)\
	 -DEVTGEN_PYTHIA -DEVTGEN_EXTERNAL -Wl,-rpath,$(HEPMC2_LIB)\
	 -L$(EVTGEN_LIB) -Wl,-rpath,$(EVTGEN_LIB) -lEvtGenExternal -lEvtGen
else
	@echo "Error: $@ requires EVTGEN and HEPMC2"
endif

# FASTJET3.
main71 main72 main75: $$@.cc $(PREFIX_LIB)/libpythia8.a
ifeq ($(FASTJET3_USE),true)
	$(CXX) $< -o $@ -I$(FASTJET3_INCLUDE) $(CXX_COMMON)\
	 -L$(FASTJET3_LIB) -Wl,-rpath,$(FASTJET3_LIB) -lfastjet
else
	@echo "Error: $@ requires FASTJET3"
endif

# FASTJET3 with modified Mass-Drop Tagger.
main74: $$@.cc $(PREFIX_LIB)/libpythia8.a
ifeq ($(FASTJET3_USE),true)
	$(CXX) $< -o $@ -I$(FASTJET3_INCLUDE) $(CXX_COMMON)\
	 -L$(FASTJET3_LIB) -Wl,-rpath,$(FASTJET3_LIB) -lfastjet -lRecursiveTools
else
	@echo "Error: $@ requires FASTJET3"
endif

# FASTJET3 and HEPMC2.
main81 main82 main83 main84: $$@.cc $(PREFIX_LIB)/libpythia8.a
ifeq ($(FASTJET3_USE)$(HEPMC2_USE),truetrue)
	$(CXX) $< -o $@ -I$(FASTJET3_INCLUDE) -I$(HEPMC2_INCLUDE) $(CXX_COMMON)\
	 -L$(HEPMC2_LIB) -Wl,-rpath,$(HEPMC2_LIB) -lHepMC\
	 -L$(FASTJET3_LIB) -Wl,-rpath,$(FASTJET3_LIB) -lfastjet
else
	@echo "Error: $@ requires FASTJET3 and HEPMC2"
endif

# ROOT (turn off all warnings for readability).
main91: $$@.cc $(PREFIX_LIB)/libpythia8.a
ifeq ($(ROOT_USE),true)
	$(CXX) $< -o $@ -w -I$(ROOT_INCLUDE) $(CXX_COMMON)\
	 `$(ROOTBIN)root-config --cflags`\
	 -Wl,-rpath,$(ROOT_LIB) `$(ROOT_BIN)root-config --glibs`
else
	@echo "Error: $@ requires ROOT"
endif
main92: $$@.cc $(PREFIX_LIB)/libpythia8.a main92.so
ifeq ($(ROOT_USE),true)
	$(CXX) $< main92.so -o $@ -w -I$(ROOT_INCLUDE) $(CXX_COMMON)\
	 `$(ROOTBIN)root-config --cflags` -Wl,-rpath,./\
	 -Wl,-rpath,$(ROOT_LIB) `$(ROOT_BIN)root-config --glibs`
else
	@echo "Error: $@ requires ROOT"
endif
main92.so: main92Dct.cc $(PREFIX_LIB)/libpythia8.a
	$(CXX) $< -o $@ -w -I$(ROOT_INCLUDE) $(CXX_SHARED) $(CXX_COMMON)\
	 `$(ROOTBIN)root-config --cflags`
main92Dct.cc: main92.h main92LinkDef.h
	export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(ROOT_LIB);\
	 $(ROOT_BIN)rootcint -f $@ -c -I$(PREFIX_INCLUDE) $^
	 
	
	
	
main112: $$@.cc $(PREFIX_LIB)/libpythia8.a main112.so
ifeq ($(ROOT_USE),true)
	$(CXX) $< main112.so -o $@ -w -I$(ROOT_INCLUDE) $(CXX_COMMON)\
	 `$(ROOTBIN)root-config --cflags` -Wl,-rpath,./\
	 -Wl,-rpath,$(ROOT_LIB) `$(ROOT_BIN)root-config --glibs`
else
	@echo "Error: $@ requires ROOT"
endif
main112.so: main112Dct.cc $(PREFIX_LIB)/libpythia8.a
	$(CXX) $< -o $@ -w -I$(ROOT_INCLUDE) $(CXX_SHARED) $(CXX_COMMON)\
	 `$(ROOTBIN)root-config --cflags`
main112Dct.cc: main112.h main112LinkDef.h
	export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(ROOT_LIB);\
	 $(ROOT_BIN)rootcint -f $@ -c -I$(PREFIX_INCLUDE) $^
	 
	 
# User-written examples for tutorials, without external dependencies.
mymain% : mymain%.cc $(PREFIX_LIB)/libpythia8.a
	$(CXX) $< -o $@ $(CXX_COMMON)

# Internally used tests, without external dependencies.
test% : test%.cc $(PREFIX_LIB)/libpythia8.a
	$(CXX) $< -o $@ $(CXX_COMMON)

# Clean.
clean:
	@rm -f main[0-9][0-9]; rm -f out[0-9][0-9];\
	rm -f main[0-9][0-9][0-9]; rm -f out[0-9][0-9][0-9];\
	rm -f mymain[0-9][0-9]; rm -f myout[0-9][0-9];\
	rm -f test[0-9][0-9][0-9]; rm -f *.dat\
	rm -f weakbosons.lhe; rm -f Pythia8.promc; rm -f hist.root;\
	rm -f *~; rm -f \#*; rm -f core*; rm -f *Dct.*; rm -f *.so;

Files:
main112.h (448 Bytes)
main112LinkDef.h (2.2 KB)
main112Dct.cc (209.1 KB)

/pythia8230/examples$ sudo make main112
g++ main112Dct.cc -o main112.so -w -I/opt/root6/include -shared -I../include -O2  -pedantic -W -Wall -Wshadow -fPIC -L../lib -Wl,-rpath,../lib -lpythia8 -ldl \
 `root-config --cflags`
g++ main112.cc main112.so -o main112 -w -I/opt/root6/include -I../include -O2  -pedantic -W -Wall -Wshadow -fPIC -L../lib -Wl,-rpath,../lib -lpythia8 -ldl \
 `root-config --cflags` -Wl,-rpath,./\
 -Wl,-rpath,/opt/root6/lib `/opt/root6/bin/root-config --glibs`
/pythia8230/examples$ sudo ./main112

Work:

*------ HeavyIon fitting of SubCollisionModel to cross sections ------* 
 |                    Total:  60.61426 mb      (+-  2%)                | 
 |          non-diffractive:  33.37043 mb      (+-  2%)                | 
 |           XX diffractive:   5.31778 mb      (+- 10%)                | 
 |       wounded target (B):  43.83583 mb      (+-  5%)                | 
 |   wounded projectile (A):  43.83583 mb      (+-  5%)                | 
 |          AXB diffractive:   0.00000 mb      not used                | 
 |                  elastic:  11.63080 mb      (+- 10%)                | 
 |          elastic b-slope:  16.13977 GeV^-2  not used                | 
 |                                                                     | 
 |   Using a genetic algorithm                                         | 
 |   Generation       best Chi2/Ndf                                    | 
 |            0                2.75                                    | 
 |            1                0.75                                    | 
 |            2                0.69                                    | 
 |            3                0.74                                    | 
 |            4                0.62                                    | 
 |            5                0.69                                    | 
 |            6                0.60                                    | 
 |            7                0.60                                    | 
 |            8                0.55                                    | 
 |            9                0.51                                    | 
 |           10                0.52                                    | 
 |           11                0.55                                    | 
 |           12                0.48                                    | 
 |           13                0.48                                    | 
 |           14                0.52                                    | 
 |           15                0.50                                    | 
 |           16                0.48                                    | 
 |           17                0.51                                    | 
 |           18                0.53                                    | 
 |           19                0.50                                    | 
 |                                                                     | 
 |     Resulting cross sections (target value)                         | 
 |                    Total:     60.83 *( 60.61) mb                    | 
 |          non-diffractive:     33.82 *( 33.37) mb                    | 
 |           XX diffractive:      5.86 *(  5.32) mb                    | 
 |       wounded target (B):     44.00 *( 43.84) mb                    | 
 |   wounded projectile (A):     44.01 *( 43.84) mb                    | 
 |          AXB diffractive:      0.00  (  0.00) mb                    | 
 |                  elastic:     12.49 *( 11.63) mb                    | 
 |          elastic b-slope:     19.90  ( 16.14) GeV^-2                | 
 |                 Chi2/Ndf:     0.69                                  | 
 |                                                                     | 
 |     Resulting parameters:                                           | 
 |                   0:    15.13                                       | 
 |                   1:     1.54                                       | 
 |                   2:     0.31                                       | 
 |                                                                     | 
 *--- End HeavyIon fitting of parameters in nucleon collision model ---*

Error:

 --------  PYTHIA Particle Data Table (changed only)  ------------------------------------------------------------------------------
 
      id   name            antiName         spn chg col      m0        mWidth      mMin       mMax       tau0    res dec ext vis wid
             no onMode   bRatio   meMode     products 

 no particle data has been changed from its default value 

 --------  End PYTHIA Particle Data Table  -----------------------------------------------------------------------------------------


 *** Break *** segmentation violation



===========================================================
There was a crash (#5 0x00007f420ba7abf4 in SigHandler(ESignals) () from /opt/root6/lib/libCore.so).
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f4209fab07a in __GI___waitpid (pid=5089, stat_loc=stat_loc
entry=0x7ffd374514f0, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00007f4209f23fbb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2  0x00007f420ba7edce in TUnixSystem::Exec(char const*) () from /opt/root6/lib/libCore.so
#3  0x00007f420ba7f68e in TUnixSystem::StackTrace() () from /opt/root6/lib/libCore.so
#4  0x00007f420ba8328b in TUnixSystem::DispatchSignals(ESignals) () from /opt/root6/lib/libCore.so
#5  0x00007f420ba7abf4 in SigHandler(ESignals) () from /opt/root6/lib/libCore.so
#6  0x00007f420ba831dd in sighandler(int) () from /opt/root6/lib/libCore.so
#7  <signal handler called>
#8  0x0000000000402e8b in main ()
===========================================================

Cheers, Andre

This crash happen when I try to put more than 1 Event to run.

When I did nEvent = 1 (Work) with following output .root (Ok, I think):

~/pythia8230/examples$ rootls -t pytHIa.root 
TTree  Mar 21 13:54 2018 T   "Tree"
  px   "px/D"   2370
  py   "py/D"   2370
  pz   "pz/D"   2370
  pt   "pt/D"   2370
  e    "e/D"    2369
  id   "id/I"   1218
  Eta  "Eta/D"  2371
  Phi  "Phi/D"  2371
TTree  Mar 21 13:54 2018 T1  "Tree1"
  gama        "gama/D"        6205
  bx          "bx/D"          6203
  by          "by/D"          6203
  bz          "bz/D"          6203
  Nparticles  "Nparticles/I"  3143

output: pytHIa.root (31.8 KB)

Cheers, Andre

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.