[MDEV-15670] unit.my_atomic failed in buildbot with Signal 11 thrown Created: 2018-03-26  Updated: 2019-01-16  Resolved: 2018-12-18

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.0
Fix Version/s: 10.4.1, 10.1.38, 5.5.63, 10.0.38, 10.2.20, 10.3.12

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-12897 unit.lf failed in buildbot Closed

 Description   

http://buildbot.askmonty.org/buildbot/builders/kvm-fulltest/builds/12607

unit.my_atomic                           w4 [ fail ]
        Test ended at 2018-03-26 03:43:54
 
CURRENT_TEST: unit.my_atomic
# N CPUs: 4, atomic ops: gcc-atomics-smp
1..6
ok 1 - my_atomic_initialize() returned 0
# Testing my_atomic_add32 with 30 threads, 3000 iterations... 
Bail out! Signal 11 thrown
# 6 tests planned,  0 failed,  1 was last executed
 
 
mysqltest failed with unexpected return code 255



 Comments   
Comment by Sergey Vojtovich [ 2018-11-25 ]

Reproducible with: while [ $? -eq 0 ]; do ../unittest/mysys/my_atomic-t; done

Comment by Sergey Vojtovich [ 2018-11-25 ]

What I observe looks like a glibc bug. For me (ubuntu xenial) it crashes as following:

#0  0x00007fd1becd430d in nanosleep () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fd1becd425a in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#2  0x0000560fa9bd5e2c in handle_core_signal (signo=11) at /home/svoj/devel/maria/mariadb/unittest/mytap/tap.c:134
#3  <signal handler called>
#4  __pthread_create_2_1 (newthread=<optimized out>, attr=<optimized out>, start_routine=<optimized out>, arg=<optimized out>) at pthread_create.c:713
#5  0x0000560fa9bd5603 in test_concurrently (test=0x560fa9c29949 "my_atomic_add64", handler=0x560fa9bd58ab <test_atomic_add64>, n=3, m=3000) at /home/svoj/devel/maria/mariadb/unittest/mysys/thr_template.c:40
#6  0x0000560fa9bd5cd4 in do_tests () at /home/svoj/devel/maria/mariadb/unittest/mysys/my_atomic-t.c:144
#7  0x0000560fa9bd57ae in main (argc=1, argv=0x7ffc289d02a8) at /home/svoj/devel/maria/mariadb/unittest/mysys/thr_template.c:72

The solution is to upgrade builders. A workaround is to make threads joinable (which will make code better anyway).

For details see https://bugs.mysql.com/bug.php?id=82886

Generated at Thu Feb 08 08:23:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.