Bug #31284 rpl_ndb_blob fails on powermacg5: incorrect BLOB contents
Submitted: 28 Sep 2007 16:44 Modified: 10 Jul 2008 11:01
Reporter: Timothy Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:5.1, 5.2 OS:Mac OS X (powermacg5)
Assigned to: Frazer Clement CPU Architecture:Any
Tags: pbfail

[28 Sep 2007 16:44] Timothy Smith
Description:
This failure has been around for a while on the powermacg5 platform.

The first place it shows up is in mysql-5.2 tree here:

https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=mysql-5.2&order=74

It may be that pushbuild wasn't running this test earlier.

The symptom is that the sha1() of a BLOB field is incorrect:

rpl_ndb.rpl_ndb_blob           [ fail ]

Errors are (from /Users/henry/pb/mysql-5.2-opt/49/mysql-5.2.6-alpha-pb49/mysql-test/var-n_mix-5/log/mysqltest-time) :
mysqltest: Result content mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** /Users/henry/pb/mysql-5.2-opt/49/mysql-5.2.6-alpha-pb49/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result	Thu Aug 30 20:16:36 2007
--- /Users/henry/pb/mysql-5.2-opt/49/mysql-5.2.6-alpha-pb49/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.reject	Fri Aug 31 05:51:34 2007
***************
*** 67,93 ****
  select 'M', a, sha1(b), c, sha1(d), sha1(e)
  from t1 order by a;
  M	a	sha1(b)	c	sha1(d)	sha1(e)
! M	0	9538f61e649383c0d1054de2a2f0171188129f33	100	2b6515f29c20b8e9e17cc597527e516c0de8d612	NULL
! M	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	f23e7439d9a73c3954979b85a7ef6ef35faf4e9d	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  M	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
! M	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	278629ad080c3c4377978c006c2e54d0992e43cc	700915801f853603510aeb67b331866d996fdbda
! M	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	5084b602c7203e0e9590a163415ac605da17ac32	700915801f853603510aeb67b331866d996fdbda
  M	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  M	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
! M	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8	da39a3ee5e6b4b0d3255bfef95601890afd80709
  M	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
  M	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
  select 'S', a, sha1(b), c, sha1(d), sha1(e)
  from t1 order by a;
  S	a	sha1(b)	c	sha1(d)	sha1(e)
! S	0	9538f61e649383c0d1054de2a2f0171188129f33	100	2b6515f29c20b8e9e17cc597527e516c0de8d612	NULL
! S	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	f23e7439d9a73c3954979b85a7ef6ef35faf4e9d	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  S	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
! S	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	278629ad080c3c4377978c006c2e54d0992e43cc	700915801f853603510aeb67b331866d996fdbda
! S	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	5084b602c7203e0e9590a163415ac605da17ac32	700915801f853603510aeb67b331866d996fdbda
  S	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  S	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
! S	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8	da39a3ee5e6b4b0d3255bfef95601890afd80709
  S	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
  S	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
  drop table t1;
--- 67,93 ----
  select 'M', a, sha1(b), c, sha1(d), sha1(e)
  from t1 order by a;
  M	a	sha1(b)	c	sha1(d)	sha1(e)
! M	0	9538f61e649383c0d1054de2a2f0171188129f33	100	66dfdcd02cd32bc4d82b49bf84258bb78eef0f32	NULL
! M	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	a1852aab4f317d5bb4d8e553f7bec6c895fb9eb8	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  M	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
! M	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	a69bcebf0e0942cb54b3d792d81dfd0065c15842	700915801f853603510aeb67b331866d996fdbda
! M	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	0ee8f61857e7b113fd93e5c55c9fef1a2586c11d	700915801f853603510aeb67b331866d996fdbda
  M	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  M	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
! M	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	b8ec0980d6e87999d8f8ed87710e62ef907b9d9c	da39a3ee5e6b4b0d3255bfef95601890afd80709
  M	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
  M	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
  select 'S', a, sha1(b), c, sha1(d), sha1(e)
  from t1 order by a;
  S	a	sha1(b)	c	sha1(d)	sha1(e)
! S	0	9538f61e649383c0d1054de2a2f0171188129f33	100	66dfdcd02cd32bc4d82b49bf84258bb78eef0f32	NULL
! S	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	a1852aab4f317d5bb4d8e553f7bec6c895fb9eb8	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  S	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
! S	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	a69bcebf0e0942cb54b3d792d81dfd0065c15842	700915801f853603510aeb67b331866d996fdbda
! S	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	0ee8f61857e7b113fd93e5c55c9fef1a2586c11d	700915801f853603510aeb67b331866d996fdbda
  S	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
  S	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
! S	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	b8ec0980d6e87999d8f8ed87710e62ef907b9d9c	da39a3ee5e6b4b0d3255bfef95601890afd80709
  S	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
  S	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
  drop table t1;
-------------------------------------------------------

How to repeat:
Verified by pushbuild, see xref for rpl_ndb_blob test:

https://intranet.mysql.com/secure/pushbuild/xref.pl?startdate=&enddate=&dir=&plat=&testtyp...
[20 Nov 2007 18:05] Jonas Oreland
this was most likely fixed by blob/commit fixes that we did
(related to simple-read)

and error has not been seen in pb since september (when we did fix)
[25 Nov 2007 12:49] Ingo Strüwing
Disagree. This is from the latest mysql-6.0:

rpl_ndb.rpl_ndb_blob           [ fail ]

--- /Users/henry/pb/mysql-6.0/32/mysql-6.0.4-alpha-pb32/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result	Thu Nov 22 20:36:45 2007
+++ /Users/henry/pb/mysql-6.0/32/mysql-6.0.4-alpha-pb32/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.reject	Fri Nov 23 11:16:38 2007
@@ -67,27 +67,27 @@
 select 'M', a, sha1(b), c, sha1(d), sha1(e)
 from t1 order by a;
 M	a	sha1(b)	c	sha1(d)	sha1(e)
-M	0	9538f61e649383c0d1054de2a2f0171188129f33	100	2b6515f29c20b8e9e17cc597527e516c0de8d612	NULL
-M	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	f23e7439d9a73c3954979b85a7ef6ef35faf4e9d	abfe8ae5212b22d023aa6de84beeb1344ac5668a
+M	0	9538f61e649383c0d1054de2a2f0171188129f33	100	66dfdcd02cd32bc4d82b49bf84258bb78eef0f32	NULL
+M	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	a1852aab4f317d5bb4d8e553f7bec6c895fb9eb8	abfe8ae5212b22d023aa6de84beeb1344ac5668a
 M	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
-M	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	278629ad080c3c4377978c006c2e54d0992e43cc	700915801f853603510aeb67b331866d996fdbda
-M	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	5084b602c7203e0e9590a163415ac605da17ac32	700915801f853603510aeb67b331866d996fdbda
+M	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	a69bcebf0e0942cb54b3d792d81dfd0065c15842	700915801f853603510aeb67b331866d996fdbda
+M	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	0ee8f61857e7b113fd93e5c55c9fef1a2586c11d	700915801f853603510aeb67b331866d996fdbda
 M	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
 M	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
-M	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8	da39a3ee5e6b4b0d3255bfef95601890afd80709
+M	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	b8ec0980d6e87999d8f8ed87710e62ef907b9d9c	da39a3ee5e6b4b0d3255bfef95601890afd80709
 M	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
 M	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
 select 'S', a, sha1(b), c, sha1(d), sha1(e)
 from t1 order by a;
 S	a	sha1(b)	c	sha1(d)	sha1(e)
-S	0	9538f61e649383c0d1054de2a2f0171188129f33	100	2b6515f29c20b8e9e17cc597527e516c0de8d612	NULL
-S	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	f23e7439d9a73c3954979b85a7ef6ef35faf4e9d	abfe8ae5212b22d023aa6de84beeb1344ac5668a
+S	0	9538f61e649383c0d1054de2a2f0171188129f33	100	66dfdcd02cd32bc4d82b49bf84258bb78eef0f32	NULL
+S	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	a1852aab4f317d5bb4d8e553f7bec6c895fb9eb8	abfe8ae5212b22d023aa6de84beeb1344ac5668a
 S	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
-S	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	278629ad080c3c4377978c006c2e54d0992e43cc	700915801f853603510aeb67b331866d996fdbda
-S	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	5084b602c7203e0e9590a163415ac605da17ac32	700915801f853603510aeb67b331866d996fdbda
+S	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	a69bcebf0e0942cb54b3d792d81dfd0065c15842	700915801f853603510aeb67b331866d996fdbda
+S	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	0ee8f61857e7b113fd93e5c55c9fef1a2586c11d	700915801f853603510aeb67b331866d996fdbda
 S	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
 S	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
-S	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8	da39a3ee5e6b4b0d3255bfef95601890afd80709
+S	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	b8ec0980d6e87999d8f8ed87710e62ef907b9d9c	da39a3ee5e6b4b0d3255bfef95601890afd80709
 S	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
 S	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
 drop table t1;

mysqltest: Result content mismatch

The log file is: https://intranet.mysql.com/secure/pushbuild/getlog.pl?dir=mysql-6.0&entry=dfischer@pippilo...

Disabling the test case. Please re-enable after fix.
[28 Nov 2007 10:24] Bugs System
Pushed into 6.0.4-alpha
[30 May 2008 19:49] Frazer Clement
Long Blob v2 exposed a buffer overrun in old-Api setValue() call.
Fix is to ensure stack buffers allocated in setValue() are large enough.
[30 May 2008 19:57] Jonas Oreland
patch as such is brilliant,
can you also check if there are similar occurrences
for key (max_keysize_in_words or similar)
[3 Jun 2008 10:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/47344
[3 Jun 2008 10:35] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/47349
[3 Jun 2008 10:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/47350
[3 Jun 2008 15:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/47377
[3 Jun 2008 15:45] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/47379
[9 Jul 2008 8:51] Jon Stephens
Need versions in which the fix was applied. Thanks.
[9 Jul 2008 9:50] Frazer Clement
Pushed to 6.2.16, 6.3.16, 6.4.0
[10 Jul 2008 11:01] Jon Stephens
Documented in the 5.1.24-ndb-6.2.16, 5.1.24-ndb-6.3.16, and 6.0.4 changelogs as follows:

        A buffer overrun in NdbBlob::setValue() caused 
        erroneous results on Mac OS X.

Closed.
[13 Jul 2008 15:41] Andrei Elkin
Maybe bugteam tree has not got the fixes, but still here is the most recent show of the failure on that tree:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-bugteam&order=51
[12 Dec 2008 23:29] Bugs System
Pushed into 6.0.6-alpha  (revid:frazer@mysql.com-20080603100031-ks1hpd0bj2zcj4r9) (version source revid:jonas@mysql.com-20080808094047-4e1yiarqa2t3opg3) (pib:5)