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

PPC64LE - pkg/geo/geomfn - TestSegmentize/GEOMETRYCOLLECTION_ - Test failures due to floating point differences #81745

Closed
prashantkhoje opened this issue May 24, 2022 · 8 comments
Labels
A-spatial Spatial work that is *not* related to builtins. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community T-disaster-recovery T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner

Comments

@prashantkhoje
Copy link
Contributor

prashantkhoje commented May 24, 2022

Describe the problem

I built the latest (Latest commit 48e48db) cockroachdb from master branch.
When tests are run, test TestSegmentize/GEOMETRYCOLLECTION_ fails due to floating point precision differences.

To Reproduce
Build script used:

DISTRO=linux-ppc64le
GO_DISTRO=linux-ppc64le

# Install all dependencies
dnf install -y git cmake make gcc-c++ autoconf ncurses-devel libarchive curl \
wget openssl-devel diffutils procps-ng libarchive xz python2

dnf install -y \ http://rpmfind.net/linux/centos/8-stream/AppStream/ppc64le/os/Packages/bison-3.0.4-10.el8.ppc64le.rpm `
http://rpmfind.net/linux/epel/8/Everything/ppc64le/Packages/c/ccache-3.7.7-1.el8.ppc64le.rpm

cd $HOME

# Install nodejs
NODE_VERSION=v12.20.2
wget https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$DISTRO.tar.gz
tar -xzf node-$NODE_VERSION-$DISTRO.tar.gz
export PATH=$HOME/node-$NODE_VERSION-$DISTRO/bin:$PATH

npm install yarn --global

cd $HOME

# Setup go environment and install go
GOPATH=$HOME/go
GO_VERSION=1.17.8
COCKROACH_HOME=$GOPATH/src/github.com/cockroachdb
mkdir -p $COCKROACH_HOME
export GOPATH
curl -O https://dl.google.com/go/go$GO_VERSION.$GO_DISTRO.tar.gz
tar -C /usr/local -xzf go$GO_VERSION.$GO_DISTRO.tar.gz
rm -rf go$GO_VERSION.$GO_DISTRO.tar.gz
export PATH=$PATH:/usr/local/go/bin

# Clone cockroach and build
COCKROACH_VERSION=master
cd $COCKROACH_HOME
git clone https://github.com/cockroachdb/cockroach.git
cd cockroach
git checkout $COCKROACH_VERSION
make buildshort
export GOMAXPROCS=4
make test PKG=./pkg/geo/geomfn TESTFLAGS='-v -count=1' GOFLAGS='-p 1' IGNORE_GOVERS=1

Expected behavior
Tests should pass on ppc64le considering floating point differences on platforms.

Additional data / screenshots

=== RUN   TestSegmentize/GEOMETRYCOLLECTION_(POINT_(40.0_10.0),_LINESTRING_(10.0_10.0,_20.0_20.0,_10.0_40.0),_POLYGON_((40.0_40.0,_20.0_45.0,_45.0_30.0,_40.0_40.0))),_maximum_segment_length:_10.000000
    segmentize_test.go:158:
                Error Trace:    segmentize_test.go:158
                Error:          Not equal:
                                expected: geo.Geometry{spatialObject:geopb.SpatialObject{Type:2, EWKB:geopb.EWKB{0x1, 0x7, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x40, 0x1, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x34, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x34, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x30, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0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.BoundingBox)(0xc000cc7ea0)}}
                                actual  : geo.Geometry{spatialObject:geopb.SpatialObject{Type:2, EWKB:geopb.EWKB{0x1, 0x7, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x40, 0x1, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x34, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x34, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x30, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x3a, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a, 0x40, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x40, 0x40, 0x56, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x44, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x3a, 0x40, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x45, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x34, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x46, 0x40, 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3c, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x42, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x41, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x46, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x45, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x41, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x40}, SRID:0, ShapeType:8, BoundingBox:(*geopb.BoundingBox)(0xc000cc7c60)}}

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -18,3 +18,3 @@
                                    000000d0  00 80 46 40 56 55 55 55  55 55 3c 40 00 00 00 00  |..F@VUUUUU<@....|
                                -   000000e0  00 00 44 40 56 55 55 55  55 55 42 40 00 00 00 00  |..D@VUUUUUB@....|
                                +   000000e0  00 00 44 40 55 55 55 55  55 55 42 40 00 00 00 00  |..D@UUUUUUB@....|
                                    000000f0  00 80 41 40 00 00 00 00  00 80 46 40 00 00 00 00  |[email protected]@....|
                Test:           TestSegmentize/GEOMETRYCOLLECTION_(POINT_(40.0_10.0),_LINESTRING_(10.0_10.0,_20.0_20.0,_10.0_40.0),_POLYGON_((40.0_40.0,_20.0_45.0,_45.0_30.0,_40.0_40.0))),_maximum_segment_length:_10.000000

Environment:

  • CockroachDB version [22.x]
[[email protected] cockroach]# git log -3 --oneline
48e48db89e (HEAD -> master, origin/staging, origin/master, origin/HEAD) Merge #81681
7ad29c34e0 colexecwindow: fix panic when lead or lag arguments are different types
a8d4ce6cad Merge #81670 #81672
[[email protected] cockroach]# git branch
* master

Additional context
We support running cockroachdb on ppc64le. We'd like to fix the failures we encounter in order to automate builds for ppc64le.

Jira issue: CRDB-16054

@prashantkhoje prashantkhoje added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label May 24, 2022
@blathers-crl
Copy link

blathers-crl bot commented May 24, 2022

Hello, I am Blathers. I am here to help you get the issue triaged.

Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.

I have CC'd a few people who may be able to assist you:

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added A-disaster-recovery O-community Originated from the community X-blathers-triaged blathers was able to find an owner T-disaster-recovery labels May 24, 2022
@blathers-crl
Copy link

blathers-crl bot commented May 24, 2022

cc @cockroachdb/bulk-io

@adityamaru adityamaru added A-spatial Spatial work that is *not* related to builtins. and removed A-disaster-recovery labels May 24, 2022
@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 24, 2022
@adityamaru
Copy link
Contributor

cc: @otan to route correctly since I'm not sure where we track geospatial bugs.

@otan
Copy link
Contributor

otan commented May 24, 2022

hey @prashantkhoje, we don't really support PPC64LE officially, but i'll accept patches to fix this if you are willing to make them. we probably have to make these accept a tolerable bound.

you can choose to revive #66621 if you'd like :)

@otan
Copy link
Contributor

otan commented May 24, 2022

marking as dupe of #72225

@prashantkhoje
Copy link
Contributor Author

hey @prashantkhoje, we don't really support PPC64LE officially, but i'll accept patches to fix this if you are willing to make them. we probably have to make these accept a tolerable bound.

you can choose to revive #66621 if you'd like :)

Yes. I'd be contributing patches.
Since these issues are already closed, should i create new issues for other failures i've seen before submitting patches?

@otan
Copy link
Contributor

otan commented May 25, 2022

You don't have to - patches directly are fine. Or you can create a big issue rather than one per test failure if that helps you.

@prashantkhoje
Copy link
Contributor Author

Fixed by #81894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spatial Spatial work that is *not* related to builtins. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community T-disaster-recovery T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner
Projects
None yet
Development

No branches or pull requests

3 participants