Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39746

Segmentation fault with FULL JOIN

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • N/A
    • Optimizer
    • None
    • Can result in hang or crash
    • Q2/2026 Server Development

    Description

      Issue:
      ---------
      Signal 11 seen while testing MDEV-39014

      Version:

      ----------------
      Branch : 13.2-mdev-39014-full-join-p2
      commit :09d471f48ef09e8165eae7e29cb4c428b7482067
      Version : 13.0.1

      How to Repro:

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

      create table t1 (pk int);
      create table t2 (pk int);
      create table t3 (pk int);
      create table t4 (pk int);
      create table t5 (pk int);
       
      SELECT
          t1.pk
      FROM t1
          FULL JOIN t2
          FULL OUTER JOIN t3
              ON (1)
          FULL JOIN t4
              ON t3.pk = t4.pk
          LEFT JOIN t5
              ON t2.pk = t5.`pk`
              ON t1.`pk` = t4.pk;
      

      Stack trace:

      #0  __pthread_kill_implementation (no_tid=0, signo=11, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=11, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=11) at ./nptl/pthread_kill.c:89
      #3  my_write_core (sig=11) at /home/ppandith/wl-39014/mysys/stacktrace.c:424
      #4  handle_fatal_signal (sig=11) at /home/ppandith/wl-39014/sql/signal_handler.cc:298
      #5  <signal handler called>
      #6  add_found_match_trig_cond (thd=, tab=, cond=, root_tab=) at /home/ppandith/wl-39014/sql/sql_select.cc:14318
      #7  add_found_match_trig_cond (thd=, tab=, cond=, root_tab=) at /home/ppandith/wl-39014/sql/sql_select.cc:14318
      #8  make_join_select (join=, select=, cond=) at /home/ppandith/wl-39014/sql/sql_select.cc:15412
      #9  JOIN::optimize_stage2 (this=) at /home/ppandith/wl-39014/sql/sql_select.cc:3201
      #10 JOIN::optimize_inner (this=) at /home/ppandith/wl-39014/sql/sql_select.cc:2921
      #11 JOIN::optimize (this=) at /home/ppandith/wl-39014/sql/sql_select.cc:2145
      #12 mysql_select (thd=, tables=, fields=..., conds=, og_num=0, order=, group=, having=, proc_param=, select_options=2164525824, 
          result=, unit=, select_lex=) at /home/ppandith/wl-39014/sql/sql_select.cc:5557
      #13 handle_select (thd=, lex=, result=, setup_tables_done_option=0) at /home/ppandith/wl-39014/sql/sql_select.cc:765
      #14 execute_sqlcom_select (thd=, all_tables=) at /home/ppandith/wl-39014/sql/sql_parse.cc:6214
      #15 mysql_execute_command (thd=, is_called_from_prepared_stmt=false) at /home/ppandith/wl-39014/sql/sql_parse.cc:3988
      #16 mysql_parse (thd=, 
          rawbuf="SELECT t1.pk FROM t1 FULL JOIN t2 FULL OUTER JOIN t3 ON (1) FULL JOIN t4 ON t3.pk = t4.pk LEFT JOIN t5 ON t2.pk = t5.`pk` ON t1.`pk` = t4.pk", length=140, parser_state=) at /home/ppandith/wl-39014/sql/sql_parse.cc:7942
      #17 dispatch_command (command=COM_QUERY, thd=, 
          packet="SELECT t1.pk FROM t1 FULL JOIN t2 FULL OUTER JOIN t3 ON (1) FULL JOIN t4 ON t3.pk = t4.pk LEFT JOIN t5 ON t2.pk = t5.`pk` ON t1.`pk` = t4.pk", packet_length=140, blocking=true) at /home/ppandith/wl-39014/sql/sql_parse.cc:1898
      #18 do_command (thd=, blocking=true) at /home/ppandith/wl-39014/sql/sql_parse.cc:1432
      #19 do_handle_one_connection (connect=, put_in_cache=true) at /home/ppandith/wl-39014/sql/sql_connect.cc:1503
      #20 handle_one_connection (arg=) at /home/ppandith/wl-39014/sql/sql_connect.cc:1415
      #21 pfs_spawn_thread (arg=) at /home/ppandith/wl-39014/storage/perfschema/pfs.cc:2198
      #22 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #23 clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              Gosselin Dave Gosselin
              mariadb-pavithrapandith Pavithra Pandith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 4.75h
                  4.75h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.