[debian-mysql] Bug#968914: mariadb-10.3: FTBFS on ia64: test main.func_regexp_pcre crashes server

Otto Kekäläinen otto at debian.org
Sun Aug 23 21:58:26 BST 2020


Source: mariadb-10.3
Version: 1:10.3.24-1
Severity: serious
Justification: fails to build from source
User: debian-ia64 at lists.debian.org
Usertags: ia64

The MariaDB Server package was building fine on ia64 in version
1:10.3.23. However the most recent upload regressed it.

Before:
https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.3&arch=ia64&ver=1%3A10.3.23-1&stamp=1594771271&raw=0

After:
https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.3&arch=ia64&ver=1%3A10.3.24-1&stamp=1598118336&raw=0

The failure happens in the test suite (run immediately after the build
to verify build was successful) test main.func_regexp_pcre that
crashes the server with:

*****
main.func_regexp_pcre                    w1 [ fail ]
        Test ended at 2020-08-22 17:41:39

CURRENT_TEST: main.func_regexp_pcre
mysqltest: At line 434: query 'SELECT 1 FROM dual WHERE
('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,Golf,Hotel,India,Juliet,Kilo,Lima,Mike,StrataL3,November,Oscar,StrataL2,Sand,P3,P4SwitchTest,Arsys,Poppa,ExtensionMgr,Arp,Quebec,Romeo,StrataApiV2,PtReyes,Sierra,SandAcl,Arrow,Artools,BridgeTest,Tango,SandT,PAlaska,Namespace,Agent,Qos,PatchPanel,ProjectReport,Ark,Gimp,Agent,SliceAgent,Arnet,Bgp,Ale,Tommy,Central,AsicPktTestLib,Hsc,SandL3,Abuild,Pca9555,Standby,ControllerDut,CalSys,SandLib,Sb820,PointV2,BfnLib,Evpn,BfnSdk,Sflow,ManagementActive,AutoTest,GatedTest,Bgp,Sand,xinetd,BfnAgentLib,bf-utils,Hello,BfnState,Eos,Artest,Qos,Scd,ThermoMgr,Uniform,EosUtils,Eb,FanController,Central,BfnL3,BfnL2,tcp_wrappers,Victor,Environment,Route,Failover,Whiskey,Xray,Gimp,BfnFixed,Strata,SoCal,XApi,Msrp,XpProfile,tcpdump,PatchPanel,ArosTest,FhTest,Arbus,XpAcl,MacConc,XpApi,telnet,QosTest,Alpha2,BfnVlan,Stp,VxlanControllerTest,MplsAgent,Bravo2,Lanz,BfnMbb,Intf,XCtrl,Unicast,SandTunnel,L3Unicast,Ipsec,MplsTest,Rsvp,EthIntf,StageMgr,Sol,MplsUtils,Nat,Ira,P4NamespaceDut,Counters,Charlie2,Aqlc,Mlag,Power,OpenFlow,Lag,RestApi,BfdTest,strongs,Sfa,CEosUtils,Adt746,MaintenanceMode,MlagDut,EosImage,IpEth,MultiProtocol,Launcher,Max3179,Snmp,Acl,IpEthTest,PhyEee,bf-syslibs,tacc,XpL2,p4-ar-switch,p4-bf-switch,LdpTest,BfnPhy,Mirroring,Phy6,Ptp'
 REGEXP '^((?!\b(Strata|StrataApi|StrataApiV2)\b).)*$')' failed: 2013:
Lost connection to MySQL server during query

The result from queries just before the failure was:
< snip >
# Testing workaround N1: This makes the pattern to be a binary string:
SET NAMES latin1;
SET @regCheck= X'E001';
SELECT 0xE001 REGEXP @regCheck;
0xE001 REGEXP @regCheck
1
# Testing workaround N2: This also makes the pattern to be a binary
string, using a different syntax:
SET NAMES latin1;
SET @regCheck= _binary '\\xE0\\x01';
SELECT 0xE001 REGEXP @regCheck;
0xE001 REGEXP @regCheck
1
# Testing workarond N3: This makes derivation of the subject string
stronger (IMLICIT instead of COERCIBLE)
SET NAMES latin1;
SET @regCheck= '\\xE0\\x01';
SELECT CAST(0xE001 AS BINARY) REGEXP @regCheck;
CAST(0xE001 AS BINARY) REGEXP @regCheck
1
# MDEV-12420: Testing recursion overflow
SELECT 1 FROM dual WHERE
('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral,Golf,Hotel,India,Juliet,Kilo,Lima,Mike,StrataL3,November,Oscar,StrataL2,Sand,P3,P4SwitchTest,Arsys,Poppa,ExtensionMgr,Arp,Quebec,Romeo,StrataApiV2,PtReyes,Sierra,SandAcl,Arrow,Artools,BridgeTest,Tango,SandT,PAlaska,Namespace,Agent,Qos,PatchPanel,ProjectReport,Ark,Gimp,Agent,SliceAgent,Arnet,Bgp,Ale,Tommy,Central,AsicPktTestLib,Hsc,SandL3,Abuild,Pca9555,Standby,ControllerDut,CalSys,SandLib,Sb820,PointV2,BfnLib,Evpn,BfnSdk,Sflow,ManagementActive,AutoTest,GatedTest,Bgp,Sand,xinetd,BfnAgentLib,bf-utils,Hello,BfnState,Eos,Artest,Qos,Scd,ThermoMgr,Uniform,EosUtils,Eb,FanController,Central,BfnL3,BfnL2,tcp_wrappers,Victor,Environment,Route,Failover,Whiskey,Xray,Gimp,BfnFixed,Strata,SoCal,XApi,Msrp,XpProfile,tcpdump,PatchPanel,ArosTest,FhTest,Arbus,XpAcl,MacConc,XpApi,telnet,QosTest,Alpha2,BfnVlan,Stp,VxlanControllerTest,MplsAgent,Bravo2,Lanz,BfnMbb,Intf,XCtrl,Unicast,SandTunnel,L3Unicast,Ipsec,MplsTest,Rsvp,EthIntf,StageMgr,Sol,MplsUtils,Nat,Ira,P4NamespaceDut,Counters,Charlie2,Aqlc,Mlag,Power,OpenFlow,Lag,RestApi,BfdTest,strongs,Sfa,CEosUtils,Adt746,MaintenanceMode,MlagDut,EosImage,IpEth,MultiProtocol,Launcher,Max3179,Snmp,Acl,IpEthTest,PhyEee,bf-syslibs,tacc,XpL2,p4-ar-switch,p4-bf-switch,LdpTest,BfnPhy,Mirroring,Phy6,Ptp'
 REGEXP '^((?!\b(Strata|StrataApi|StrataApiV2)\b).)*$');

More results from queries before failure can be found in
/<<PKGBUILDDIR>>/builddir/mysql-test/var/1/log/func_regexp_pcre.log

 - found 'core' (0/5)

Trying 'dbx' to get a backtrace

Trying 'gdb' to get a backtrace from coredump
/<<PKGBUILDDIR>>/builddir/mysql-test/var/1/log/main.func_regexp_pcre/mysqld.1/data/core
Core generated by '/<<PKGBUILDDIR>>/builddir/sql/mysqld'
Output from gdb follows. The first stack trace is from the failing thread.
The following stack traces are from all threads (so the failing one is
duplicated).
--------------------------
[New LWP 2297599]
[New LWP 2297570]
[New LWP 2297572]
[New LWP 2297571]
[New LWP 2297574]
[New LWP 2297569]
[New LWP 2297944]
[New LWP 2297573]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/ia64-linux-gnu/libthread_db.so.1".
Failed to read a valid object file image from memory.
Core was generated by `/<<PKGBUILDDIR>>/builddir/sql/mysqld --defaults-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x2000000000aa3680 in memcmp () from /lib/ia64-linux-gnu/libc.so.6.1
[Current thread is 1 (Thread 0x2000000007365130 (LWP 2297599))]
#0  0x2000000000aa3680 in memcmp () from /lib/ia64-linux-gnu/libc.so.6.1
#1  0x2000000000adc890 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1
#2  0x2000000000ae17b0 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1
#3  0x2000000000ade980 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1
#4  0x2000000800fbf170 in handle_fatal_signal (sig=11) at
./sql/signal_handler.cc:125
#5  0xa000000000040800 in ?? ()
#6  0x2000000000adc890 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1

Thread 8 (Thread 0x200000000722d130 (LWP 2297573)):
#0  0xa000000000040721 in ?? ()
#1  0x200000000044ac30 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/ia64-linux-gnu/libpthread.so.0
#2  0x2000000800870240 in inline_mysql_cond_wait
(src_file=0x2000000801d1c7d8 "/<<PKGBUILDDIR>>/sql/slave.cc",
src_line=516, mutex=<optimized out>, that=<optimized out>) at
./include/mysql/psi/mysql_thread.h:1174
#3  handle_slave_background (arg=0x200000000722c750) at ./sql/slave.cc:516
#4  0x2000000801b0a010 in pfs_spawn_thread (arg=0x200000080304f4b8) at
./storage/perfschema/pfs.cc:1869
#5  0x2000000000438ab0 in start_thread () from
/lib/ia64-linux-gnu/libpthread.so.0
#6  0x2000000000b70c50 in __clone2 () from /lib/ia64-linux-gnu/libc.so.6.1
#7  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x200000000749d130 (LWP 2297944)):
#0  0xa000000000040721 in ?? ()
#1  0x200000000044b3f0 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/ia64-linux-gnu/libpthread.so.0
#2  0x2000000800820830 in inline_mysql_cond_timedwait
(src_file=0x2000000801d113a0 "/<<PKGBUILDDIR>>/sql/mysqld.cc",
src_line=2994, abstime=0x200000000749c748, mutex=0x20000008025850d8
<LOCK_thread_cache>, that=0x20000008025873d0 <COND_thread_cache>) at
./include/mysql/psi/mysql_thread.h:1211
#3  cache_thread (thd=0x200000002000b678) at ./sql/mysqld.cc:2994
#4  one_thread_per_connection_end (thd=0x200000002000b678,
put_in_cache=true) at ./sql/mysqld.cc:3080
#5  0x2000000800c28e80 in do_handle_one_connection
(connect=0x2000000803054b18) at ./sql/sql_connect.cc:1422
#6  0x2000000800c296c0 in handle_one_connection
(arg=0x2000000803054b18) at ./sql/sql_connect.cc:1308
#7  0x2000000801b0a010 in pfs_spawn_thread (arg=0x20000008030b0898) at
./storage/perfschema/pfs.cc:1869
#8  0x2000000000438ab0 in start_thread () from
/lib/ia64-linux-gnu/libpthread.so.0
#9  0x2000000000b70c50 in __clone2 () from /lib/ia64-linux-gnu/libc.so.6.1
#10 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x200000000111c440 (LWP 2297569)):
#0  0xa000000000040721 in ?? ()
#1  0x2000000000b5b650 in poll () from /lib/ia64-linux-gnu/libc.so.6.1
#2  0x2000000800835bc0 in poll (__timeout=-1, __nfds=<optimized out>,
__fds=0x60000fffff9f35c0) at
/usr/include/ia64-linux-gnu/bits/poll2.h:41
#3  handle_connections_sockets () at ./sql/mysqld.cc:6762
#4  0x20000008008386e0 in mysqld_main (argc=<optimized out>,
argv=<optimized out>) at ./sql/mysqld.cc:6231
#5  0x20000008007e28b0 in main (argc=6, argv=0x60000fffff9f3998) at
./sql/main.cc:25

Thread 5 (Thread 0x20000000072c9130 (LWP 2297574)):
#0  0xa000000000040721 in ?? ()
#1  0x200000000044b3f0 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/ia64-linux-gnu/libpthread.so.0
#2  0x2000000800820830 in inline_mysql_cond_timedwait
(src_file=0x2000000801d113a0 "/<<PKGBUILDDIR>>/sql/mysqld.cc",
src_line=2994, abstime=0x20000000072c8748, mutex=0x20000008025850d8
<LOCK_thread_cache>, that=0x20000008025873d0 <COND_thread_cache>) at
./include/mysql/psi/mysql_thread.h:1211
#3  cache_thread (thd=0x2000000018000c48) at ./sql/mysqld.cc:2994
#4  one_thread_per_connection_end (thd=0x2000000018000c48,
put_in_cache=true) at ./sql/mysqld.cc:3080
#5  0x2000000800c28e80 in do_handle_one_connection
(connect=0x2000000802f78f38) at ./sql/sql_connect.cc:1422
#6  0x2000000800c296c0 in handle_one_connection
(arg=0x2000000802f78f38) at ./sql/sql_connect.cc:1308
#7  0x2000000801b0a010 in pfs_spawn_thread (arg=0x20000008030631a8) at
./storage/perfschema/pfs.cc:1869
#8  0x2000000000438ab0 in start_thread () from
/lib/ia64-linux-gnu/libpthread.so.0
#9  0x2000000000b70c50 in __clone2 () from /lib/ia64-linux-gnu/libc.so.6.1
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x20000000070f7130 (LWP 2297571)):
#0  0xa000000000040721 in ?? ()
#1  0x200000000044b3f0 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/ia64-linux-gnu/libpthread.so.0
#2  0x2000000801942eb0 in inline_mysql_cond_timedwait
(src_file=0x2000000801eb4098
"/<<PKGBUILDDIR>>/storage/maria/ma_servicethread.c", src_line=115,
abstime=0x20000000070f6788, mutex=0x2000000802e049e0
<LOCK_checkpoint>, that=<optimized out>) at
./include/mysql/psi/mysql_thread.h:1211
#3  my_service_thread_sleep (control=0x20000008024e1b40
<checkpoint_control>, sleep_time=<optimized out>) at
./storage/maria/ma_servicethread.c:115
#4  0x200000080192f920 in ma_checkpoint_background (arg=0x1e) at
./storage/maria/ma_checkpoint.c:707
#5  0x2000000801b0a010 in pfs_spawn_thread (arg=0x2000000802f802b8) at
./storage/perfschema/pfs.cc:1869
#6  0x2000000000438ab0 in start_thread () from
/lib/ia64-linux-gnu/libpthread.so.0
#7  0x2000000000b70c50 in __clone2 () from /lib/ia64-linux-gnu/libc.so.6.1
#8  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x2000000007191130 (LWP 2297572)):
#0  0xa000000000040721 in ?? ()
#1  0x20000000009ef370 in sigtimedwait () from /lib/ia64-linux-gnu/libc.so.6.1
#2  0x2000000000456760 in sigwait () from /lib/ia64-linux-gnu/libpthread.so.0
#3  0x200000080081c060 in signal_hand (arg=0x2000000007190798) at
./sql/mysqld.cc:3551
#4  0x2000000801b0a010 in pfs_spawn_thread (arg=0x200000080304f178) at
./storage/perfschema/pfs.cc:1869
#5  0x2000000000438ab0 in start_thread () from
/lib/ia64-linux-gnu/libpthread.so.0
#6  0x2000000000b70c50 in __clone2 () from /lib/ia64-linux-gnu/libc.so.6.1
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x2000000005d7b130 (LWP 2297570)):
#0  0xa000000000040721 in ?? ()
#1  0x200000000044b3f0 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib/ia64-linux-gnu/libpthread.so.0
#2  0x2000000801c5d310 in inline_mysql_cond_timedwait
(that=0x2000000802e13e80 <COND_timer>, mutex=0x2000000802e13eb8
<LOCK_timer>, src_file=0x2000000801ed08a8
"/<<PKGBUILDDIR>>/mysys/thr_timer.c", src_line=292,
abstime=0x2000000005d7a788) at ./include/mysql/psi/mysql_thread.h:1211
#3  timer_handler (arg=0x2000000005d7a750) at ./mysys/thr_timer.c:292
#4  0x2000000801b0a010 in pfs_spawn_thread (arg=0x2000000802f62bc8) at
./storage/perfschema/pfs.cc:1869
#5  0x2000000000438ab0 in start_thread () from
/lib/ia64-linux-gnu/libpthread.so.0
#6  0x2000000000b70c50 in __clone2 () from /lib/ia64-linux-gnu/libc.so.6.1
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x2000000007365130 (LWP 2297599)):
#0  0x2000000000aa3680 in memcmp () from /lib/ia64-linux-gnu/libc.so.6.1
#1  0x2000000000adc890 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1
#2  0x2000000000ae17b0 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1
#3  0x2000000000ade980 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1
#4  0x2000000800fbf170 in handle_fatal_signal (sig=11) at
./sql/signal_handler.cc:125
#5  0xa000000000040800 in ?? ()
#6  0x2000000000adc890 in ?? () from /lib/ia64-linux-gnu/libc.so.6.1

Compressed file
/<<PKGBUILDDIR>>/builddir/mysql-test/var/1/log/main.func_regexp_pcre/mysqld.1/data/core
 - saving '/<<PKGBUILDDIR>>/builddir/mysql-test/var/1/log/main.func_regexp_pcre/'
to '/<<PKGBUILDDIR>>/builddir/mysql-test/var/log/main.func_regexp_pcre/'
*****


Help from ia64 experts on why this happens in ia64 now (and only ia64)
would be appreciated.

Contributions are welcome in this bug report on via Salsa:
https://wiki.debian.org/Teams/MySQL/patches



More information about the pkg-mysql-maint mailing list