[From nobody Sat Jun  6 09:51:09 2026
Received: (at submit) by bugs.debian.org; 10 Aug 2025 00:30:47 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-18.9 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,FOURLA,HAS_PACKAGE,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
 RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT,
 XMAILER_REPORTBUG autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 148; hammy, 150; neutral, 246; spammy,
 0. spammytokens: hammytokens:0.000-+--sk:taint_o,
 0.000-+--sk:TAINT_O, 
 0.000-+--sk:taint_u, 0.000-+--sk:TAINT_U, 0.000-+--H*x:12.0.0
Return-path: &lt;debian-reportbug@plan9.de&gt;
Received: from mail.nethype.de ([5.9.56.24]:51155)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;debian-reportbug@plan9.de&gt;)
 id 1uktxX-000u7u-0J for submit@bugs.debian.org;
 Sun, 10 Aug 2025 00:30:47 +0000
Received: from [10.0.0.5] (helo=doom.schmorp.de)
 by mail.nethype.de with esmtp (Exim 4.96)
 (envelope-from &lt;debian-reportbug@plan9.de&gt;) id 1uktiq-001pNj-2u
 for submit@bugs.debian.org; Sun, 10 Aug 2025 00:15:36 +0000
Received: from [10.0.0.1] (helo=cerebro.laendle)
 by doom.schmorp.de with esmtp (Exim 4.96)
 (envelope-from &lt;debian-reportbug@plan9.de&gt;) id 1uktiq-008t1g-2S;
 Sun, 10 Aug 2025 00:15:36 +0000
Received: from root by cerebro.laendle with local (Exim 4.96)
 (envelope-from &lt;debian-reportbug@plan9.de&gt;) id 1uktip-000DFO-2J;
 Sun, 10 Aug 2025 02:15:35 +0200
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Marc Lehmann &lt;debian-reportbug@plan9.de&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: mariadb-plugin-mroonga: incorrect mroonga comment hangs mariadb,
 unable to restart, corrupts database
Message-ID: &lt;175478493570.50643.541290666751066899.reportbug@cerebro.laendle&gt;
X-Mailer: reportbug 12.0.0
Date: Sun, 10 Aug 2025 02:15:35 +0200
X-Greylist: delayed 905 seconds by postgrey-1.37 at buxtehude;
 Sun, 10 Aug 2025 00:30:46 UTC
Delivered-To: submit@bugs.debian.org

Package: mariadb-plugin-mroonga
Version: 10.11.11
Severity: normal

Dear Maintainer,

I tried to execute the following (incorrect) create table statement with mroonga installed:

   CREATE TABLE torrent (
      hash BINARY(20) PRIMARY KEY,
      mtime INT UNSIGNED NOT NULL,
      stime INT UNSIGNED NOT NULL,
      flags INT UNSIGNED NOT NULL,
      name TEXT NOT NULL,
      size BIGINT UNSIGNED NOT NULL,
      fcount INT NOT NULL,
      fnames LONGTEXT NOT NULL,
      FULLTEXT INDEX (name) COMMENT 'tokenizer &quot;TokenBigramSplitSymbolAlphaDigit&quot;, flags &quot;COMPRESS_ZSTD&quot;',
      FULLTEXT INDEX (fnames) COMMENT 'tokenizer &quot;TokenBigramSplitSymbolAlphaDigit&quot;, flags &quot;COMPRESS_ZSTD&quot;'
   ) Engine=Mroonga DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

This caused the server to hang. kill'ing the command had no effect,
systemctl restart mariadbd also had no effect (other than hanging).

kill -9 mariadbd did manage to restart mariadb, but the database was
corrupted: show tables did not show the newly created table, but
re-running the create command immediately failed because the groonga
database already existed.

using gdb on the hanging server showed it apparently being stuck in an
endless loop, likely because the comment parser does not recover properly
from errors.

(gdb) bt
#0  0x000055d9535d5d15 in push_warning_printf (thd=thd@entry=0x7ff688000c68, 
    level=level@entry=Sql_state_errno_level::WARN_LEVEL_WARN, code=code@entry=16508, 
    format=format@entry=0x7ff6a59a2b98 &quot;The index flag '%-.64s' is invalid. It is ignored&quot;) at ./sql/sql_error.cc:788
#1  0x00007ff6a56abef8 in mrn_parse_grn_index_column_flags (thd=&lt;optimized out&gt;, 
    flag_names=flag_names@entry=0x7ff689dc1468 &quot;COMPRESS_LZ4&quot;, flag_names_length=flag_names_length@entry=12, 
    index_column_flags=index_column_flags@entry=0x7ff6ac15b5f8, ctx=&lt;optimized out&gt;)
    at ./storage/mroonga/ha_mroonga.cpp:1682
#2  0x00007ff6a56b5256 in ha_mroonga::find_index_column_flags (this=this@entry=0x7ff688380a48, 
    key=key@entry=0x7ff688352f98, index_column_flags=index_column_flags@entry=0x7ff6ac15b5f8)
    at ./storage/mroonga/ha_mroonga.cpp:9730
#3  0x00007ff6a56b732a in ha_mroonga::storage_create_index (this=this@entry=0x7ff688380a48, 
    table=table@entry=0x7ff6ac162930, grn_table_name=grn_table_name@entry=0x7ff6ac15f798 &quot;torrent&quot;, 
    grn_table=grn_table@entry=0x7ff689a5a750, tmp_share=tmp_share@entry=0x7ff6883a1598, key_info=0x7ff688352f98, 
    index_tables=&lt;optimized out&gt;, index_columns=&lt;optimized out&gt;, i=&lt;optimized out&gt;)
    at ./storage/mroonga/ha_mroonga.cpp:4049
#4  0x00007ff6a56b77ce in ha_mroonga::storage_create_indexes (this=this@entry=0x7ff688380a48, 
    table=table@entry=0x7ff6ac162930, grn_table_name=&lt;optimized out&gt;, grn_table=grn_table@entry=0x7ff689a5a750, 
    tmp_share=tmp_share@entry=0x7ff6883a1598) at ./storage/mroonga/ha_mroonga.cpp:4149
#5  0x00007ff6a56b7bfd in ha_mroonga::storage_create (this=this@entry=0x7ff688380a48, 
    name=name@entry=0x7ff6ac163cf0 &quot;./dhtcrawler/torrent&quot;, table=table@entry=0x7ff6ac162930, 
    info=info@entry=0x7ff6ac164390, tmp_share=tmp_share@entry=0x7ff6883a1598) at ./storage/mroonga/ha_mroonga.cpp:3585
#6  0x00007ff6a56b7f79 in ha_mroonga::create (this=0x7ff688380a48, name=0x7ff6ac163cf0 &quot;./dhtcrawler/torrent&quot;, 
    table=0x7ff6ac162930, info=0x7ff6ac164390) at ./storage/mroonga/ha_mroonga.cpp:4247
#7  0x000055d953884b3b in handler::ha_create (this=0x7ff688380a48, name=0x7ff6ac163cf0 &quot;./dhtcrawler/torrent&quot;, 
    form=0x7ff6ac162930, info_arg=0x7ff6ac164390) at ./sql/handler.cc:5598
#8  0x000055d9538853f2 in ha_create_table (thd=thd@entry=0x7ff688000c68, path=&lt;optimized out&gt;, db=&lt;optimized out&gt;, 
    table_name=&lt;optimized out&gt;, create_info=create_info@entry=0x7ff6ac164390, frm=frm@entry=0x7ff6ac163ce0, 
    skip_frm_file=&lt;optimized out&gt;) at ./sql/handler.cc:6068
#9  0x000055d9536d8b3e in create_table_impl (thd=thd@entry=0x7ff688000c68, 
    ddl_log_state_create=ddl_log_state_create@entry=0x7ff6ac164010, ddl_log_state_rm=&lt;optimized out&gt;, 
    ddl_log_state_rm@entry=0x7ff6ac164220, orig_db=..., orig_table_name=..., db=..., table_name=..., path=..., 
    options=..., create_info=&lt;optimized out&gt;, alter_info=&lt;optimized out&gt;, create_table_mode=&lt;optimized out&gt;, 
    is_trans=&lt;optimized out&gt;, key_info=&lt;optimized out&gt;, key_count=&lt;optimized out&gt;, frm=&lt;optimized out&gt;)
    at ./sql/sql_table.cc:4811
#10 0x000055d9536d91cc in mysql_create_table_no_lock (thd=thd@entry=0x7ff688000c68, 
    ddl_log_state_create=ddl_log_state_create@entry=0x7ff6ac164010, 
    ddl_log_state_rm=ddl_log_state_rm@entry=0x7ff6ac164220, create_info=create_info@entry=0x7ff6ac164390, 
    alter_info=alter_info@entry=0x7ff6ac1640b0, is_trans=is_trans@entry=0x7ff6ac163fd0, 
    create_table_mode=&lt;optimized out&gt;, table_list=&lt;optimized out&gt;) at ./sql/sql_table.cc:4913
#11 0x000055d9536e372b in mysql_create_table (alter_info=0x7ff6ac1640b0, create_info=0x7ff6ac164390, 
    create_table=0x7ff6880138a8, thd=0x7ff688000c68) at ./sql/sql_table.cc:5139
#12 Sql_cmd_create_table_like::execute (this=&lt;optimized out&gt;, thd=0x7ff688000c68) at ./sql/sql_table.cc:13019
#13 0x000055d953619476 in mysql_execute_command (thd=thd@entry=0x7ff688000c68, 
    is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at ./sql/sql_parse.cc:6167
#14 0x000055d95361e416 in mysql_parse (thd=0x7ff688000c68, rawbuf=&lt;optimized out&gt;, length=&lt;optimized out&gt;, 
    parser_state=&lt;optimized out&gt;) at ./sql/sql_parse.cc:8188
#15 0x000055d953620a95 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7ff688000c68, 
    packet=packet@entry=0x7ff688008759 &quot;CREATE TABLE torrent (    hash BINARY(20) PRIMARY KEY,    mtime INT UNSIGNED NOT NULL,    stime INT UNSIGNED NOT NULL,    flags INT UNSIGNED NOT NULL,    name TEXT NOT NULL,    size BIGINT UNSIGNED NO&quot;..., packet_length=packet_length@entry=536, blocking=blocking@entry=true) at ./sql/sql_parse.cc:2004
#16 0x000055d953622a4f in do_command (thd=thd@entry=0x7ff688000c68, blocking=blocking@entry=true)
    at ./sql/sql_parse.cc:1418
#17 0x000055d95374aa35 in do_handle_one_connection (connect=&lt;optimized out&gt;, connect@entry=0x55d96d19f8d8, 
    put_in_cache=put_in_cache@entry=true) at ./sql/sql_connect.cc:1386
#18 0x000055d95374ad8d in handle_one_connection (arg=arg@entry=0x55d96d19f8d8) at ./sql/sql_connect.cc:1298

-- System Information:
Debian Release: 12.8
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 'stable'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'oldstable-debug'), (500, 'unstable'), (500, 'testing'), (100, 'bookworm-fasttrack'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, x32

Kernel: Linux 6.1.0-28-amd64 (SMP w/28 CPU threads; PREEMPT)
Kernel taint flags: TAINT_USER, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mariadb-plugin-mroonga depends on:
ii  libc6                2.36-9+deb12u9
ii  libgcc-s1            14-20240201-3
ii  libstdc++6           12.2.0-14+deb12u1
ii  mariadb-server       1:10.11.6-0+deb12u1
ii  mariadb-server-core  1:10.11.6-0+deb12u1
ii  zlib1g               1:1.2.13.dfsg-1

mariadb-plugin-mroonga recommends no packages.

mariadb-plugin-mroonga suggests no packages.
]