Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: 17 September 2012

URL: http://cxc.harvard.edu/ciao4.4/bugs/dmsort.html

Bugs: dmsort


Bugs

Sorting string values [New] (14 Sep 2012)

dmsort can crash if sorting on a string column with duplicate values if a secondary sort criteria is used. For example

% cat sort.dat
#type   count_rate
star    1.0
star    1.3
pulsar  1.5
agn     0.4
% dmsort sort.dat sort.fits "type,count_rate" clob+
*** glibc detected *** dmsort: double free or corruption (fasttop): 0x000000000d73dc40 ***
======= Backtrace: =========
/lib64/libc.so.6[0x35126711df]
/lib64/libc.so.6(cfree+0x4b)[0x351267163b]
...

The exact screen output will likely be different. The bug is triggered because the 'type' column has two "star" values which causes the secondary sort on "count_rate" to be triggered.

Sorting on just the string column works as expected.


Bugs fixed in CIAO 4.4

The following is a list of bugs that were fixed in the CIAO 4.4 software release.

Use "copyall=no" with the "opt=text/simple" format  (04 May 2010)

The text/simple ASCII format does not support IMAGE blocks. When sorting a table with the default value of the dmsort copyall parameter (yes), the tool attempts to copy the other blocks from the input file, including the NULL PRIMARY image.

unix% dmsort simple.fits "simple.sort.dat[opt kernel=text/simple]" keys=y
# DMSORT (CIAO): Error adding full header. 

Workaround:

Set copyall=no. Note that any other blocks in the file will not be copied either.


Last modified: 17 September 2012
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.