Details
Details
Assignee
Unassigned
UnassignedReporter
Juan Arruti
Juan ArrutiRegression Issue
Yes
Upstream Bug URL
Needs QA
Yes
Affects versions
Priority
Smart Checklist
Smart Checklist
Created March 31, 2023 at 1:38 AM
Updated March 6, 2024 at 9:44 AM
In version 8.0, a missing UDF file causes a signal 11 when it's invoked. This issue is also present in MySQL upstream code.
I've tested the following procedure in 8.0.11, 8.0.20, and 8.0.32, so I assume it has been present in all 8.0 versions.
mysql [localhost:33591] {msandbox} ((none)) > select @@version,@@version_comment ; +-----------+-----------------------------------------------------+ | @@version | @@version_comment | +-----------+-----------------------------------------------------+ | 8.0.32-24 | Percona Server (GPL), Release 24, Revision e5c6e9d2 | +-----------+-----------------------------------------------------+ 1 row in set (0.00 sec) mysql [localhost:33591] {msandbox} ((none)) > insert into mysql.func values ('udf_test',0,'udf_test.so','function'); Query OK, 1 row affected (0.02 sec) mysql [localhost:33591] {msandbox} ((none)) > use mysql ; Database changed mysql [localhost:33591] {msandbox} (mysql) > select udf_test('test'); ERROR 1305 (42000): FUNCTION mysql.udf_test does not exist $ ./restart stop /home/juan.arruti/sandboxes/msb_8_0_32 .. sandbox server started # The error log correctly shows the missing function: 2023-03-31T01:31:58.622354Z 0 [ERROR] [MY-010901] [Server] Can't open shared library 'udf_test.so' (errno: 33 /opt/percona_server/8.0.32/lib/plugin/udf_test.so: cannot open shared object file: No such file or directory). # Call the function mysql [localhost:33591] {msandbox} ((none)) > select udf_test('test'); ERROR 2013 (HY000): Lost connection to MySQL server during query # MySQL error log shows the following stack trace: 2023-03-31T01:32:17Z UTC - mysqld got signal 11 ; Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware. BuildID[sha1]=371d582c0b5834709278cbc9f37d82c93a582526 Server Version: 8.0.32-24 Percona Server (GPL), Release 24, Revision e5c6e9d2 Thread pointer: 0x7f0df541e000 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 7f0e1a6fcad0 thread_stack 0x100000 /opt/percona_server/8.0.32/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x2153fed] /opt/percona_server/8.0.32/bin/mysqld(print_fatal_signal(int)+0x39f) [0x11f020f] /opt/percona_server/8.0.32/bin/mysqld(handle_fatal_signal+0xc5) [0x11f02e5] /lib64/libpthread.so.0(+0x12cf0) [0x7f0e35b01cf0] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (7f0df547e030): select udf_test('test') Connection ID (thread ID): 8 Status: NOT_KILLED
You get the same result if you remove an existing function file from the plugin directory, restart the instance, and then call the function. I've tested this with the udf_example function.
MySQL 5.7.40 does not show this behavior, when the function is called, it shows ERROR 1305, function does not exist.