[MDEV-2892] LP:909512 - Server aborts with "safe_mutex: Trying to lock unitialized mutex" at threadpool_unix.cc:1341 Created: 2011-12-28  Updated: 2014-06-20  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Elena Stepanova Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug909512.xml    

 Description   

safe_mutex: Trying to lock unitialized mutex at /home/elenst/lp-5.5-threadpool/sql/threadpool_unix.cc, line 1341
111229 0:35:05 [ERROR] mysqld got signal 6 ;
Server version: 5.5.18-MariaDB-debug-log

#5 0x00007f886ee3bee6 in abort () from /lib64/libc.so.6
#6 0x0000000000c98520 in safe_mutex_lock (mp=0x14c5c00, my_flags=0,
file=0xd93410 "/home/elenst/lp-5.5-threadpool/sql/threadpool_unix.cc", line=1341)
at /home/elenst/lp-5.5-threadpool/mysys/thr_mutex.c:249
#7 0x000000000079e963 in inline_mysql_mutex_lock (that=0x14c5c00,
src_file=0xd93410 "/home/elenst/lp-5.5-threadpool/sql/threadpool_unix.cc", src_line=1341)
at /home/elenst/lp-5.5-threadpool/include/mysql/psi/mysql_thread.h:618
#8 0x00000000007a1434 in tp_set_threadpool_size (size=1)
at /home/elenst/lp-5.5-threadpool/sql/threadpool_unix.cc:1341
#9 0x000000000073c985 in fix_threadpool_size ()
at /home/elenst/lp-5.5-threadpool/sql/sys_vars.cc:2211
#10 0x00000000005b0186 in sys_var::update (this=0x14beb40, thd=0x1e2cbf0, var=0x1f6bcb8)
at /home/elenst/lp-5.5-threadpool/sql/set_var.cc:205
#11 0x00000000005b1270 in set_var::update (this=0x1f6bcb8, thd=0x1e2cbf0)
at /home/elenst/lp-5.5-threadpool/sql/set_var.cc:672
#12 0x00000000005b0e55 in sql_set_variables (thd=0x1e2cbf0, var_list=0x1e2fd88)
at /home/elenst/lp-5.5-threadpool/sql/set_var.cc:576
#13 0x000000000063d2c7 in mysql_execute_command (thd=0x1e2cbf0)
at /home/elenst/lp-5.5-threadpool/sql/sql_parse.cc:3163
#14 0x0000000000643dc3 in mysql_parse (thd=0x1e2cbf0,
rawbuf=0x1f6bb58 "SET GLOBAL thread_pool_size=1", length=29, parser_state=0x7f88646f0620)
at /home/elenst/lp-5.5-threadpool/sql/sql_parse.cc:5694
#15 0x000000000063812f in dispatch_command (command=COM_QUERY, thd=0x1e2cbf0,
packet=0x1f01121 "SET GLOBAL thread_pool_size=1", packet_length=29)
at /home/elenst/lp-5.5-threadpool/sql/sql_parse.cc:1052
#16 0x0000000000637446 in do_command (thd=0x1e2cbf0)
at /home/elenst/lp-5.5-threadpool/sql/sql_parse.cc:791
#17 0x0000000000729306 in do_handle_one_connection (thd_arg=0x1e2cbf0)
at /home/elenst/lp-5.5-threadpool/sql/sql_connect.cc:1226
#18 0x0000000000728dd8 in handle_one_connection (arg=0x1e2cbf0)
at /home/elenst/lp-5.5-threadpool/sql/sql_connect.cc:1141
#19 0x0000000000a91edc in pfs_spawn_thread (arg=0x1f87b30)
at /home/elenst/lp-5.5-threadpool/storage/perfschema/pfs.cc:1015
#20 0x00007f8870143a4f in start_thread () from /lib64/libpthread.so.0
#21 0x00007f886eed882d in clone () from /lib64/libc.so.6

bzr version-info
revision-id: <email address hidden>
date: 2011-12-28 03:51:12 +0100
build-date: 2011-12-29 00:44:44 +0200
revno: 3182
branch-nick: lp-5.5-threadpool

It happens if server is started with thread_handling=one-thread-per-connection or no-threads, upon an attempt to set thread_pool_size at runtime.
I only observed it on a debug build so far.



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2011-12-29 ]

Launchpad bug id: 909512

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