[MDEV-135] failures in buildbot in 5.5 on kvm-deb-debian5-amd64 Created: 2012-02-02 Updated: 2012-05-08 Resolved: 2012-02-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.5.20 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Failing test(s): rpl.rpl_checksum_cache rpl.rpl_heartbeat_basic main.ps_3innodb main.ps main.subselect_mat_cost main.select_pkeycache main.multi_update main.union |
| Comments |
| Comment by Kristian Nielsen [ 2012-02-02 ] |
|
Simple test case: CREATE TABLE t1 (i INT, INDEX The problem seems to be in my_decimal_div(). This dump is from XXX3: SQLCOM_SELECT: SELECT AVG This means that Item_sum_avg::val_decimal() is computing 1/1 with Unfortunately, the bug occurence is extremely fragile. I can repeat on VM vm-debian5-amd64-build by copying in source tarball and wierd ... |
| Comment by Kristian Nielsen [ 2012-02-02 ] |
|
I discovered that the problem occurs when strings/decimal.c is build with DEB_BUILD_HARDENING=1. |
| Comment by Kristian Nielsen [ 2012-02-02 ] |
|
Bug is triggered when strings/decimal.c is compiled with -D_FORTIFY_SOURCE=2 (or =1). |
| Comment by Kristian Nielsen [ 2012-02-06 ] |
|
Ok, I analysed this in detail. My conclusion is that this is a bug in the old The code does this: if (unlikely(dcarry == 0 && *start1 < *start2)) len2 can be zero (and is, when I see the failure). SUB2 assigns to *buf1. Checking the disassembled GCC output, what it does is cache the value of a92390: 44 8b 7e fc mov -0x4(%rsi),%r15d # *start1 and it uses this variable to assign to dcarry: a92512: 44 89 fb mov %r15d,%ebx # dcarry=*start1 This is wrong, as the value in %r15d is stale. *start1 has a new value from the SUB2(). I do not see any problems with the code in terms of violation of strict I do not think there is a point in trying to report this as a GCC bug. This is I will add an #ifdef so that the debian package build can work-around the |
| Comment by Kristian Nielsen [ 2012-02-06 ] |
|
Buildbot confirms that workaround eliminates the failure. |