[MDEV-647] LP:986261 - Aria unit tests fail at ma_test2 line 316 Created: 2012-04-20 Updated: 2012-10-31 Resolved: 2012-10-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.3.9 |
| Fix Version/s: | 5.5.28a, 5.3.10, 5.2.13, 5.1.66 |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Initially reported on maria-discuss at launchpad: [16:34:05] ../storage/maria/unittest/ma_test_all-t ..................... etc. The failure is only observed with -O2 (not -O1) |
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2012-03-28 ] |
|
There is (and it's been there for a few months already) a new version (5.1.60) of mariadb on the mariadb site. An ebuild (even in the overlay) would be nice. I don't know (and I can't check at the moment) if a simple rename would do the trick. |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-17 ] |
|
MariaDB 5.1.62 is now in the overlay. |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-18 ] |
|
MariaDB 5.1.62 is now in official tree as unstable |
| Comment by Robin H. Johnson (Inactive) [ 2012-04-18 ] |
|
Please run the testsuites. I'm not 100% happy with it. |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-18 ] |
|
With FEATURES="test -usersandbox" I get these errors: Failed test '../storage/maria/unittest/../ma_test2 -s -htmp -m10000 -e16384 -E16384 -K -L ' (loop iteration 10.) at line 316 Failed test '../storage/maria/unittest/../ma_test2 -s -htmp -m10000 -e8192 -K -S' (loop iteration 9.) at line 316 Failed test '../storage/maria/unittest/../ma_test2 -s -htmp -m10000 -e8192 -K -M' (loop iteration 9.) at line 316 Failed test '../storage/maria/unittest/../ma_test2 -s -htmp -m10000 -e16384 -E16384 -K -L -M' (loop iteration 10.) at line 316 Failed test '../storage/maria/unittest/../ma_test2 -s -htmp -m10000 -e8192 -K -M -T' (loop iteration 9.) at line 316 Failed test '../storage/maria/unittest/../ma_test2 -s -htmp -m10000 -e8192 -K -M -T -C' (loop iteration 9.) at line 316 Failed test '../storage/maria/unittest/../ma_test2 -s -htmp -m10000 -e16384 -E16384 -K -L -M -T -C' (loop iteration 10.) at line 316 Test Summary Report Could it be because I have /var/tmp/portage on a tmpfs? |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-18 ] |
|
Nope, same errors on a real filesystem as well. |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-18 ] |
|
(In reply to comment #4) I've discovered that ma_test_all-t fails with -O2 or -Os in C(XX)FLAGS set. They work fine if -O1 is set. I've pointed this out on the MariaDB mailing list, but not sure if it's a MariaDB bug or gcc optimization issue. @Robin: Do we need to force -O1 for tests only or should we always do it? |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-18 ] |
|
I get the same test failures but they are not new since I get exactly the same test cases failing with version 5.1.50. |
| Comment by Elena Stepanova [ 2012-04-20 ] |
|
Re: Aria unit tests fail at ma_test2 line 316 n3=rnd(5000); while rnd(uint max_value) is which means with some luck it can return max_value itself. Luck happens, rnd returns 5000, key3[n3] reads something entirely wrong (in my case the value of 'silent' variable which is int and set to 1 as the unit test is launched with -s), the entire condition check with key3[n3] gets twisted, the bogus error occurs. The following change fixes the problem for me, although maybe there are more elegant solutions. === modified file 'storage/maria/ma_test2.c'
|
| Comment by Rasmus Johansson (Inactive) [ 2012-04-23 ] |
|
More info about ma_test_all-t that may be causing random test failures: |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-25 ] |
|
Created attachment 310111 This patch fixes the errors on ma_test2 during unit tests. When applied, my test box passes all tests with the following parameters. This also applies and fixes on mariadb-5.2.12 and mariadb-5.3.6. 5.2.12 only 1 test fails (plugins.unix_socket) due to Portage stripping $USER. |
| Comment by Brian Evans (Inactive) [ 2012-04-25 ] |
|
Re: Aria unit tests fail at ma_test2 line 316 There is a second spot for a possible index out of range that was not previously reported. |
| Comment by Brian Evans (Inactive) [ 2012-04-25 ] |
|
I've attached a patch which helped me resolve the random test failures. There is a second spot for a possible index out of range that was not previously reported. |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-25 ] |
|
Upstream bug on the test failure: |
| Comment by Rasmus Johansson (Inactive) [ 2012-08-02 ] |
|
Patch is now InCVS and will ship with the next mysql-extras release. |
| Comment by Rasmus Johansson (Inactive) [ 2012-08-06 ] |
|
Launchpad bug id: 986261 |
| Comment by Michael Widenius [ 2012-10-31 ] |
|
This was a bug in the test case (not aria); One array was one unit too small. I will push this into 5.1, 5.2, 5.3 and 5.5 |
| Comment by Michael Widenius [ 2012-10-31 ] |
|
Fix pushed into 5.1 |