solve-field fail

414 views
Skip to first unread message

Keenman Alex

unread,
Nov 18, 2013, 7:20:22 AM11/18/13
to astro...@googlegroups.com
Hello all,

having problems with astrometry.net. Upgraded to the most recent version and still can not get rid of this error:

solve-field.c:527:run_engine engine failed.  Command that failed was:
  /usr/local/astrometry/bin/astrometry-engine astrometry.axy
 ioutils.c:661:run_command_get_outputs Command was killed by signal 4

astrometry.net is Revision 23814, date 2013-10-18 19:53:25 +0000 (Fri, 18 Oct 2013).
pyfits 3.1.1

Any ideas how to fix this?

Jan-Benedict Glaw

unread,
Nov 18, 2013, 7:36:47 AM11/18/13
to Keenman Alex, astro...@googlegroups.com
On Mon, 2013-11-18 04:20:22 -0800, Keenman Alex <sqw...@gmail.com> wrote:
> having problems with astrometry.net. Upgraded to the most recent version
> and still can not get rid of this error:
>
> solve-field.c:527:run_engine engine failed. Command that failed was:
> /usr/local/astrometry/bin/astrometry-engine astrometry.axy
> ioutils.c:661:run_command_get_outputs Command was killed by signal 4

How exactly did you upgrade?

Signal 4 is usually SIGILL, pointing to bad binary executable code
within the program (or a library it is using.)

Things like this happen if you mix up old object files with new
files, compiled against a different set of headers. So my guess is
that there are some old remains from your former installation, which
you should delete.

MfG, JBG

--
Jan-Benedict Glaw jbg...@lug-owl.de +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second : deserve neither liberty nor safety. (Ben Franklin)
signature.asc

Keenman Alex

unread,
Nov 18, 2013, 8:42:49 AM11/18/13
to astro...@googlegroups.com, Keenman Alex


понедельник, 18 ноября 2013 г., 14:36:47 UTC+2 пользователь Jan-Benedict Glaw написал:
On Mon, 2013-11-18 04:20:22 -0800, Keenman Alex <sqw...@gmail.com> wrote:
> having problems with astrometry.net. Upgraded to the most recent version
> and still can not get rid of this error:
>
> solve-field.c:527:run_engine engine failed.  Command that failed was:
>   /usr/local/astrometry/bin/astrometry-engine astrometry.axy
>  ioutils.c:661:run_command_get_outputs Command was killed by signal 4

How exactly did you upgrade?

  Signal 4 is usually SIGILL, pointing to bad binary executable code
within the program (or a library it is using.)

  Things like this happen if you mix up old object files with new
files, compiled against a different set of headers. So my guess is
that there are some old remains from your former installation, which
you should delete.

Deleted everything from the installation folder and reinstalled again from scratch.

I have also 2 deprecation warnings:

/usr/local/astrometry/bin/fits2fits.py:49: DeprecationWarning: The ascard function is deprecated and may be removed in a future version.
        Use the `.cards` attribute instead.
  for c in hdr.ascard:
/usr/lib64/python2.6/site-packages/pyfits/card.py:66: DeprecationWarning: The CardList class has been deprecated; all its former functionality has been subsumed by the Header class, so CardList objects should not be directly created.  See the PyFITS 3.1.0 CHANGELOG for more details.
  DeprecationWarning)

Tried with --no-fits2fits it gives the same error without warnings.

The error above is produced by:
>solve-field --cpulimit 30  --ra 343.490 --dec 16.148 --radius 0.3 --no-plots --no-verify --overwrite --no-remove-lines J2253+1608.xyls
When i run it on an image:
>solve-field --cpulimit 30  --ra 343.490 --dec 16.148 --radius 0.3 --no-plots --no-verify --overwrite --no-remove-lines  stacked.fits
it gives:
>simplexy: found 618 sources.
>Illegal instruction (core dumped)

Dustin Lang

unread,
Nov 18, 2013, 1:52:23 PM11/18/13
to astro...@googlegroups.com, Keenman Alex
Hi,

Could you please run "make report" and attach the "report.txt" file that is created?

An illegal instruction could be due to incorrect detection of the right compiler flags to use on your platform.

What OS and hardware is this?

cheers,
--dustin

Keenman Alex

unread,
Nov 19, 2013, 6:48:11 AM11/19/13
to astro...@googlegroups.com, Keenman Alex
Thank you for your help!

"make report" doesn't produce the file, so i made "make report &> report.txt" and attaching it.
I don't see any errors after make runs.

OS is CentOS release 6.4 (Final) x86_64. Nothing unusual I would say. Previously installed version (don't remember its number) worked fine.

Best regrads,
A
report.txt

Dustin Lang

unread,
Nov 19, 2013, 2:52:41 PM11/19/13
to astro...@googlegroups.com, Keenman Alex
Thanks.

Like you say, a fairly standard setup.  And your gcc is new enough that we just use "-march=native", which means "gcc knows which architecture it's running on and should choose good optimization flags for that platform".  So I wouldn't expect any of the core astrometry.net code to contain illegal instructions; I don't write assembly!

Could you please run the failing solve-field command, adding a "-v" to get verbose output?

My current guess is that your cfitsio library contains the offending illegal instruction, and that we're hitting that it the "image2xy" (simplexy) phase.  But that's just a guess.

cheers,
--dustin


Keenman Alex

unread,
Nov 20, 2013, 10:42:08 AM11/20/13
to astro...@googlegroups.com, Keenman Alex
Hello all!

here is verbose output:
solve-field -v --cpulimit 30 --ra 343.490 --dec 16.148 --radius 0.3 --no-plots --no-verify --overwrite --no-remove-lines /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.xyls
______________________________________________________________________________________________________________
Reading input file 1 of 1: "/home/user1/astro/testing/data/J2253+1608/stacked/astrometry.xyls"...
Base: "/home/user1/astro/testing/data/J2253+1608/stacked/astrometry", basefile "astrometry.xyls", basedir "/home/user1/astro/testing/data/J2253+1608/stacked", suffix "xyls"
Checking if file "/home/user1/astro/testing/data/J2253+1608/stacked/astrometry.xyls" is xylist or image: xyls
Running: /usr/local/astrometry/bin/fits2fits.py --verbose /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.xyls /tmp/tmp.sanexyls.vgjCPt
Filename: /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.xyls
No.    Name         Type      Cards   Dimensions   Format
0    PRIMARY     PrimaryHDU      24   ()           uint8   
1    SOURCES     BinTableHDU     33   85R x 4C     [E, E, E, E]   
Header has 24 cards
/usr/local/astrometry/bin/fits2fits.py:49: DeprecationWarning: The ascard function is deprecated and may be removed in a future version.
        Use the `.cards` attribute instead.
  for c in hdr.ascard:
/usr/lib64/python2.6/site-packages/pyfits/card.py:66: DeprecationWarning: The CardList class has been deprecated; all its former functionality has been subsumed by the Header class, so CardList objects should not be directly created.  See the PyFITS 3.1.0 CHANGELOG for more details.
  DeprecationWarning)
Header has 33 cards
Outputting:
Filename: /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.xyls
No.    Name         Type      Cards   Dimensions   Format
0    PRIMARY     PrimaryHDU      24   ()           uint8   
1    SOURCES     BinTableHDU     33   85R x 4C     [E, E, E, E]   
Running: /usr/local/astrometry/bin/uniformize.py -n 10 /tmp/tmp.sanexyls.vgjCPt /tmp/tmp.uniform.n60SH9
Uniformizing into 3 x 3 bins
Image bounds: x [108.812,1935], y [89,1969.25]
Writing headers to file /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.axy
Copying body of file /tmp/tmp.uniform.n60SH9 to output /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.axy.
Deleting temp file /tmp/tmp.sanexyls.vgjCPt
Deleting temp file /tmp/tmp.uniform.n60SH9
Solving...
Running:
  /usr/local/astrometry/bin/astrometry-engine --verbose /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.axy
Using config file "/usr/local/astrometry/bin/../etc/astrometry.cfg"
solve-field.c:527:run_engine engine failed.  Command that failed was:
  /usr/local/astrometry/bin/astrometry-engine --verbose /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.axy
 ioutils.c:661:run_command_get_outputs Command was killed by signal 4
______________________________________________________________________________________________________________
Using config file "/usr/local/astrometry/bin/../etc/astrometry.cfg"  line looks strange, so i've tried --config /usr/local/astrometry/etc/astrometry.cfg option. Unfortunately it still fails.

вторник, 19 ноября 2013 г., 21:52:41 UTC+2 пользователь Dustin Lang написал:

Dustin Lang

unread,
Nov 20, 2013, 2:17:10 PM11/20/13
to astro...@googlegroups.com, Keenman Alex
Ok, my prediction was wrong, it's a problem in the astrometry-engine executable.

In that case, could you please run it in the debugger:

gdb --args /usr/local/astrometry/bin/astrometry-engine --verbose /home/user1/astro/testing/data/J2253+1608/stacked/astrometry.axy

hit "r" to run, "cont" to continue if/when it stops.  It should give you a stack trace when it fails; please send that.

If you wouldn't mind, could you also re-make it with debugging symbols:

make clean
make OPTIMIZE=no

Thanks,
--dustin


Keenman Alex

unread,
Nov 20, 2013, 4:51:42 PM11/20/13
to astro...@googlegroups.com, Keenman Alex
When I compile it with make OPTIMIZE=no it works fine!

среда, 20 ноября 2013 г., 21:17:10 UTC+2 пользователь Dustin Lang написал:

Dustin Lang

unread,
Nov 20, 2013, 5:24:07 PM11/20/13
to astro...@googlegroups.com, Keenman Alex

Oh great, a Heisenbug!

You could try with different optimization settings.  I think you can do that with:

CFLAGS=-O1 make OPTIMIZE=meh

and see when this problem kicks in.

You could also try omitting the "-march=native", by

make ARCH_FLAGS=

cheers,
--dustin


Keenman Alex

unread,
Nov 21, 2013, 6:24:38 AM11/21/13
to astro...@googlegroups.com, Keenman Alex

Dustin,
it works fine after all 3:

1. make ARCH_FLAGS=
2. CFLAGS=-O1 make OPTIMIZE=meh
3. make OPTIMIZE=no

Thank you very much for help!

Dustin Lang

unread,
Nov 21, 2013, 8:46:34 AM11/21/13
to astro...@googlegroups.com, Keenman Alex
Very interesting!

Could you try   -O2 and -O3  also?  I'm just curious.  I bet it's the march=native that's the problem.  That should probably get reported upstream to the gcc developers!

thanks,
--dustin

Keenman Alex

unread,
Nov 21, 2013, 9:40:32 AM11/21/13
to astro...@googlegroups.com, Keenman Alex
Doesn't work after CFLAGS=-O2 make OPTIMIZE=meh and obviously -O3
Not sure that this is march=native because when i run CFLAGS=-O1 make OPTIMIZE=meh gcc still called with -march=native and astrometry works after this.

четверг, 21 ноября 2013 г., 15:46:34 UTC+2 пользователь Dustin Lang написал:

Dustin Lang

unread,
Nov 21, 2013, 10:06:53 AM11/21/13
to astro...@googlegroups.com, Keenman Alex
Wow, that is very interesting.

Thanks for your testing.

I don't know how I can detect or avoid this problem in the future...

If you don't mind, could you please compile it in a way that it fails (say, with -O2), run it in gdb as mentioned above, and send the stack trace?  I am curious about where the actual illegal instruction is coming from.

Thanks,
--dustin

Keenman Alex

unread,
Nov 21, 2013, 10:31:22 AM11/21/13
to astro...@googlegroups.com, Keenman Alex
#0  0x00000000004075a8 in engine_parse_config_file_stream (engine=0x71a310, fconf=0x71a590) at engine.c:265
#1  0x0000000000407c2b in engine_parse_config_file (engine=0x71a310, fn=0x71a550 "/home/user1/astrometry/bin/../etc/astrometry.cfg") at engine.c:240
#2  0x00000000004047e6 in main (argc=3, args=0x7fffffffe318) at engine-main.c:251


четверг, 21 ноября 2013 г., 17:06:53 UTC+2 пользователь Dustin Lang написал:

Dustin Lang

unread,
Nov 21, 2013, 10:46:04 AM11/21/13
to astro...@googlegroups.com, Keenman Alex
Whoa, that's crazy.  That code is:

        // strip off newline
        if (line[strlen(line) - 1] == '\n')
            line[strlen(line) - 1] = '\0';

I'm mystified.

Thanks very much for your testing,

--dustin
Reply all
Reply to author
Forward
0 new messages