MySQL Forums
Forum List  »  Stored Procedures

Re: Mysql 8.0 crash while calling stored proc
Posted by: Marek Kowalski
Date: April 09, 2021 01:22AM

Have the same problem


this works fine
---------------------------------------------------------------------------------

CREATE FUNCTION test() RETURNS INT DETERMINISTIC 
BEGIN
    RETURN 123;
END;

SELECT test();

---------------------------------------------------------------------------------


but this:
---------------------------------------------------------------------------------

CREATE FUNCTION test(par INT) RETURNS INT DETERMINISTIC 
BEGIN
   RETURN par;
END;

SELECT test(123);

---------------------------------------------------------------------------------

results with (form errorlog)
---------------------------------------------------------------------------------

Assertion failed: (m_sp == thd->sp_runtime_ctx->sp), function this_item_addr, file /usr/ports/databases/mysql80-server/work/mysql-8.0.23/sql/item.cc, line 1742.
09:15:33 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x88165d000
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...
[0x2300976] handle_fatal_signal+0x1c6
[0x8044aee00] _pthread_yield+0x1c6
[0x8044ae3cf] _pthread_yield+0x1c6
[0x7ffffffff193] +0x1c6
[0x804625f29] wmemset+0x1c6
[0x804553f81] wmemset+0x1c6
[0x1e4b1e7] Item_splocal::this_item_addr(THD*, Item**)+0x47
[0x204d353] sp_prepare_func_item(THD*, Item**)+0x33
[0x204d52a] sp_eval_expr(THD*, Field*, Item**)+0x6a
[0x205c3d1] sp_lex_instr::reset_lex_and_exec_core(THD*, unsigned int*, bool)+0x2d1
[0x205cd63] sp_lex_instr::validate_lex_and_execute_core(THD*, unsigned int*, bool)+0x1c3
[0x2055b7d] sp_head::execute(THD*, bool)+0x56d
[0x20567ec] sp_head::execute_function(THD*, Item**, unsigned int, Field*)+0x38c
[0x1da8f3d] Item_func_sp::execute_impl(THD*)+0xfd
[0x1da8d06] Item_func_sp::execute()+0x96
[0x1dbb6be] Item_func_sp::val_int()+0xe
[0x1e5998f] Item::send(Protocol*, String*)+0x6f
[0x20a9637] THD::send_result_set_row(mem_root_deque<Item*> const&)+0xe7
[0x202988e] Query_result_send::send_data(THD*, mem_root_deque<Item*> const&)+0x2e
[0x2262988] SELECT_LEX_UNIT::ExecuteIteratorQuery(THD*)+0x3b8
[0x2262c8f] SELECT_LEX_UNIT::execute(THD*)+0x2f
[0x21eaaf0] Sql_cmd_dml::execute_inner(THD*)+0x280
[0x21ea487] Sql_cmd_dml::execute(THD*)+0x527
[0x2189bd2] mysql_execute_command(THD*, bool)+0x1322
[0x218742b] dispatch_sql_command(THD*, Parser_state*)+0x42b
[0x2185eb8] dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1c68
[0x2186cb8] do_command(THD*)+0x1c8
[0x22e88c4] Per_thread_connection_handler::add_connection(Channel_info*)+0x444
[0x3408c50] pfs_spawn_thread_vc(unsigned int, my_thread_handle*, pthread_attr* const*, void* (*)(void*), void*)+0x280
[0x8044a582b] _pthread_yield+0x280
[0x0] +0x280
stack_bottom = 7fffda9e0f58 thread_stack 0x46000
0x301357e <_Z19my_print_stacktracePKhm+0x10e> at /usr/local/libexec/mysqld
0x2300976 <handle_fatal_signal+0x1c6> at /usr/local/libexec/mysqld
0x8044aee00 <_pthread_sigmask+0x530> at /lib/libthr.so.3

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (8816cc828): /* ApplicationName=PhpStorm 2020.3.3 */ SELECT test(11)
Connection ID (thread ID): 8
Status: NOT_KILLED

---------------------------------------------------------------------------------


some information:
---------------------------------------------------------------------------------
uname -a

FreeBSD dev.fb 13.0-RC4 FreeBSD 13.0-RC4 #0 releng/13.0-n244719-2e70fcbb154: Mon Mar 29 04:19:01 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64




pkg info mysql80-server

mysql80-server-8.0.23
Name           : mysql80-server
Version        : 8.0.23
Installed on   : Fri Apr  9 00:17:26 2021 CEST
Origin         : databases/mysql80-server
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : databases
Licenses       : GPLv2
Maintainer     : joneum@FreeBSD.org
WWW            : https://www.mysql.com/
Comment        : Multithreaded SQL database (server)
Options        :
        ARCHIVE        : off
        BLACKHOLE      : off
        EXAMPLE        : off
        FEDERATED      : off
        INNOBASE       : on
        PARTITION      : on
        PERFSCHEMA     : on
        PERFSCHM       : on
Shared Libs required:
        libicuio.so.68
        libevent_core-2.1.so.7
        libevent_extra-2.1.so.7
        libicudata.so.68
        libevent_pthreads-2.1.so.7
        libicuuc.so.68
        liblz4.so.1
        libunwind.so.8
        libprotobuf-lite.so.25
        libevent_openssl-2.1.so.7
        libprotobuf.so.25
        libicui18n.so.68
        libzstd.so.1
Shared Libs provided:
        libmysqlrouter_io_component.so.1
        libmysqlrouter_http_auth_backend.so.1
        libmysqlrouter.so.1
        libmysqlrouter_http_auth_realm.so.1
        libmysqlharness.so.1
        libmysqlrouter_http.so.1
        libmysqlharness_stdx.so.1
        libmysqlharness_tls.so.1
Annotations    :
        FreeBSD_version: 1300139
        cpe            : cpe:2.3:a:mysql:mysql:8.0.23:::::freebsd13:x64
Flat size      : 176MiB
Description    :
MySQL is a very fast, multi-threaded, multi-user and robust SQL
(Structured Query Language) database server.
The new features in MySQL 8.0. In addition to Data Dictionnary and CTEs are:
    Move to utf8(mb4) as MySQL's default character set
    Language specific case insensitive collation for 21 languages (utf8)
    Invisible index
    Descending indexes
    Improve usability of UUID and IPV6 manipulations
    SQL roles - SET PERSIST for global variable values
    Performance Schema, instrumenting data locks
    Performance Schema, instrumenting error messages
    Improved cost model with histograms


WWW: https://www.mysql.com/

---------------------------------------------------------------------------------

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Mysql 8.0 crash while calling stored proc
754
April 09, 2021 01:22AM


Sorry, you can't reply to this topic. It has been closed.

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.