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

patch meas_astrom v11.0 to prevent a.d.n SIGSEVs #22

Merged
merged 1 commit into from Feb 23, 2016

Conversation

jhoblitt
Copy link
Member

No description provided.

@timj
Copy link
Member

timj commented Feb 22, 2016

If this patch is by @mjuric how come the commit is not by him? Use git commit --author. And yes, the commit needs a description and a typo fix in the commit message.

@jhoblitt
Copy link
Member Author

I lifted the patch out of an unrelated repo, and it is part of a large changeset. It wouldn't have been helpful to export the entire changeset as a diff or play changes with sub-tree in order to cherry-pick it. If you want, I can fudge the commit author...

@timj
Copy link
Member

timj commented Feb 22, 2016

I would prefer author attribution was done properly even for small manually applied patches.

@jhoblitt jhoblitt force-pushed the tickets/DM-4983-assertion-fix branch from 46aa9b9 to 1e779a4 Compare February 22, 2016 23:40
@mjuric
Copy link
Member

mjuric commented Feb 22, 2016

FWIW, here's the original patch (and a description of what's going on -- lessons learned all around!): mjuric/conda-lsst@c38cc6b

@jhoblitt
Copy link
Member Author

@mjuric Thanks -- I never would have found that due to a rebase. I will fix up this PR in a few mins.

@RobertLuptonTheGood
Copy link
Member

-O3 #defining NDEBUG is new. And bad.

@jhoblitt jhoblitt force-pushed the tickets/DM-4983-assertion-fix branch from 1e779a4 to 2433733 Compare February 23, 2016 00:06
@jhoblitt jhoblitt changed the title adn assertion fix patch meas_astrom v11.0 to prevent a.d.n SIGSEVs Feb 23, 2016
@mjuric
Copy link
Member

mjuric commented Feb 23, 2016

@RobertLuptonTheGood Yup. Bad @dstndstn :). Re-enabling asserts may be a good follow-up to this patch...

Offending line: https://github.com/dstndstn/astrometry.net/blob/master/util/makefile.common#L251

@dstndstn
Copy link
Contributor

You don't have debug builds? Tsk thyself

@dstndstn
Copy link
Contributor

And the underlying bug was where? I didn't see any patches flowing upstream to astrometry.net

@RobertLuptonTheGood
Copy link
Member

With C++ building -O0 is something like 10x slower and optimising shouldn't generate bugs. Traditionally building NDEBUG and non-debugged are orthogonal issues (and the former is only done after profiling).

@mjuric
Copy link
Member

mjuric commented Feb 23, 2016

And the underlying bug was where? I didn't see any patches flowing upstream to astrometry.net

Fair point. I never figured out what the underlying bug was :(.

I did e-mail some Dustin guy to check that it was a bug, though ;-).

W/o this patch, astrometry.net will SIGSEV under some circumstances (*) when
running the SDSS demo.

By default a.d.n is built with optimizations turned on, which (among other
things) disables checking of assert statements. That would've caught the
fact we were calling healpixDistance() with healpix=-1, which is illegal.

This patch changes the test in isWithinRange() to test for healpix == -1
(instead of nside == 0) when deciding whether it's permissible to call
healpixDistance().

(*) This bug was discovered when the stack was built on CentOS 5 and the
generated binaries were executed on CentOS 6 (with different glibc).
Running CentOS5-built binaries on CentOS 5 (and CentOS 6 binaries on CentOS
6) did not reveal it.  Demonstrates how testing in different environments
can reveal subtle bugs (**).

(**) This bug would've been caught immediately if assertions weren't turned
off in astrometry.net.  We should turn them back on for our builds.
@jhoblitt jhoblitt force-pushed the tickets/DM-4983-assertion-fix branch from 2433733 to 56eee04 Compare February 23, 2016 16:08
jhoblitt added a commit that referenced this pull request Feb 23, 2016
patch meas_astrom v11.0 to prevent a.d.n SIGSEVs
@jhoblitt jhoblitt merged commit 4f8ae4a into master Feb 23, 2016
jhoblitt added a commit to jhoblitt/conda-lsst that referenced this pull request Feb 23, 2016
@ktlim ktlim deleted the tickets/DM-4983-assertion-fix branch August 25, 2018 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants