Bug #1089
Segmentation fault in ctselect
Status: | Closed | Start date: | 01/18/2014 | |
---|---|---|---|---|
Priority: | Urgent | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 00-07-00 | |||
Duration: |
Description
Johann Cohen-Tanugi filed the following problem on the CTA Redmine:
I probably have the run_binned.sh now running as a test script (check DIRAC jobid 3045871). There seems to be a problem with the ctselect I have locally on my laptop, it core dumps in the following way :
cohen@arago:~/sources/CTA/CTOOLS/Dirac_ctools$ gdb ctselect GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://bugs.launchpad.net/gdb-linaro/>... Reading symbols from /home/cohen/sources/CTA/CTOOLS/ctools/bin/ctselect...done. (gdb) run Starting program: /home/cohen/sources/CTA/CTOOLS/ctools/bin/ctselect [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Input event list or observation definition file [test/data/crab_events.fits.gz] obs_crab.xml RA for ROI centre (degrees) (0-360) [83.63] Dec for ROI centre (degrees) (-90-90) [22.01] Radius of ROI (degrees) (0-180) [3.0] 1.0 Start time (CTA MET in seconds) (0) [0.0] End time (CTA MET in seconds) (0) [0.0] Lower energy limit (TeV) (0) [0.1] 0.5 Upper energy limit (TeV) (0) [100.0] 20.0 Output event list or observation definition file [selected_events.fits] Program received signal SIGSEGV, Segmentation fault. 0x00007ffff684ef88 in ffgcprll () from /usr/lib/x86_64-linux-gnu/libcfitsio.so.3 (gdb) where #0 0x00007ffff684ef88 in ffgcprll () from /usr/lib/x86_64-linux-gnu/libcfitsio.so.3 #1 0x00007ffff68b84c1 in ?? () from /usr/lib/x86_64-linux-gnu/libcfitsio.so.3 #2 0x00007ffff68b0b2c in ffpcl () from /usr/lib/x86_64-linux-gnu/libcfitsio.so.3 #3 0x00007ffff68b0e8a in ffpcn () from /usr/lib/x86_64-linux-gnu/libcfitsio.so.3 #4 0x00007ffff79be0a8 in GFitsTableCol::save_column_fixed (this=0x688cc0) at GFitsTableCol.cpp:794 #5 0x00007ffff79b87ae in GFitsTable::data_save (this=0x687960) at GFitsTable.cpp:1187 #6 0x00007ffff79cddca in GFitsHDU::save (this=0x687960) at GFitsHDU.cpp:348 #7 0x00007ffff79cf344 in GFits::save (this=0x7fffffffd570, clobber=<optimized out> at GFits.cpp:1165 #8 0x0000000000404abc in ctselect::save_event_list (this=<optimized out>, obs=<optimized out>, infile=..., outfile=...) at ctselect.cpp:971 #9 0x0000000000407b86 in ctselect::save_xml (this=0x7fffffffd6b0) at ctselect.cpp:920 #10 0x0000000000407d95 in ctselect::save (this=0x7fffffffd6b0) at ctselect.cpp:379 #11 0x000000000040391d in main (argc=<optimized out>, argv=<optimized out> at main.cpp:52
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen almost 11 years ago
- Target version set to 00-07-00
- % Done changed from 0 to 50
This seems to be a cfitsio internal error. To explain the symptom, recall that when an observation definition file is provided on input and observation definition file will also be created on output, and the output FITS filename will be the input FITS filename with a prefix prepended.
Now it happens that the input file is gzipped (see obs.xml
):
<?xml version="1.0" standalone="no"?> <observation_list title="observation list"> <observation name="Crab" id="00023523" instrument="CTA"> <parameter name="EventList" file="run_00023523_eventlist.fits.gz"/> <parameter name="ARF" file="run023523_std_arf.fits" thetacut="0.11180"/> <parameter name="RMF" file=""/> <parameter name="PSF" file="psf_hess.fits"/> </observation> </observation_list>
Here, the input event file is
run_00023523_eventlist.fits.gz
.
ctselect
now created an output filename called selected_run_00023523_eventlist.fits.gz
, including the .gz
suffix although the output file was not gzipped. For some reason, ctfitsio
does not like this an core dumps.
I changed now ctselect
so that the .gz
is stripped from the input filename, i.e. the output filename is selected_run_00023523_eventlist.fits
. This went through without any problem.
#2 Updated by Knödlseder Jürgen almost 11 years ago
- Status changed from New to Feedback
- % Done changed from 50 to 100
The problem was solved, pushed in devel
.
#3 Updated by Knödlseder Jürgen almost 11 years ago
- Status changed from Feedback to Closed