Bug #33398 mysys unit test segv in my_atomic-t

Submitted: 20 Dec 2007 12:58 Modified: 15 Apr 2008 23:13
Reporter: Daniel Fischer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:mysql-6.0 bk OS:Solaris (SPARC 64)
Assigned to: CPU Architecture:Any

[20 Dec 2007 12:58] Daniel Fischer
Description:
On Solaris 10 SPARC 64 bit, the mysys unit test is aborted after signal 11 in my_atomic-t:

mysys/bitmap-t......ok
mysys/base64-t......ok
mysys/my_atomic-t...FAILED--Further testing stopped: Signal 11 thrown

Output from manual run:
$ ./my_atomic-t
# N CPUs: 2, atomic ops: mutex
1..7
ok 1 - my_atomic_initialize() returned 0
# Testing my_atomic_add32 with 100 threads, 3000 iterations... 
Bail out! Signal 11 thrown

Ouput from manual run in debugger:
(dbx) run
Running: my_atomic-t 
(process id 2745)
Reading libc_psr.so.1
# N CPUs: 2, atomic ops: mutex
1..7
ok 1 - my_atomic_initialize() returned 0
# Testing my_atomic_add32 with 100 threads, 3000 iterations... 
t@2 (l@2) signal SEGV (no mapping at the fault address) in my_atomic_add32 at 0x10000e718
0x000000010000e718: my_atomic_add32       :     ld       [%o0], %o3
(dbx) where
current thread: t@2
=>[1] my_atomic_add32(0x25b674, 0x792a2471, 0x0, 0x10025b688, 0xffffffff7e6eae40, 0xffffffff7f402400), at 0x10000e718 
  [2] test_atomic_add_handler(0xffffffff7ffff88c, 0x7fffffff, 0x5dc, 0x10025b680, 0x87654321, 0x10025b674), at 0x10000cad8 

How to repeat:
Build mysql-6.0 bk on Solaris 10 SPARC 64-bit and run the mysys unit test, or run my_atomic-t directly.
[3 Jan 2008 16:30] Susanne Ebrecht
Setting to verified.
[20 Feb 2008 16:09] Guilhem Bichot
I have just fixed a similar-looking bug in the mysql-maria. Patch for this is to the file include/my_atomic.h:
187c187
< extern int ## S my_atomic_add ## S(Uv_ ## S, U_ ## S);
---
> extern int ## S my_atomic_add ## S(Uv_ ## S U_a, U_ ## S U_v);
190c190
< extern int ## S my_atomic_fas ## S(Uv_ ## S, U_ ## S);
---
> extern int ## S my_atomic_fas ## S(Uv_ ## S U_a, U_ ## S U_v);
193c193
< extern int my_atomic_cas ## S(Uv_ ## S, Uv_ ## S, U_ ## S);
---
> extern int my_atomic_cas ## S(Uv_ ## S U_a, Uv_ ## S U_cmp, U_ ## S U_set);
196c196
< extern int ## S my_atomic_load ## S(Uv_ ## S);
---
> extern int ## S my_atomic_load ## S(Uv_ ## S U_a);
199c199
< extern void my_atomic_store ## S(Uv_ ## S, U_ ## S);
---
> extern void my_atomic_store ## S(Uv_ ## S U_a, U_ ## S U_v);
[20 Feb 2008 17:27] Sergei Golubchik
see also http://lists.mysql.com/commits/42667
[27 Feb 2008 14:49] Konstantin Osipov
Guilhem, this is Maria team code, please take over.
[27 Feb 2008 17:32] Guilhem Bichot
Asked the backup team to apply it to 6.0-backup.
[27 Feb 2008 20:36] Chuck Bell
Pushed a small patch on Guilhem's request to mysql-6.0-backup which fixes the my_atomic.h header in preparation for the MyISAM driver release. 

http://lists.mysql.com/commits/43108
[15 Apr 2008 17:58] Bugs System
Pushed into 6.0.5-alpha
[15 Apr 2008 23:13] Paul DuBois
No changelog entry needed, I think. (Fixes problem that doesn't appear in any released version.)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.068 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.