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

Test data_InterRegFlow fails on ppc64el built with -O3 optimization level #3620

Open
LocutusOfBorg opened this issue Aug 7, 2023 · 9 comments

Comments

@LocutusOfBorg
Copy link

Hello, as said in the title, the data_InterRegFlow test fails on ppc64el

See e.g. https://launchpadlibrarian.net/680095999/buildlog_ubuntu-mantic-ppc64el.opm-common_2023.04+ds-2_BUILDING.txt.gz

Note, this happens only on ppc64el with -O3 and works perfectly with -O2
See e.g. https://launchpad.net/ubuntu/+source/opm-common/2023.04+ds-2ubuntu1/+build/26477122/+files/buildlog_ubuntu-mantic-ppc64el.opm-common_2023.04+ds-2ubuntu1_BUILDING.txt.gz

146: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_InteHEAD
146: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
146: Test timeout computed to be: 1500
146: Running 21 test cases...
145: 
145: �[1;32;49m*** No errors detected
145: �[0;39;49m
143/177 Test #145: DoubHEAD .........................   Passed    0.36 sec
test 147
        Start 147: data_InterRegFlow

147: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_data_InterRegFlow
147: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
147: Test timeout computed to be: 1500
147: Running 5 test cases...
147: ./tests/test_data_InterRegFlow.cpp(275): �[1;31;49merror: in "InterReg_View/Copy_Move_Assign_Add": Moved-from source range must be invalid�[0;39;49m
147: 
147: �[1;31;49m*** 1 failure is detected in the test module "data_InterRegFlow"
147: �[0;39;49m
144/177 Test #147: data_InterRegFlow ................***Failed    0.01 sec
Running 5 test cases...
./tests/test_data_InterRegFlow.cpp(275): �[1;31;49merror: in "InterReg_View/Copy_Move_Assign_Add": Moved-from source range must be invalid�[0;39;49m

�[1;31;49m*** 1 failure is detected in the test module "data_InterRegFlow"
�[0;39;49m

test 148
        Start 148: data_InterRegFlowMap

148: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_data_InterRegFlowMap
148: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
148: Test timeout computed to be: 1500
148: Running 8 test cases...
148: 
148: �[1;32;49m*** No errors detected
148: �[0;39;49m
145/177 Test #148: data_InterRegFlowMap .............   Passed    0.01 sec
test 149
        Start 149: LinearisedOutputTable

149: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_LinearisedOutputTable
149: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
149: Test timeout computed to be: 1500
149: Running 8 test cases...
149: 
149: �[1;32;49m*** No errors detected
149: �[0;39;49m
146/177 Test #149: LinearisedOutputTable ............   Passed    0.01 sec
test 150
        Start 150: LogiHEAD

150: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_LogiHEAD
150: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
150: Test timeout computed to be: 1500
150: Running 3 test cases...
150: 
150: �[1;32;49m*** No errors detected
150: �[0;39;49m
147/177 Test #150: LogiHEAD .........................   Passed    0.01 sec
test 151
        Start 151: LGOData

151: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_LGOData
151: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
151: Test timeout computed to be: 1500
144: 
144: �[1;32;49m*** No errors detected
144: �[0;39;49m
148/177 Test #144: EclipseIO ........................   Passed    0.53 sec
test 152
        Start 152: OutputStream

152: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_OutputStream
152: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
152: Test timeout computed to be: 1500
152: Running 11 test cases...
152: 
152: �[1;32;49m*** No errors detected
152: �[0;39;49m
149/177 Test #152: OutputStream .....................   Passed    0.02 sec
test 153
        Start 153: regionCache

153: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_regionCache
153: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
153: Test timeout computed to be: 1500
151: Running 1 test case...
146: 
146: �[1;32;49m*** No errors detected
146: �[0;39;49m
150/177 Test #146: InteHEAD .........................   Passed    0.33 sec
test 154
        Start 154: PaddedOutputString

154: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_PaddedOutputString
154: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
154: Test timeout computed to be: 1500
153: Running 1 test case...
153: 
153: �[1;32;49m*** No errors detected
153: �[0;39;49m
151/177 Test #153: regionCache ......................   Passed    0.17 sec
test 155
        Start 155: Restart

155: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_Restart
155: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
155: Test timeout computed to be: 1500
113: 
113: �[1;32;49m*** No errors detected
113: �[0;39;49m
152/177 Test #113: SummaryConfigTests ...............   Passed    5.10 sec
test 156
        Start 156: RFT

156: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_RFT
156: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
156: Test timeout computed to be: 1500
154: Running 3 test cases...
154: 
154: �[1;32;49m*** No errors detected
154: �[0;39;49m
153/177 Test #154: PaddedOutputString ...............   Passed    0.01 sec
test 157
        Start 157: rst_netbalan

157: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_rst_netbalan
157: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
157: Test timeout computed to be: 1500
157: Running 8 test cases...
157: 
157: �[1;32;49m*** No errors detected
157: �[0;39;49m
154/177 Test #157: rst_netbalan .....................   Passed    0.01 sec
test 158
        Start 158: Solution

158: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_Solution
158: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
158: Test timeout computed to be: 1500
158: Running 3 test cases...
158: 
158: �[1;32;49m*** No errors detected
158: �[0;39;49m
155/177 Test #158: Solution .........................   Passed    0.01 sec
test 159
        Start 159: Inplace

159: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_Inplace
159: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
159: Test timeout computed to be: 1500
151: 
151: �[1;32;49m*** No errors detected
151: �[0;39;49m
156/177 Test #151: LGOData ..........................   Passed    0.23 sec
test 160
        Start 160: Summary

160: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_Summary
160: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
160: Test timeout computed to be: 1500
159: Running 1 test case...
159: 
159: �[1;32;49m*** No errors detected
159: �[0;39;49m
157/177 Test #159: Inplace ..........................   Passed    0.01 sec
test 161
        Start 161: Summary_Group

161: Test command: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/bin/test_Summary_Group
161: Working Directory: /<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu/tests
161: Test timeout computed to be: 1500
155: Running 12 test cases...
156: Running 16 test cases...
161: Running 1 test case...
161: 
161: �[1;32;49m*** No errors detected
161: �[0;39;49m
158/177 Test #161: Summary_Group ....................   Passed    0.09 sec
test 162
        Start 162: Tables
[...]
99% tests passed, 1 tests failed out of 177

Total Test time (real) =  25.82 sec

The following tests FAILED:
	147 - data_InterRegFlow (Failed)
Errors while running CTest
make[1]: *** [Makefile:74: test] Error 8
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-powerpc64le-linux-gnu'
dh_auto_test: error: cd obj-powerpc64le-linux-gnu && make -j4 test ARGS\+=--verbose ARGS\+=-j4 returned exit code 2
make: *** [debian/rules:17: binary-arch] Error 25
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2023-08-02T20:37:26Z

@bska
Copy link
Member

bska commented Aug 7, 2023

Thank you for the report. I will look into it.

@LocutusOfBorg
Copy link
Author

thanks!

@blattms
Copy link
Member

blattms commented Aug 21, 2023

I could not see any sign why the move constructor should make the object invalid in all situation. We only make sure that
elements.begin==elements.end holds but maybe do not make sure that InterRegFlow::bufferSize does return something that is not zero. If is zero, then the object seems to be valid and the test will fail.

@bska
Copy link
Member

bska commented Aug 21, 2023

If [bufferSize()] is zero, then the object seems to be valid and the test will fail.

Sure, but if that happens it's a compiler error. bufferSize() returns 2*NumComponents and NumComponents is 5 by construction.

@blattms
Copy link
Member

blattms commented Sep 15, 2023

You are right in this regard. of course. I failed to see that.

@LocutusOfBorg
Copy link
Author

Maybe we can reduce the test case and ask gcc people to fix?

@bska
Copy link
Member

bska commented Sep 18, 2023

Maybe we can reduce the test case and ask gcc people to fix?

I'm not convinced that this actually is a compiler bug, but I am trying to reduce this to a small example that would be usable as a "repro". At minimum we can use that in the Compiler Explorer to investigate. Failing that, experts on Stack Overflow and elsewhere might bring additional insight.

@blattms
Copy link
Member

blattms commented Oct 19, 2023

If that were a compiler bug it should have happened to many code. Maybe some out of bounds writing.
I will try to get access to a matching porter box at Debian to take a deeper look once they have updated my GPG key.

@blattms
Copy link
Member

blattms commented Apr 1, 2024

To me the problem might not be in opm-common. I tested this on Debian's platti porter machine. If I add a simple unrelated print statement (std::cout<<"default<<std::endl;) before the return in function isValid, then all tests pass. So I guess it might be a problem of the gcc optimizer on ppc64el.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants