Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(stream): mv-on-mv: vnode 98 should not be accessed by this table #8355

Closed
kwannoel opened this issue Mar 6, 2023 · 7 comments
Closed
Assignees
Labels
found-by-sqlsmith type/bug Something isn't working
Milestone

Comments

@kwannoel
Copy link
Contributor

kwannoel commented Mar 6, 2023

Describe the bug

thread '<unnamed>' panicked at 'vnode 98 should not be accessed by this table', src/storage/src/table/mod.rs:152:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `MADSIM_TEST_SEED=34` environment variable to reproduce this error

To Reproduce

CREATE TABLE supplier (s_suppkey INT, s_name CHARACTER VARYING, s_address CHARACTER VARYING, s_nationkey INT, s_phone CHARACTER VARYING, s_acctbal NUMERIC, s_comment CHARACTER VARYING, PRIMARY KEY (s_suppkey));
CREATE TABLE part (p_partkey INT, p_name CHARACTER VARYING, p_mfgr CHARACTER VARYING, p_brand CHARACTER VARYING, p_type CHARACTER VARYING, p_size INT, p_container CHARACTER VARYING, p_retailprice NUMERIC, p_comment CHARACTER VARYING, PRIMARY KEY (p_partkey));
CREATE TABLE partsupp (ps_partkey INT, ps_suppkey INT, ps_availqty INT, ps_supplycost NUMERIC, ps_comment CHARACTER VARYING, PRIMARY KEY (ps_partkey, ps_suppkey));
CREATE TABLE customer (c_custkey INT, c_name CHARACTER VARYING, c_address CHARACTER VARYING, c_nationkey INT, c_phone CHARACTER VARYING, c_acctbal NUMERIC, c_mktsegment CHARACTER VARYING, c_comment CHARACTER VARYING, PRIMARY KEY (c_custkey));
CREATE TABLE orders (o_orderkey BIGINT, o_custkey INT, o_orderstatus CHARACTER VARYING, o_totalprice NUMERIC, o_orderdate DATE, o_orderpriority CHARACTER VARYING, o_clerk CHARACTER VARYING, o_shippriority INT, o_comment CHARACTER VARYING, PRIMARY KEY (o_orderkey));
CREATE TABLE lineitem (l_orderkey BIGINT, l_partkey INT, l_suppkey INT, l_linenumber INT, l_quantity NUMERIC, l_extendedprice NUMERIC, l_discount NUMERIC, l_tax NUMERIC, l_returnflag CHARACTER VARYING, l_linestatus CHARACTER VARYING, l_shipdate DATE, l_commitdate DATE, l_receiptdate DATE, l_shipinstruct CHARACTER VARYING, l_shipmode CHARACTER VARYING, l_comment CHARACTER VARYING, PRIMARY KEY (l_orderkey, l_linenumber));
CREATE TABLE nation (n_nationkey INT, n_name CHARACTER VARYING, n_regionkey INT, n_comment CHARACTER VARYING, PRIMARY KEY (n_nationkey));
CREATE TABLE region (r_regionkey INT, r_name CHARACTER VARYING, r_comment CHARACTER VARYING, PRIMARY KEY (r_regionkey));
CREATE TABLE person (id BIGINT, name CHARACTER VARYING, email_address CHARACTER VARYING, credit_card CHARACTER VARYING, city CHARACTER VARYING, state CHARACTER VARYING, date_time TIMESTAMP, extra CHARACTER VARYING, PRIMARY KEY (id));
CREATE TABLE auction (id BIGINT, item_name CHARACTER VARYING, description CHARACTER VARYING, initial_bid BIGINT, reserve BIGINT, date_time TIMESTAMP, expires TIMESTAMP, seller BIGINT, category BIGINT, extra CHARACTER VARYING, PRIMARY KEY (id));
CREATE TABLE bid (auction BIGINT, bidder BIGINT, price BIGINT, channel CHARACTER VARYING, url CHARACTER VARYING, date_time TIMESTAMP, extra CHARACTER VARYING);
CREATE TABLE alltypes1 (c1 BOOLEAN, c2 SMALLINT, c3 INT, c4 BIGINT, c5 REAL, c6 DOUBLE, c7 NUMERIC, c8 DATE, c9 CHARACTER VARYING, c10 TIME, c11 TIMESTAMP, c13 INTERVAL, c14 STRUCT<a INT>, c15 INT[], c16 CHARACTER VARYING[]);
CREATE TABLE alltypes2 (c1 BOOLEAN, c2 SMALLINT, c3 INT, c4 BIGINT, c5 REAL, c6 DOUBLE, c7 NUMERIC, c8 DATE, c9 CHARACTER VARYING, c10 TIME, c11 TIMESTAMP, c13 INTERVAL, c14 STRUCT<a INT>, c15 INT[], c16 CHARACTER VARYING[]);
CREATE MATERIALIZED VIEW m0 AS WITH with_0 AS (SELECT true AS col_0, ARRAY[(INT '750'), (INT '771'), (INT '571'), (INT '346')] AS col_1 FROM partsupp AS t_1 GROUP BY t_1.ps_suppkey HAVING true) SELECT (220) AS col_0, TIME '15:32:59' AS col_1, DATE '2022-09-30' AS col_2, (BIGINT '9223372036854775807') AS col_3 FROM with_0 WHERE true;
CREATE MATERIALIZED VIEW m1 AS WITH with_0 AS (SELECT min((- tumble_1.c5)) AS col_0, tumble_1.c5 AS col_1 FROM tumble(alltypes1, alltypes1.c11, INTERVAL '71') AS tumble_1 WHERE tumble_1.c1 GROUP BY tumble_1.c6, tumble_1.c1, tumble_1.c5, tumble_1.c15) SELECT TIME '18:49:13' AS col_0, (char_length(('sX8iENeHb6'))) AS col_1, 'HtIW1SFdVm' AS col_2 FROM with_0 WHERE false;
CREATE MATERIALIZED VIEW m2 AS WITH with_0 AS (SELECT t_2.col_2 AS col_0 FROM m1 AS t_1 RIGHT JOIN m1 AS t_2 ON t_1.col_2 = t_2.col_2 WHERE ((FLOAT '1') >= (REAL '242')) GROUP BY t_1.col_2, t_2.col_2, t_2.col_0 HAVING true) SELECT (SMALLINT '175') AS col_0, ((INTERVAL '-390954') * (1885851601)) AS col_1, (min(TIME '18:49:16') + (INTERVAL '-86400')) AS col_2, TIME '18:49:16' AS col_3 FROM with_0 WHERE ((SMALLINT '1') >= (SMALLINT '361'));
CREATE MATERIALIZED VIEW m3 AS SELECT sq_1.col_0 AS col_0 FROM (SELECT (TRIM(tumble_0.channel)) AS col_0, tumble_0.price AS col_1 FROM tumble(bid, bid.date_time, INTERVAL '51') AS tumble_0 WHERE false GROUP BY tumble_0.price, tumble_0.channel, tumble_0.date_time, tumble_0.bidder HAVING true) AS sq_1 WHERE (true) GROUP BY sq_1.col_0 HAVING ((REAL '-1010236406') < (FLOAT '837'));
CREATE MATERIALIZED VIEW m4 AS SELECT (CAST(NULL AS STRUCT<a INT, b CHARACTER VARYING, c REAL>)) AS col_0 FROM m1 AS t_0 JOIN orders AS t_1 ON t_0.col_2 = t_1.o_orderpriority GROUP BY t_1.o_custkey, t_0.col_2, t_1.o_orderpriority;
CREATE MATERIALIZED VIEW m5 AS SELECT hop_0.c11 AS col_0, hop_0.c11 AS col_1, hop_0.c3 AS col_2 FROM hop(alltypes2, alltypes2.c11, INTERVAL '60', INTERVAL '5700') AS hop_0 WHERE hop_0.c1 GROUP BY hop_0.c11, hop_0.c3 HAVING ((position('fHXs0UvtZu', 'R2VlpUONdm')) < hop_0.c3);
CREATE MATERIALIZED VIEW m6 AS SELECT (TRIM(('aYiAk2XB1o'))) AS col_0, (t_2.n_nationkey # t_2.n_nationkey) AS col_1, TIME '18:49:24' AS col_2, t_2.n_nationkey AS col_3 FROM nation AS t_2 GROUP BY t_2.n_nationkey, t_2.n_regionkey HAVING false;
CREATE MATERIALIZED VIEW m7 AS SELECT tumble_0.c1 AS col_0, (BIGINT '955') AS col_1 FROM tumble(alltypes2, alltypes2.c11, INTERVAL '47') AS tumble_0 WHERE tumble_0.c1 GROUP BY tumble_0.c1, tumble_0.c4, tumble_0.c13 HAVING (TIMESTAMP '2022-09-30 18:49:25') NOT IN (SELECT (TIMESTAMP '2022-09-23 18:49:25') AS col_0 FROM partsupp AS t_1 JOIN m0 AS t_2 ON t_1.ps_supplycost = t_2.col_0 WHERE ((FLOAT '0') IS NULL) GROUP BY t_2.col_3, t_1.ps_comment, t_1.ps_availqty);
CREATE MATERIALIZED VIEW m8 AS SELECT (concat_ws(t_0.channel, 'RqP0bOqbPK', t_0.channel, 'lXFzC38ieN')) AS col_0 FROM bid AS t_0 FULL JOIN m3 AS t_1 ON t_0.extra = t_1.col_0 GROUP BY t_0.bidder, t_0.channel, t_0.url, t_0.auction HAVING ((coalesce(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, (INT '751'))) >= (FLOAT '466'));
CREATE MATERIALIZED VIEW m9 AS WITH with_0 AS (SELECT (count((SMALLINT '936')) & hop_1.bidder) AS col_0, hop_1.bidder AS col_1, TIMESTAMP '2022-09-29 18:49:30' AS col_2, hop_1.date_time AS col_3 FROM hop(bid, bid.date_time, INTERVAL '3600', INTERVAL '356400') AS hop_1 GROUP BY hop_1.bidder, hop_1.date_time, hop_1.url, hop_1.price) SELECT (SMALLINT '9019') AS col_0, ((FLOAT '0') + (REAL '585')) AS col_1, (TIME '18:49:30' + ((INTERVAL '-60') / (INT '2147483647'))) AS col_2, ((REAL '460') + (REAL '194')) AS col_3 FROM with_0 WHERE true; 
SET RW_IMPLICIT_FLUSH TO TRUE;;
SET QUERY_MODE TO DISTRIBUTED;; 
INSERT INTO supplier VALUES ((INT '653'), '7GBrK8dOvd', 'XYTp6wCBov', (INT '-2147483648'), '4jweFXI368', (-2147483648), '2nKBdDT05C'), ((INT '1'), '9v8qKRbBqY', 'G5QwxUA01d', (INT '491'), 'HPCdmKVFij', (902), 'BGa9iP9pcj'), ((INT '174'), 'A2UjQ3O7fI', 'E9Z2Mbu7kJ', (INT '147715130'), 'Tx6Hozw1mg', (-1240855061), 'AsnUqqsleX'), ((INT '1'), 'KI6kGXrcdl', 'ixEBN2eTol', (INT '522'), 'qSryO49k9i', (121), 's2Q6IQ1D6f'), ((INT '212'), '4Nir4fIS4F', 'jf9CGPHXMM', (INT '0'), 'nXpGNmuPtC', (957), 'fW7G9y9hjb'), ((INT '618'), '1TuDLboFq9', 'KRgai0gkTH', (INT '149'), 'IScqWUG1zT', (894), 'f3o6IV02u2'), ((INT '461'), 'dJRNaLahZa', 'WaLFMcQuAi', (INT '614'), 'liM34C9HNE', (496), '7OdQNaigCv'), ((INT '-2147483648'), 'kIhC6y6tbr', 'sElkpFQiSt', (INT '567'), 'Ix7DH9s0RT', (771), 'i8YRZr16Vs'), ((INT '1674524779'), 'lkiZXYu1aV', 'SKW3psR1lV', (INT '0'), 'Z0OHU05gMu', (429), 'GEqM9KYHtO'), ((INT '43'), 'WvoxFTjyVb', 'fcfn0iiTNw', (INT '74'), 'sPVPDqe2V1', (338), 'H9WhmE0Tac');
INSERT INTO part VALUES ((INT '757334862'), 'sL8KXL4B7S', 'FyXTXc2e2b', 'vYGhRXHfgW', '1RQ2MmXBRp', (INT '31'), 'NmbUL4wPYF', (1751681676), 'XZ6iiVQT76'), ((INT '-2147483648'), 'F9lcvbqqoZ', 'zWILitAeEx', '8jiWx6Iact', 'lrvQwzPces', (INT '-669913791'), 'mu9Gu7yXea', (-869715650), 'U2UpY2a9CG'), ((INT '618'), 'x8DmkMfSoe', 'Yj0SEfq6Pw', 'hRc6Qvlsal', '9ARP6X9OnG', (INT '258'), '8JQa8HOmag', (31), 'EuRDPi96OW'), ((INT '979471092'), '7MXOJgpAGD', 'vBIas6SPVk', 'TMeB19aCFA', 'xJCFhdtr0P', (INT '-911067757'), 'kVdAM26WkP', (270), 'z8UbfvPDVP'), ((INT '387'), 'PLo7kY4P1X', 'IarFuAoU3n', 'MFZ6aORP7H', '70qyVp2UbP', (INT '492'), '2ZNy0Rbkdk', (817), 'kvk5LX84PX'), ((INT '489'), 'RJFuNExqgr', 'eP9IXDgSPi', 'Jawc75u5ps', 'nHtZMS9Tfk', (INT '685'), 'c8pMYhxhW0', (317), 'PlPMwr1Jo7'), ((INT '132'), 'rvqopW6i4m', 'eCk6WgYInN', 'VADHz7UQIo', 'KzYDJW5B2X', (INT '591'), 'yfFzWqFEN9', (965), 'pvcU99n1dL'), ((INT '822'), 'DeNBM5swDW', 'ZZ6x4NDjQG', 'OKCYAXpZzC', 'eUFZCFNBdt', (INT '814'), 'rj3EMbvGOF', (525), 'FQ4kMcPzZM'), ((INT '73'), 'wyp9mr17rS', '3uZVDmqe04', 'IZ5R71wgDx', 'qP9u0fJrs8', (INT '298'), 's0e0TnvI9j', (1), 'bH99CzbZqh'), ((INT '682'), 'TFnKMoUCjg', 'qNH2TfZ1B4', 'dhixOwjUrW', 'HJP1XEJhrK', (INT '862'), 'L9K9ehVXx5', (489), 'fuZ5J0pPRD');
INSERT INTO partsupp VALUES ((INT '640'), (INT '999'), (INT '895'), (0), 'Kw3iRvFF3m'), ((INT '252'), (INT '-2147483648'), (INT '-95795424'), (-2147483648), 'i9yMV2SS18'), ((INT '834'), (INT '253'), (INT '580'), (0), 'DnfUd7AJ0E'), ((INT '605'), (INT '549'), (INT '675'), (262), '5HSmXxdAxR'), ((INT '-319751266'), (INT '-2147483648'), (INT '204'), (149), 'mjonDpR2Kj'), ((INT '881'), (INT '208'), (INT '669'), (2147483647), '4VQduAuE69'), ((INT '2147483647'), (INT '848'), (INT '830'), (458830846), '9sACGuJynw'), ((INT '865'), (INT '0'), (INT '386'), (0), 'SfOn18zKzu'), ((INT '536'), (INT '915'), (INT '2147483647'), (2147483647), 'Gs9jtYRjyF'), ((INT '659'), (INT '500'), (INT '-2147483648'), (207), 'DVuU45wvSQ');
INSERT INTO customer VALUES ((INT '996824363'), 'aNVP2akiwf', 'w5sMvsytFS', (INT '30'), 'nRGhAu5eCf', (515), 'mKQjTY19Bb', '3NwsgOpe1U'), ((INT '467'), 'WpnXlExOj8', 'rBvuyM8bYx', (INT '76'), 'B0gDKD9hzC', (811), 'Lds5NqWyD0', 'e2Am2GwFbH'), ((INT '103'), 'RpgjCsvQ5E', 'jl96Bb1pme', (INT '1'), 'vbAGUQIzX2', (-2147483648), 'Mr94P2HB4u', 'M46XedNEex'), ((INT '504'), '1QcJwnEUzs', 'kak4eGYTUz', (INT '0'), 'pmSAZH3Cpm', (1), 'sUE3jdFYnu', 'l2arzmOXA7'), ((INT '278'), 'nb2KfFG5m1', 'Kp8uYhskDQ', (INT '659'), 'P65UV5DPwJ', (172), 'I8vB1zzwpH', 'gWTY1ai85t'), ((INT '607'), 'uSRolSWpE8', 'K2Z6xa4lM6', (INT '1608440928'), 'JtHETCrLRL', (2022698081), 'UOfPK8h7qF', '1jO24FJvFQ'), ((INT '376'), 'T4NEVvm7hk', 'vOstNbDRDq', (INT '962'), 'XqG46dN7mV', (800), 'QNnlQsNeqZ', 'CcdbUT3MUR'), ((INT '726'), 'Vwo9Cx6yqK', 'eUzz7MYsUY', (INT '2147483647'), 'Up5PIN2XmH', (365), '8AfiEBdB9Y', 'iv4k4JfoEB'), ((INT '2147483647'), 'cKSuWEPcdn', 'aeuucfcvBX', (INT '123'), 'sqVxwgCx1F', (773), 'PecxtSa8Gf', 'GeWgOTeJBi'), ((INT '663'), 'sKocxM72lK', 'p4g4HVeaBZ', (INT '0'), 'MjQqpN7AWz', (-487943397), 'bTBUWS8qXk', 'UzzbaRAkz8');
INSERT INTO orders VALUES ((BIGINT '8753812094511164949'), (INT '-2147483648'), 'dmyMmbaWxR', (520), DATE '2022-09-30', 'A6cZen6h7R', 'yOp7YwwUIr', (INT '977'), 'gLRNCkJ9ao'), ((BIGINT '126'), (INT '899'), 'M9xCsu1yCt', (124), DATE '2022-09-30', 'LGwD91DLQ6', '92QNbFmmID', (INT '509'), '7tJfJGYqLi'), ((BIGINT '904'), (INT '2147483647'), 'zTdJSy7Elb', (614), DATE '2022-09-23', 'eF3wOCM607', 'kOHLSp1UMa', (INT '989'), 'ExKc6XRceY'), ((BIGINT '788'), (INT '1'), 'phu2Q0Vrl0', (395197399), DATE '2022-09-30', 'ruZsU1ONqU', 'YrrWu2CQ83', (INT '888'), '5UCzAyeKwQ'), ((BIGINT '64'), (INT '312'), 'uEkT3WT9Ar', (-591411972), DATE '2022-09-30', '3WmrhHFf43', 'ce4WjDVaSd', (INT '743'), '1p6KNL4Spz'), ((BIGINT '1'), (INT '1'), 'w7CceF5Obw', (1897737549), DATE '2022-09-23', 'ChLD1Sixl1', 'cWZk7IluTX', (INT '631'), 'pfTGjyoIlc'), ((BIGINT '181'), (INT '452'), 'CmN4N8GYzj', (725), DATE '2022-09-30', 'EnC22vmNM1', 'zm31ljIidD', (INT '598'), 'tbueFhMQna'), ((BIGINT '485'), (INT '681'), 'Fqw3RMyZ5I', (51), DATE '2022-09-30', 'EK1GLWeSae', 'nHtEedEDPT', (INT '28'), 'vpFks6vEhS'), ((BIGINT '9223372036854775807'), (INT '695'), 'TFNzzEx7ys', (993), DATE '2022-09-29', 'XffsdHBBld', 'Ba5Nhn8Y9O', (INT '708'), 'M4fD5MVH9Q'), ((BIGINT '705'), (INT '966'), 'B8b1fDFZqk', (67), DATE '2022-09-25', 'wHbRyJCE9o', 'hhHj9kH2A2', (INT '385'), 'CQc6itBKvC');
INSERT INTO lineitem VALUES ((BIGINT '985'), (INT '399'), (INT '190'), (INT '903'), (270), (2147483647), (-1200462279), (495), '8e2gBZBwBd', '2HBFtWfxLI', DATE '2022-09-30', DATE '2022-09-23', DATE '2022-09-30', 'LM8PcXjud4', 'vrNzxusfwZ', 'JoFubIWokL'), ((BIGINT '5356534519394491123'), (INT '779'), (INT '1286130391'), (INT '175887289'), (2147483647), (8), (1), (797), 'JcOVBrU1h6', 'KdZDYstdWk', DATE '2022-09-30', DATE '2022-09-29', DATE '2022-09-30', 'jkhaltAlSf', 'xQn85Q280c', 'sd6dZrQrSL'), ((BIGINT '691'), (INT '128'), (INT '798'), (INT '27'), (687), (352), (937), (708), 'HzUhI5pG85', 'lTrIHpfeC5', DATE '2022-09-30', DATE '2022-09-30', DATE '2022-09-29', 'P3rIageLYk', 'Se12NGa0vw', '4MfPy5ucdA'), ((BIGINT '431'), (INT '519'), (INT '56'), (INT '581'), (362), (-804778980), (-423938907), (44), 'OpNk6XHRJH', 'YVTcDqiflA', DATE '2022-09-30', DATE '2022-09-30', DATE '2022-09-30', '4P4chEytD4', 'xuSYosXC6P', 'lz2vvDET7m'), ((BIGINT '928'), (INT '12'), (INT '504'), (INT '-459824499'), (2147483647), (316), (228), (151), 'JWsmPNM0gK', 'Kqiy4e1M0a', DATE '2022-09-30', DATE '2022-09-29', DATE '2022-09-29', 'yNgobp9MQm', 'OCRGYwOXkv', '3LUg3glu9c'), ((BIGINT '212'), (INT '1327511095'), (INT '817'), (INT '-57850849'), (1), (50), (992), (904), 'ManUJbRqtC', 'tkTrdggN0F', DATE '2022-09-30', DATE '2022-09-30', DATE '2022-09-30', 'umZgwZM8Es', 'Q2HdUI0w0C', 'eEH1XZ1dVR'), ((BIGINT '967'), (INT '80'), (INT '636'), (INT '-2147483648'), (689), (207), (961), (712), 'JrOOSzh4X2', 'Hzkpz6S1KM', DATE '2022-09-30', DATE '2022-09-19', DATE '2022-09-30', 'KNrMAzNgMx', 'YZIjPcnSKS', 'ocAWDujCW0'), ((BIGINT '1'), (INT '202'), (INT '850'), (INT '1'), (717), (797), (-710534110), (39), '1kdKAjrjVy', '3cZLsACm4P', DATE '2022-09-30', DATE '2022-09-26', DATE '2022-09-23', 'TKRDsPo9Q9', 'zQcDcmqVU9', 'w8v6ZJlhnO'), ((BIGINT '252'), (INT '959'), (INT '189'), (INT '-560072633'), (-1994763577), (-1190734001), (-2147483648), (242), 'RYc9XhNUuW', '4xmvgT0WyQ', DATE '2022-09-29', DATE '2022-09-30', DATE '2022-09-29', 'bHxmzhLLpO', 'IKtaOFnCtW', 'kjRsIWRgVC'), ((BIGINT '1'), (INT '876'), (INT '465'), (INT '-2147483648'), (18), (248), (-2147483648), (268), 'Qc0YQFclPV', '6YLMWCerO6', DATE '2022-09-30', DATE '2022-09-30', DATE '2022-09-30', 'PIa1pRBl64', 'gMTutkMk99', 'rIwoWB04sf');
INSERT INTO nation VALUES ((INT '810'), 'rPg0ACfeI9', (INT '-556197419'), 'qJblbOZ5fA'), ((INT '1668795066'), 'KUek6G3ACW', (INT '838'), 'yi3AVhr3dS'), ((INT '-2147483648'), 'gmUTV1koMs', (INT '757'), 'zkl8dmeUIx'), ((INT '15'), 'w1GcbN71AV', (INT '2088844048'), 'uD0w0USVFQ'), ((INT '-2147483648'), 'QFfaw3q4te', (INT '329'), 'jDHXglov7U'), ((INT '1'), 'Dc5AmleYxT', (INT '495'), 'g2QEBECSYn'), ((INT '0'), 'UCAZBjMxWE', (INT '626'), '1L8uEwFW15'), ((INT '286'), 'GC1RwnOvgf', (INT '721'), 'MgkV6fVzg8'), ((INT '90'), 'ms2SvYwAqY', (INT '0'), 'k96wCJDoF6'), ((INT '682'), 'WQYXvZU8eW', (INT '132'), 'ar1xE1xEQM');
INSERT INTO region VALUES ((INT '792'), 'rhxA8NfOZk', 'WmOhVjZivO'), ((INT '723'), 'QM22kqt7WF', 'O0bZPqp3oq'), ((INT '493'), 'zYvsboBQeK', 'c11ai48IBX'), ((INT '540'), 'urXWBbTgMU', '1Q6kRIs6mx'), ((INT '369'), 'RdnhecxO9k', 'DEelMR4fXh'), ((INT '193'), 'vikCUs61Ax', 'UFhXWM5bdP'), ((INT '1'), 'CcGiVqsvwS', 'skt6e2pxD0'), ((INT '991'), 'yRnA6Qj7zO', 'PN43Qf8gYY'), ((INT '9'), 'tjqEzTNyNQ', 'usRbV0tLzv'), ((INT '614'), 'kRgI2T2g7b', '9QSpNvxd3t');
INSERT INTO person VALUES ((BIGINT '503'), 'fzGUOHt1p5', 'tfEkK7VWH7', 'e8t7ei4qbT', 'DXhHeySLZM', 'ol8VeFyu3E', TIMESTAMP '2022-09-30 18:49:11', 'EkkJNmUZZE'), ((BIGINT '226'), 'o2ba06tRb4', '1zLOLNLeB7', 'Lun9hoW7pV', 'lx7etcg0Sw', 'PC1kxaes4G', TIMESTAMP '2022-09-30 17:49:11', 'wNn4G823E2'), ((BIGINT '9223372036854775807'), 'KHwvCP86iX', 'z17qLntzsB', 'zIbB86TjFi', 'kuFRJbv32P', 'n1oGZhL3Ik', TIMESTAMP '2022-09-29 18:49:11', 'pGuYOOQpoI'), ((BIGINT '877'), 'QkPVkzqtbR', 'C7fcJgNbxY', 'oePUIIu3F5', 'aGilNQVzbP', 'dH8XsL5one', TIMESTAMP '2022-09-23 18:49:11', 'vXnk8oOWtz'), ((BIGINT '485'), '63D7thLALR', 'CrCEJpzEfV', '4eR44wMsZy', 'AIWHsWY2aD', 'cF8JHgfVFo', TIMESTAMP '2022-09-23 18:49:11', 'l9HvsQzYNb'), ((BIGINT '902'), 'XSxEqx2VWu', '6C1Yty6dNZ', 'qKmGWJKkFM', 'k3CV1mYQgm', 'xdH2pBj8Lz', TIMESTAMP '2022-09-29 18:49:11', 'dOP74mQnkK'), ((BIGINT '531'), 'XXCiFELLO8', 'TZaZoCd8qv', 'xLdyYSD8rF', 'QFf5Q7mPvy', '4eKfVsVvrd', TIMESTAMP '2022-09-23 18:49:11', 'c2geuFlC00'), ((BIGINT '1'), 'brzFnpJ2fb', 'sDxtmAcz6u', 'R3OYPx2YhQ', 'im2IFLiALh', '2Cn9FRvHp4', TIMESTAMP '2022-09-23 18:49:11', 'BAhSQABJPU'), ((BIGINT '212'), 'bDMxiFs6E5', 'RbtSLlIYAq', 'IHPRL9wc8a', 'XQIBicLgcX', 'zISn80mUsK', TIMESTAMP '2022-09-30 18:48:11', 'cqlKVkDBw5'), ((BIGINT '228'), 'GJRXM55YL4', 'nf6UUyVQgp', 'kaKqxvtN0t', '7twdeopP23', 'jNk2JqWyJl', TIMESTAMP '2022-09-30 18:49:10', 'U0hEWMFyeK');
INSERT INTO auction VALUES ((BIGINT '-6846908867270441779'), 'IRyAWMahKP', 'Cap3EhooyO', (BIGINT '421'), (BIGINT '-9223372036854775808'), TIMESTAMP '2022-09-29 18:49:11', TIMESTAMP '2022-09-30 18:49:10', (BIGINT '153911720202981186'), (BIGINT '180'), 'odF9wAYtmA'), ((BIGINT '653'), 'RsoQqJywWJ', 'bIEyFshG6q', (BIGINT '0'), (BIGINT '0'), TIMESTAMP '2022-09-28 15:35:04', TIMESTAMP '2022-09-28 00:56:55', (BIGINT '810'), (BIGINT '5299330557155650995'), 'T10ppW0cRQ'), ((BIGINT '820'), 'T4MOzYQonQ', 'uIXaODO32m', (BIGINT '9223372036854775807'), (BIGINT '0'), TIMESTAMP '2022-09-30 18:48:11', TIMESTAMP '2022-09-30 17:49:11', (BIGINT '874'), (BIGINT '407'), 'mNRQBBSkbY'), ((BIGINT '9223372036854775807'), '3ElzaxVsqT', 'IqlV4DEblQ', (BIGINT '-98312274304981344'), (BIGINT '346'), TIMESTAMP '2022-09-30 17:49:11', TIMESTAMP '2022-09-29 18:49:11', (BIGINT '-9223372036854775808'), (BIGINT '791'), 'CE6tJCo5tR'), ((BIGINT '671'), 'BwuwkshKxP', 'WUTPnQQhYt', (BIGINT '117'), (BIGINT '882'), TIMESTAMP '2022-09-29 15:39:06', TIMESTAMP '2022-09-30 18:48:11', (BIGINT '865'), (BIGINT '-8878314085237768207'), 'l6gnBYNISZ'), ((BIGINT '225'), 'XJEv0x7rXy', 'W5dnonZsX0', (BIGINT '468'), (BIGINT '988'), TIMESTAMP '2022-09-30 17:49:11', TIMESTAMP '2022-09-30 18:49:10', (BIGINT '8'), (BIGINT '888'), '8VTQxUWyyI'), ((BIGINT '483'), 'C1iSKi3j35', '7U5DxBuQDp', (BIGINT '666'), (BIGINT '360'), TIMESTAMP '2022-09-26 15:11:28', TIMESTAMP '2022-09-23 18:49:11', (BIGINT '0'), (BIGINT '842'), 'PFfnxkOnRz'), ((BIGINT '140'), 'WqrWSuIyhv', 'iCru5jElfi', (BIGINT '0'), (BIGINT '721'), TIMESTAMP '2022-09-30 18:49:10', TIMESTAMP '2022-09-30 18:48:11', (BIGINT '285'), (BIGINT '421'), '0eXt4VxQGS'), ((BIGINT '48'), 'S8Hch0IaT9', 'E7btrpLMBW', (BIGINT '41'), (BIGINT '0'), TIMESTAMP '2022-09-30 18:49:10', TIMESTAMP '2022-09-25 19:28:13', (BIGINT '551'), (BIGINT '896'), '8bnzwAUCDr'), ((BIGINT '9223372036854775807'), 'Uy47pQcuAu', 'za6pePoCwx', (BIGINT '982'), (BIGINT '376'), TIMESTAMP '2022-09-30 18:49:11', TIMESTAMP '2022-09-30 17:49:11', (BIGINT '1'), (BIGINT '381'), '99gnlnD7BP');
INSERT INTO bid VALUES ((BIGINT '101'), (BIGINT '-9184494866561893688'), (BIGINT '795'), '1wukY4EvEL', 'zm642fwSMt', TIMESTAMP '2022-09-30 18:49:10', 'ennHRgNt3K'), ((BIGINT '-9223372036854775808'), (BIGINT '413'), (BIGINT '-9223372036854775808'), 'dEoGvbNHXv', 'QLEDk0ABee', TIMESTAMP '2022-09-30 18:48:11', 'CpUBZq6uU6'), ((BIGINT '763'), (BIGINT '-9223372036854775808'), (BIGINT '939'), 'yNOAFSWslf', '9DqBQHHvEj', TIMESTAMP '2022-09-30 18:49:10', 'QeRuB13cjF'), ((BIGINT '565'), (BIGINT '125'), (BIGINT '298'), 'qbBwjG9j46', 'V17BGdBWgB', TIMESTAMP '2022-09-29 18:49:11', 'X1cIDEQUp0'), ((BIGINT '-6113864443980721731'), (BIGINT '400'), (BIGINT '658'), 'JlUWfQNBSP', 'BONrUzeLp2', TIMESTAMP '2022-09-30 17:49:11', '3VQjFyZHG0'), ((BIGINT '207'), (BIGINT '763'), (BIGINT '916'), 'PZbmUKi024', 'f4oIT6sqCf', TIMESTAMP '2022-09-30 17:49:11', 'sWKQXe0Usz'), ((BIGINT '894'), (BIGINT '437'), (BIGINT '301'), 'qnO4U3yNuF', 'BY3bow2kdh', TIMESTAMP '2022-09-23 18:49:11', 'emZ2kbnKKJ'), ((BIGINT '778'), (BIGINT '56'), (BIGINT '-9223372036854775808'), 'e4kqLykDLz', 'Alr8hhfaoZ', TIMESTAMP '2022-09-29 18:49:11', 'IlAovvov9G'), ((BIGINT '978'), (BIGINT '187'), (BIGINT '528'), 'NvKZsWDdef', 'qfvWX235Kb', TIMESTAMP '2022-09-28 00:51:45', 'HJSllWt1Up'), ((BIGINT '981'), (BIGINT '1950323269941373591'), (BIGINT '256'), 'HIG9ZbceIA', 'G6SLmEDGYK', TIMESTAMP '2022-09-23 18:49:11', 'UHIxl80KoR');
INSERT INTO alltypes1 VALUES (false, (SMALLINT '744'), (INT '650'), (BIGINT '812'), (REAL '674'), (FLOAT '955'), (42), DATE '2022-09-30', 'y8paMLzpme', TIME '17:49:11', TIMESTAMP '2022-09-30 18:48:11', (INTERVAL '-86400'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '685')], ARRAY['nlXp9QKy8H']), (false, (SMALLINT '125'), (INT '520'), (BIGINT '1'), (REAL '296'), (FLOAT '892'), (621), DATE '2022-09-30', '2ySRsDtwJK', TIME '18:48:11', TIMESTAMP '2022-09-30 18:49:11', (INTERVAL '-1'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '681'), (INT '140')], ARRAY['gSc6doG5AD', 'xZeye814V4', 'IWhgMNnbjp']), (false, (SMALLINT '771'), (INT '589'), (BIGINT '396'), (REAL '898'), (FLOAT '905'), (928), DATE '2022-09-30', '61SfAnmHrR', TIME '07:38:52', TIMESTAMP '2022-09-27 17:31:00', (INTERVAL '-3600'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '795'), (INT '2147483647'), (INT '777')], ARRAY['NieABphVZ0', 'yG6naOaTHw', 'esD0yvn8qp', 'T3x0MlXKHy']), (false, (SMALLINT '27'), (INT '74'), (BIGINT '219'), (REAL '832'), (FLOAT '489'), (451), DATE '2022-09-30', 'P1gvKPKTui', TIME '18:49:11', TIMESTAMP '2022-09-29 04:53:21', (INTERVAL '-1'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '766')], ARRAY['K6ek0g1KVg', 'PyBdHUfhHY', 'NylXuFcCTK']), (false, (SMALLINT '806'), (INT '320803113'), (BIGINT '776'), (REAL '0'), (FLOAT '-2147483648'), (281), DATE '2022-09-30', 'bvSLPgqB7M', TIME '18:49:11', TIMESTAMP '2022-09-30 18:49:10', (INTERVAL '-126574'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '1327409353')], ARRAY['Agub4vayLg']), (true, (SMALLINT '891'), (INT '665'), (BIGINT '524'), (REAL '232'), (FLOAT '62'), (140), DATE '2022-09-29', 'rcrvshWiSl', TIME '17:49:11', TIMESTAMP '2022-09-30 18:49:10', (INTERVAL '-1'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '111')], ARRAY['flIwKF6Ko6']), (false, (SMALLINT '795'), (INT '-1525199440'), (BIGINT '301'), (REAL '2147483647'), (FLOAT '500'), (1), DATE '2022-09-30', 'mlMNGLMGv8', TIME '18:48:11', TIMESTAMP '2022-09-20 12:48:21', (INTERVAL '0'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '998'), (INT '74')], ARRAY['lvWTfZoOzl', 'O8I1vDaYWW']), (true, (SMALLINT '539'), (INT '711'), (BIGINT '74'), (REAL '0'), (FLOAT '2147483647'), (70), DATE '2022-09-27', '7FCnkcxbUR', TIME '18:48:11', TIMESTAMP '2022-09-29 18:49:11', (INTERVAL '604800'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '870')], ARRAY['lUzGj8Y4kA', 'o65k6PLyhy', 'vUBn76hxLh', 'eozKgTTpBY']), (false, (SMALLINT '509'), (INT '530'), (BIGINT '887'), (REAL '722'), (FLOAT '-1889476734'), (1), DATE '2022-09-30', 'WCXzkn60pv', TIME '18:49:11', TIMESTAMP '2022-09-23 18:49:11', (INTERVAL '0'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '-2111327250'), (INT '82'), (INT '675'), (INT '1729021726')], ARRAY['eHkaJ0o0UN']), (false, (SMALLINT '152'), (INT '569'), (BIGINT '888'), (REAL '160'), (FLOAT '218'), (399), DATE '2022-09-30', 'SR9XhOnh4J', TIME '18:49:11', TIMESTAMP '2022-09-23 18:49:11', (INTERVAL '0'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '212'), (INT '643'), (INT '0'), (INT '760')], ARRAY['avfsdYGIyR', 'E9cihAuREG']);
INSERT INTO alltypes2 VALUES (false, (SMALLINT '-32768'), (INT '86'), (BIGINT '-1809867419705733418'), (REAL '0'), (FLOAT '400'), (779), DATE '2022-09-19', '1jDmwQbzzm', TIME '18:49:11', TIMESTAMP '2022-09-30 17:49:11', (INTERVAL '-1'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '355574672'), (INT '349')], ARRAY['8DqIgovwe8', '1AY4Z3GVXM', 'GynsWgkSas']), (true, (SMALLINT '131'), (INT '940'), (BIGINT '475'), (REAL '675'), (FLOAT '490'), (0), DATE '2022-09-30', '51u1Tt0ZRC', TIME '17:49:11', TIMESTAMP '2022-09-30 18:48:11', (INTERVAL '-3600'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '719'), (INT '1')], ARRAY['SZlZGyKsFC', 'Cdz1Dc3BD4', 'p50TzwAJ0K', 'uxoVfLSsi5']), (true, (SMALLINT '1'), (INT '1529813343'), (BIGINT '122'), (REAL '1'), (FLOAT '390'), (149), DATE '2022-09-30', 'gc4VyzisJq', TIME '18:49:11', TIMESTAMP '2022-09-19 13:50:20', (INTERVAL '3600'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '113')], ARRAY['T60dVHIq1k']), (false, (SMALLINT '286'), (INT '1'), (BIGINT '105'), (REAL '626'), (FLOAT '516'), (18), DATE '2022-09-30', 'SMg0EBkZfs', TIME '18:49:11', TIMESTAMP '2022-09-29 18:49:11', (INTERVAL '0'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '581'), (INT '649'), (INT '351518523')], ARRAY['WGKQx2WfWL']), (true, (SMALLINT '1'), (INT '304'), (BIGINT '6031537432279104590'), (REAL '2147483647'), (FLOAT '507'), (0), DATE '2022-09-30', 'MsX6vVQSXF', TIME '17:49:11', TIMESTAMP '2022-09-30 18:49:11', (INTERVAL '-604800'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '755'), (INT '131'), (INT '1'), (INT '869')], ARRAY['EmlbIkrtMz', 'Htx6VjnPPV', 'ztGcRTo3vZ']), (false, (SMALLINT '59'), (INT '200'), (BIGINT '665'), (REAL '323'), (FLOAT '1'), (-2147483648), DATE '2022-09-29', 'uDaBFELFJ9', TIME '18:49:11', TIMESTAMP '2022-09-23 18:49:11', (INTERVAL '-86400'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '893'), (INT '2147483647'), (INT '608'), (INT '224')], ARRAY['vTykbWsgqq', '6yUXPLIr61']), (true, (SMALLINT '712'), (INT '659'), (BIGINT '666'), (REAL '445637801'), (FLOAT '451'), (-2147483648), DATE '2022-09-30', 'iB4sIROgaD', TIME '18:48:11', TIMESTAMP '2022-09-23 18:49:11', (INTERVAL '3600'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '806')], ARRAY['yg7Iu1fQBG', 'GY0oOWoqDK', '6NvNyRLckL', 'q8ntkznJfE']), (true, (SMALLINT '3934'), (INT '508'), (BIGINT '751'), (REAL '321'), (FLOAT '356'), (191), DATE '2022-09-25', 'FSSOrnN9Pa', TIME '18:49:11', TIMESTAMP '2022-09-30 18:49:11', (INTERVAL '654246'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '694'), (INT '2147483647'), (INT '604')], ARRAY['lBGJNGPmD1', '9kV8fUsQZH']), (true, (SMALLINT '-32768'), (INT '649'), (BIGINT '758'), (REAL '60'), (FLOAT '340'), (793), DATE '2022-09-30', 'XF4bJMpQ5d', TIME '18:49:11', TIMESTAMP '2022-09-30 17:49:11', (INTERVAL '0'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '39')], ARRAY['kMRGk6GWAo', '8JPztS0Sqi', '2LBsuP4fNL']), (false, (SMALLINT '12465'), (INT '466'), (BIGINT '0'), (REAL '610'), (FLOAT '390'), (524), DATE '2022-09-23', 'JPHovYYErJ', TIME '18:49:11', TIMESTAMP '2022-09-30 18:49:11', (INTERVAL '60'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '0'), (INT '2147483647')], ARRAY['7OJrATdnhc']); 
SET RW_FORCE_TWO_PHASE_AGG TO FALSE; 
CREATE MATERIALIZED VIEW stream_query AS SELECT TIME '18:53:46' AS col_0 FROM m2 AS t_0 WHERE true GROUP BY t_0.col_1, t_0.col_2;

Expected behavior

No response

Additional context

Perhaps related to #8329 .

@kwannoel kwannoel added the type/bug Something isn't working label Mar 6, 2023
@github-actions github-actions bot added this to the release-0.1.18 milestone Mar 6, 2023
@kwannoel kwannoel self-assigned this Mar 6, 2023
@st1page
Copy link
Contributor

st1page commented Mar 6, 2023

explain:

dev=> explain (distsql, verbose) CREATE MATERIALIZED VIEW stream_query AS SELECT TIME '18:53:46' AS col_0 FROM m2 AS t_0 WHERE true GROUP BY t_0.col_1, t_0.col_2;
                                                                                              QUERY PLAN                                                                                              
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Fragment 0
   StreamMaterialize { columns: [col_0, m2.col_1(hidden), m2.col_2(hidden)], pk_columns: [m2.col_1, m2.col_2], pk_conflict: "no check" }
       materialized table: 4294967294
       Output: ['18:53:46':Time, m2.col_1, m2.col_2]
       Stream key: [m2.col_1, m2.col_2], 
     StreamProject { exprs: ['18:53:46':Time, m2.col_1, m2.col_2] }
         Output: ['18:53:46':Time, m2.col_1, m2.col_2]
         Stream key: [m2.col_1, m2.col_2], 
       StreamHashAgg { group_key: [m2.col_1, m2.col_2], aggs: [count] }
           result table: 0, state tables: []
           Output: [m2.col_1, m2.col_2, count]
           Stream key: [m2.col_1, m2.col_2], 
         StreamExchange Hash([0, 1]) from 1
             Output: [m2.col_1, m2.col_2]
             Stream key: [], 
 
 Fragment 1
   Chain { table: m2, columns: [m2.col_1, m2.col_2], pk: [], dist: Single }
       Output: [m2.col_1, m2.col_2]
       Stream key: [], 
     Upstream
         Output: [col_0, col_1, col_2, col_3]
         Stream key: [], 
     BatchPlanNode
         Output: [m2.col_1, m2.col_2]
         Stream key: [], AppendOnly
 
  Table 0 { columns: [m2_col_1:interval, m2_col_2:time without time zone, count:bigint], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] }
  Table 4294967294 { columns: [col_0:time without time zone, m2.col_1:interval, m2.col_2:time without time zone], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1, 2] }

@st1page
Copy link
Contributor

st1page commented Mar 6, 2023

log;

thread 'risingwave-streaming-actor' panicked at 'vnode 98 should not be accessed by this table', src/storage/src/table/mod.rs:152:5
stack backtrace:
2023-03-06T08:54:48.182512Z DEBUG risingwave_storage::hummock::event_handler::hummock_event_handler: update to hummock version: 68, epoch: 3988369398038528
   0: rust_begin_unwind
             at /rustc/31f858d9a511f24fedb8ed997b28304fec809630/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/31f858d9a511f24fedb8ed997b28304fec809630/library/core/src/panicking.rs:64:14
   2: risingwave_storage::table::check_vnode_is_set
             at ./src/storage/src/table/mod.rs:152:5
   3: risingwave_storage::table::compute_vnode
             at ./src/storage/src/table/mod.rs:115:9
   4: risingwave_stream::common::table::state_table::StateTable<S,W>::compute_prefix_vnode
             at ./src/stream/src/common/table/state_table.rs:462:13
   5: risingwave_stream::common::table::state_table::StateTable<S>::get_compacted_row::{{closure}}
             at ./src/stream/src/common/table/state_table.rs:529:58
   6: risingwave_stream::common::table::state_table::StateTable<S>::get_row::{{closure}}
             at ./src/stream/src/common/table/state_table.rs:505:77
   7: risingwave_stream::executor::aggregation::agg_group::AggGroup<S,Strtg>::create::{{closure}}
             at ./src/stream/src/executor/aggregation/agg_group.rs:228:78
   8: risingwave_stream::executor::hash_agg::HashAggExecutor<K,S>::ensure_keys_in_cache::{{closure}}::{{closure}}::{{closure}}
             at ./src/stream/src/executor/hash_agg.rs:269:29
   9: <futures_util::stream::futures_unordered::FuturesUnordered<Fut> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/futures_unordered/mod.rs:518:17
  10: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  11: <futures_util::stream::stream::buffer_unordered::BufferUnordered<St> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/buffer_unordered.rs:75:15
  12: <futures_util::stream::stream::fuse::Fuse<S> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/fuse.rs:53:27
  13: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  14: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  15: risingwave_stream::executor::hash_agg::HashAggExecutor<K,S>::ensure_keys_in_cache::{{closure}}
             at ./src/stream/src/executor/hash_agg.rs:282:53
  16: risingwave_stream::executor::hash_agg::HashAggExecutor<K,S>::apply_chunk::{{closure}}
             at ./src/stream/src/executor/hash_agg.rs:306:9
  17: risingwave_stream::executor::hash_agg::HashAggExecutor<K,S>::execute_inner::{{closure}}
             at ./src/stream/src/executor/hash_agg.rs:577:68
  18: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  19: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  20: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  21: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  22: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  23: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/minitrace-0.4.0/src/future.rs:118:19
  24: risingwave_stream::executor::wrapper::trace::trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:53:60
  25: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  26: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  27: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  28: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  29: <await_tree::future::Instrumented<F,_> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/await-tree-0.1.1/src/future.rs:124:23
  30: risingwave_stream::executor::wrapper::trace::instrument_await_tree::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:124:10
  31: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  32: risingwave_stream::executor::wrapper::schema_check::schema_check::{{closure}}
             at ./src/stream/src/executor/wrapper/schema_check.rs:24:1
  33: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  34: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  35: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  36: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  37: risingwave_stream::executor::wrapper::epoch_check::epoch_check::{{closure}}
             at ./src/stream/src/executor/wrapper/epoch_check.rs:31:44
  38: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  39: risingwave_stream::executor::wrapper::update_check::update_check::{{closure}}
             at ./src/stream/src/executor/wrapper/update_check.rs:27:1
  40: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  41: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  42: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  43: risingwave_stream::executor::simple::SimpleExecutorWrapper<E>::execute_inner::{{closure}}
             at ./src/stream/src/executor/simple.rs:73:5
  44: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  45: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  46: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  47: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  48: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  49: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/minitrace-0.4.0/src/future.rs:118:19
  50: risingwave_stream::executor::wrapper::trace::trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:53:60
  51: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  52: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  53: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  54: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  55: <await_tree::future::Instrumented<F,_> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/await-tree-0.1.1/src/future.rs:124:23
  56: risingwave_stream::executor::wrapper::trace::instrument_await_tree::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:124:10
  57: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  58: risingwave_stream::executor::wrapper::schema_check::schema_check::{{closure}}
             at ./src/stream/src/executor/wrapper/schema_check.rs:24:1
  59: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  60: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  61: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  62: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  63: risingwave_stream::executor::wrapper::epoch_check::epoch_check::{{closure}}
             at ./src/stream/src/executor/wrapper/epoch_check.rs:31:44
  64: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  65: risingwave_stream::executor::wrapper::update_check::update_check::{{closure}}
             at ./src/stream/src/executor/wrapper/update_check.rs:27:1
  66: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  67: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  68: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  69: risingwave_stream::executor::mview::materialize::MaterializeExecutor<S>::execute_inner::{{closure}}
             at ./src/stream/src/executor/mview/materialize.rs:144:5
  70: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  71: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  72: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  73: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  74: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  75: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/minitrace-0.4.0/src/future.rs:118:19
  76: risingwave_stream::executor::wrapper::trace::trace::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:53:60
  77: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  78: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  79: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
  80: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/next.rs:32:9
  81: <await_tree::future::Instrumented<F,_> as core::future::future::Future>::poll
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/await-tree-0.1.1/src/future.rs:124:23
  82: risingwave_stream::executor::wrapper::trace::instrument_await_tree::{{closure}}
             at ./src/stream/src/executor/wrapper/trace.rs:124:10
  83: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  84: risingwave_stream::executor::wrapper::schema_check::schema_check::{{closure}}
             at ./src/stream/src/executor/wrapper/schema_check.rs:24:1
  85: <futures_async_stream::try_stream::GenTryStream<G> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-async-stream-0.2.6/src/lib.rs:463:33
  86: <core::pin::Pin<P> as futures_core::stream::Stream>::poll_next
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.26/src/stream.rs:120:9
  87: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/sp/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.26/src/stream/stream/mod.rs:1625:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


*** await tree context of current task ***

Actor 224: `CREATE MATERIALIZED VIEW stream_query AS SELECT TIME '18:53:46' AS col_0 FROM m2 AS t_0 WHERE true GROUP BY t_0.col_1, t_0.col_2` [316.681ms]
  Epoch 3988369450860544 [300.014ms]
    MaterializeExecutor E000000006 (actor 224, executor 6) [300.014ms]
      ProjectExecutor E000000005 (actor 224, executor 5) [300.014ms]
        HashAggExecutor E000000003 (actor 224, executor 3) [300.014ms]  <== current

@st1page
Copy link
Contributor

st1page commented Mar 6, 2023

very interesting, I found the bugs will happen even when no insert statements 😇

dev=> select * from m2;
 col_0 |        col_1        | col_2 |  col_3   
-------+---------------------+-------+----------
   175 | -204800340782:35:54 |       | 18:49:16
(1 row)

dev=> CREATE MATERIALIZED VIEW stream_query AS SELECT TIME '18:53:46' AS col_0 FROM m2 AS t_0 WHERE true GROUP BY t_0.col_1, t_0.col_2;

ERROR:  QueryError: internal error: failed to finish command: channel closed

@BugenZhao
Copy link
Member

BugenZhao commented Mar 6, 2023

It's due to the days overflow when we call justify_interval.

impl HashKeySerDe<'_> for IntervalUnit {
type S = [u8; 16];
fn serialize(mut self) -> Self::S {
self.justify_interval();
let mut ret = [0; 16];
ret[0..4].copy_from_slice(&self.get_months().to_ne_bytes());
ret[4..8].copy_from_slice(&self.get_days().to_ne_bytes());
ret[8..16].copy_from_slice(&self.get_ms().to_ne_bytes());
ret
}
fn deserialize<R: Read>(source: &mut R) -> Self {
let value = Self::read_fixed_size_bytes::<R, 16>(source);
IntervalUnit::new(
i32::from_ne_bytes(value[0..4].try_into().unwrap()),
i32::from_ne_bytes(value[4..8].try_into().unwrap()),
i64::from_ne_bytes(value[8..16].try_into().unwrap()),
)
}
}

IntervalUnit { months: 0, days: 0, ms: -737281226817354000 }
-- justify ->
IntervalUnit { months: 0, days: 56587060, ms: -52554000 }

should be:
IntervalUnit { months: 0, days: -8533347533 (overflow i32), ms: -52554000 }

So we get different hash (vnode) values for hash-data dispatcher and state table.

@BugenZhao
Copy link
Member

Related:

@BugenZhao BugenZhao changed the title bug(stream): mv-on-mv: vnode should not be accessed by this table bug(stream): mv-on-mv: vnode 98 should not be accessed by this table Mar 7, 2023
@xiangjinwu
Copy link
Contributor

Hash of interval have been fixed.

Note the m2 contains an overflow not captured before: (INTERVAL '-390954') * (1885851601). So I am unable to re-test the exact same set of queries.

@kwannoel
Copy link
Contributor Author

Hash of interval have been fixed.

Note the m2 contains an overflow not captured before: (INTERVAL '-390954') * (1885851601). So I am unable to re-test the exact same set of queries.

Let's close as complete. If sqlsmith catch again we can take a look then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
found-by-sqlsmith type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants