ERROR 1123 (HY000): Can't initialize function 'mroonga_snippet_html'; mroonga_snippet_html(): failed to add a condition to grn_snip: <>
Though they are likely correct given the non-sensical input.
Roel Van de Paar
added a comment - Hi kou !
I tested https://github.com/MariaDB/server/pull/3329 and in all instances/for all testcases above I now see:
10.5-mroonga-udf-initialized-check github.com/kou/server.git 10.5.26 ed9fa5c22266bb7dbc39870825694d880b4ad953 (Debug, UBASAN)
10.5.26-dbg>CREATE FUNCTION mroonga_normalize RETURNS STRING SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.044 sec)
10.5.26-dbg>SELECT mroonga_normalize('a');
ERROR 1123 (HY000): Can't initialize function 'mroonga_normalize'; mroonga_normalize(): Mroonga isn't initialized
Which would look to be correct.
And, when loading the plugin, operation also seems normal:
10.5-mroonga-udf-initialized-check github.com/kou/server.git 10.5.26 ed9fa5c22266bb7dbc39870825694d880b4ad953 (Debug, UBASAN)
10.5.26-dbg>INSTALL PLUGIN mroonga SONAME 'ha_mroonga';
Query OK, 0 rows affected (0.077 sec)
10.5.26-dbg>CREATE FUNCTION mroonga_command RETURNS STRING SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.003 sec)
10.5.26-dbg>SELECT mroonga_command ('dump -- dump_plugins no -- dump_schema no');
+---------------------------------------------------------------+
| mroonga_command ('dump -- dump_plugins no -- dump_schema no') |
+---------------------------------------------------------------+
| NULL |
+---------------------------------------------------------------+
1 row in set (0.051 sec)
And no UBSAN error was seen, nor any crash in a debug build.
Perhaps of some interest are these outputs (after loading the plugin):
10.5-mroonga-udf-initialized-check github.com/kou/server.git 10.5.26 ed9fa5c22266bb7dbc39870825694d880b4ad953 (Debug, UBASAN)
10.5.26-dbg>SELECT mroonga_snippet ('',0,0,'',0,0,'','','','',''); # UBSAN, or
ERROR 1123 (HY000): Can't initialize function 'mroonga_snippet'; Unknown charset: <>
10.5.26-dbg>SELECT mroonga_snippet ('',0,0, 0,0,0,'','','','',''); # UBSAN + SIGSEGV
ERROR 1123 (HY000): Can't initialize function 'mroonga_snippet'; Unknown charset ID: <0>
10.5-mroonga-udf-initialized-check github.com/kou/server.git 10.5.26 ed9fa5c22266bb7dbc39870825694d880b4ad953 (Debug, UBASAN)
10.5.26-dbg>CREATE FUNCTION mroonga_snippet_html RETURNS STRING SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.002 sec)
10.5.26-dbg>SELECT mroonga_snippet_html('a','','');
ERROR 1123 (HY000): Can't initialize function 'mroonga_snippet_html'; mroonga_snippet_html(): failed to add a condition to grn_snip: <>
Though they are likely correct given the non-sensical input.
> Perhaps of some interest are these outputs (after loading the plugin):
How about opening a new issue for the former? (It seems that error handling may be incorrect.)
The latter is an expected error.
Kouhei Sutou
added a comment - Thanks for confirming the patch!
> Perhaps of some interest are these outputs (after loading the plugin):
How about opening a new issue for the former? (It seems that error handling may be incorrect.)
The latter is an expected error.
TheLinuxJedi The patch has already proved itself in testing. As soon as your review is done, this can be pushed. Thank you!
Roel Van de Paar
added a comment - TheLinuxJedi The patch has already proved itself in testing. As soon as your review is done, this can be pushed. Thank you!
> How about opening a new issue for the former? (It seems that error handling may be incorrect.)
Thank you for confirming! Created as: MDEV-34415 Mroonga: mroonga_snippet: Unknown charset ID: <0> / <>
Roel Van de Paar
added a comment - > How about opening a new issue for the former? (It seems that error handling may be incorrect.)
Thank you for confirming! Created as: MDEV-34415 Mroonga: mroonga_snippet: Unknown charset ID: <0> / <>
People
Andrew Hutchings (Inactive)
Ian Gilfillan
Votes:
0Vote for this issue
Watchers:
8Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":866.2000002861023,"ttfb":243.2000002861023,"pageVisibility":"visible","entityId":80740,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"e4319d38-6aea-42b8-a363-3563eb6aecb2","navigationType":0,"readyForUser":985.8000001907349,"redirectCount":0,"resourceLoadedEnd":554.5,"resourceLoadedStart":251,"resourceTiming":[{"duration":5.700000286102295,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":251,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":251,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":256.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":5.900000095367432,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":251.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":251.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":257.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":171.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":251.60000038146973,"connectEnd":251.60000038146973,"connectStart":251.60000038146973,"domainLookupEnd":251.60000038146973,"domainLookupStart":251.60000038146973,"fetchStart":251.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":259.90000009536743,"responseEnd":422.80000019073486,"responseStart":271.80000019073486,"secureConnectionStart":251.60000038146973},{"duration":302.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":251.80000019073486,"connectEnd":251.80000019073486,"connectStart":251.80000019073486,"domainLookupEnd":251.80000019073486,"domainLookupStart":251.80000019073486,"fetchStart":251.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":260.5,"responseEnd":554.5,"responseStart":280.1000003814697,"secureConnectionStart":251.80000019073486},{"duration":27,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":251.90000009536743,"connectEnd":251.90000009536743,"connectStart":251.90000009536743,"domainLookupEnd":251.90000009536743,"domainLookupStart":251.90000009536743,"fetchStart":251.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":261.7000002861023,"responseEnd":278.90000009536743,"responseStart":277.6000003814697,"secureConnectionStart":251.90000009536743},{"duration":34.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":252.10000038146973,"connectEnd":252.10000038146973,"connectStart":252.10000038146973,"domainLookupEnd":252.10000038146973,"domainLookupStart":252.10000038146973,"fetchStart":252.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":263,"responseEnd":286.7000002861023,"responseStart":281.80000019073486,"secureConnectionStart":252.10000038146973},{"duration":39.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":252.30000019073486,"connectEnd":252.30000019073486,"connectStart":252.30000019073486,"domainLookupEnd":252.30000019073486,"domainLookupStart":252.30000019073486,"fetchStart":252.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":263.80000019073486,"responseEnd":291.90000009536743,"responseStart":287.2000002861023,"secureConnectionStart":252.30000019073486},{"duration":10.800000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":252.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":263.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":39.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":252.60000038146973,"connectEnd":252.60000038146973,"connectStart":252.60000038146973,"domainLookupEnd":252.60000038146973,"domainLookupStart":252.60000038146973,"fetchStart":252.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":265.7000002861023,"responseEnd":292.2000002861023,"responseStart":288.5,"secureConnectionStart":252.60000038146973},{"duration":12.300000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":252.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":265.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":41.200000286102295,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":253,"connectEnd":253,"connectStart":253,"domainLookupEnd":253,"domainLookupStart":253,"fetchStart":253,"redirectEnd":0,"redirectStart":0,"requestStart":268.2000002861023,"responseEnd":294.2000002861023,"responseStart":290.5,"secureConnectionStart":253},{"duration":2.5999999046325684,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":275.40000009536743,"connectEnd":275.40000009536743,"connectStart":275.40000009536743,"domainLookupEnd":275.40000009536743,"domainLookupStart":275.40000009536743,"fetchStart":275.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":275.40000009536743,"responseEnd":278,"responseStart":278,"secureConnectionStart":275.40000009536743},{"duration":17.300000190734863,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":293.90000009536743,"connectEnd":293.90000009536743,"connectStart":293.90000009536743,"domainLookupEnd":293.90000009536743,"domainLookupStart":293.90000009536743,"fetchStart":293.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":293.90000009536743,"responseEnd":311.2000002861023,"responseStart":311.2000002861023,"secureConnectionStart":293.90000009536743},{"duration":51.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":570.1000003814697,"connectEnd":570.1000003814697,"connectStart":570.1000003814697,"domainLookupEnd":570.1000003814697,"domainLookupStart":570.1000003814697,"fetchStart":570.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":584.7000002861023,"responseEnd":621.2000002861023,"responseStart":620.5,"secureConnectionStart":570.1000003814697},{"duration":219.7999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":778.7000002861023,"connectEnd":778.7000002861023,"connectStart":778.7000002861023,"domainLookupEnd":778.7000002861023,"domainLookupStart":778.7000002861023,"fetchStart":778.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":964,"responseEnd":998.5,"responseStart":997.9000000953674,"secureConnectionStart":778.7000002861023}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":69,"responseStart":244,"responseEnd":294,"domLoading":247,"domInteractive":1082,"domContentLoadedEventStart":1082,"domContentLoadedEventEnd":1144,"domComplete":1550,"loadEventStart":1550,"loadEventEnd":1550,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1046.5},{"name":"bigPipe.sidebar-id.end","time":1047.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1047.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1050},{"name":"activityTabFullyLoaded","time":1162.2000002861023}],"measures":[],"correlationId":"13f53c94b2d6e5","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Did you try it with https://github.com/MariaDB/server/pull/3329 ?