Skip to content

ENG-30396: kill node 0 too; SQLancer connects to every node (milestone 15) - #15

Closed
jwiebema1 wants to merge 6 commits into
ENG-30396-sqlancer-m14from
ENG-30396-sqlancer-m15
Closed

jwiebema1 wants to merge 6 commits into
ENG-30396-sqlancer-m14from
ENG-30396-sqlancer-m15

Conversation

@jwiebema1

@jwiebema1 jwiebema1 commented Nov 8, 2026 •

Copy link
Copy Markdown

Milestone 15 of ENG-30396 (tracked in ENG-30581, epic ENG-30580 "SQL Housekeeping"): node failures include node 0, the node SQLancer used to connect to alone. Stacked on #14 (milestone 14), which is stacked on #13 to #1; review those first.

The nightly job runs it once VoltDB/internal#6355 is merged; VoltDB/pro#7101 corrects a comment.

Why

Since milestone 12 the 3-node nightly run kills and rejoins a node every 5 minutes, but never node 0: SQLancer connected to node 0 alone, so killing it ended the run. Node 0 was also the node every other node joined through. Clients of a real cluster connect to every node and lose any of them.

What it changes

  • SQLancer connects to every node. New provider option --servers host:port,...: the JDBC URL lists every node's client port with topologychangeaware=true. VoltDB's driver connects to each node, sends every call through a live connection, and reconnects to a node once it has rejoined. Without --servers, the provider connects to --host and --port as before.
  • run-sqlancer.sh: for more than one node, it passes --servers with every client port (the manifest shows it); every node starts with the whole host list (voltdb start -H), so a restarted node 0 rejoins through another node; and --kill-interval picks any node at random, node 0 included.
  • Two more errors that node failures cause:
    • "Connection to database host (localhost) was lost before a response was received": a call in flight on the killed node's connection. It may have committed, so with --node-failures the provider skips it.
    • "@UpdateCore in progress": another connection's catalog update is still running, and its blocker was lost with the node that held it, so a DDL statement gets as far as staging and is refused there, before it changes anything (UpdateApplicationBase). Retried, like a concurrent schema change. Lab build ENG-30396: XDCR and the XDCR oracle (milestone 23) #23 hit it one second after node 0 was killed.
  • TLP AGGREGATE's FLOAT tolerance is relative to the largest of the partitions' SUMs as well as the two results: in lab build ENG-30396: minimal reproductions of every bug found, and run-repros.sh (milestone 25) #25, partitions of +-1.49e9 summed to 2.53, and adding them in another order differed by 1e-6.
  • Workarounds for bugs that milestone 14's oracles found in this milestone's lab runs (below), and the README for all of it: the status line, node failures (node 0, --servers, the two errors), the option table, the bug tables.

Bugs found

Ticket Issue Workaround while --avoid-known-bugs is true
ENG-30599 A window's ORDER BY ... DESC is applied ascending when an equality on its PARTITION BY column picks an index on (partition column, order column): a forward scan, no sort. Found by WINDOW. Wrong result. A window with a PARTITION BY orders ascending.
ENG-30600 An IN or = ANY subquery inside another subquery, whose left operand is a column of the outermost query, holds for every row. Found by SUBQUERY. Wrong result. A subquery inside a subquery is EXISTS.
ENG-30601 t.k < c AND t.k = u.j drops the bound when the join equality becomes an index lookup (unique or not; with the other order it is kept). Found by SUBQUERY, as the EXISTS form of an IN subquery. Wrong result. The EXISTS form puts the comparison first, and an IN, ANY or ALL subquery's WHERE condition is not correlated. Other queries can still meet it.
ENG-30602 Intermittent: a multi-partition SELECT once received a one-column modified_tuples table, as if it had got a DML statement's fragment result ("Column count mismatch. Expecting 3, but 1 given"). Once in 175,000 checks; not reproducible on replay. None: if it recurs, the run fails on it.
ENG-30549 (known) The planner folds a comparison of two string constants ignoring trailing spaces; the SUBQUERY oracle's EXISTS form of ' ' <> ALL (SELECT '' ...) folded and the subquery form did not. The left operand of a string IN, ANY or ALL subquery reads a column.

Testing

  • mvn verify (checkstyle, PMD, formatter) passes.

  • Local trials against 16.1.0-SNAPSHOT at internal 17c453541b, built privately (the first trial ran on a shared checkout that another branch's build replaced mid-run; it is discarded), all eleven oracles, --use-reducer:

    • 3 nodes, k=1, a random node killed every 40 seconds, 10 minutes: 12 kills (node 0 five times), 12 rejoins of 9 to 11 seconds, 7,883 checks, PASS.
    • The same, a kill every 60 seconds, 15 minutes, with the workarounds: 12 kills, 12 rejoins, 13,869 checks, PASS.
    • 3 nodes, k=1, no kills, 5 minutes: 12,541 checks (42 a second), PASS: about the rate of milestone 14's 3-node trials, so connecting to every node costs little; the kill trials' lower rate comes from a rejoin every 40 or 60 seconds.
  • Lab:
    matrix-systemtest-apprunner-sqlancer build ENG-30396: security on, and the PERMS oracle (milestone 28) #27 on jenkins-st, a replay of build ENG-30396: PLANS oracle: differential testing of query plans (milestone 26) #26 (with ENG-30396: subqueries, and the SUBQUERY and WINDOW oracles (milestone 14) #14's kit and agent parameters):

    • Setup: the fork at 46fc061, the milestone 15 run-jenkins-sqlancer-test.sh (sha1 25f26460), CLUSTERS 3:1:300 1:0 3:2:0:2, all eleven oracles. The job checks out pro at the commit its kit was built from, so the replay writes the new script over the kit's copy.

    • Kit: releases/one-offs/16.1.0-SNAPSHOT-ENG-30396-sqlancer-nightly/2.

    • Agent: an apprunner-lxd6 agent (Ubuntu 22.04), JDK 25.

    • Runs: 45 minutes each, --use-reducer, 2 hours 18 minutes in all.

      Run Seed Checks Result
      sqlancer-3n-k1-kill300 202611080403 103,333 PASS: 8 kills, 8 rejoins, no FATAL lines, no node down
      sqlancer-1n-k0 202611080404 192,867 PASS, no FATAL lines
      sqlancer-3n-k2-s2 202611080405 114,512 PASS, no FATAL lines, no node down

    The replays before it each stopped on something, fixed or worked around in the fork's PR:

    No run found a wrong result that is not filed.

run-sqlancer.sh passes --servers with every node's client port, starts every
node with the whole host list, and lets --kill-interval pick any node. The
provider connects through all of them (topologychangeaware), and treats a
call lost with its connection like any other node failure. The SUBQUERY
oracle's string comparisons read a column, avoiding ENG-30549.
…gnitude, as cancelling terms round relative to themselves
@jwiebema1

Copy link
Copy Markdown
Author

Superseded by #51, which combines every ENG-30396 PR of this repo into one. This PR's branch is kept, and its description still has this milestone's details and lab results.

@jwiebema1 jwiebema1 closed this Nov 18, 2026
@jwiebema1
jwiebema1 deleted the ENG-30396-sqlancer-m15 branch November 25, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant