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

INT violation when two transactions modify a record to the same value concurrently

    XMLWordPrintable

Details

    Description

      Description

      We are developing a history verification tool capable of handling duplicate write values. During a Jepsen test on MariaDB under Repeatable Read(RR), we encountered an unusual transaction view that appears to violate the INTERNAL axiom.

      Here is an example output from our tool:

      session_id: 2
      txn_id: 138
      R(27, 4)
      W(27, 3)
      R(27, 4)
      

      This indicates that a transaction sequentially performed read, write, and then another read on the same key (27). However, the final read does not reflect the write value (3). This behavior seems to resemble a previous bug that is claimed to be fixed, MDEV-26642, which we were able to reproduce in version 11.5.2. It appears that this issue has resurfaced in the latest versions.

      We identified this bug using our Jepsen test tool under the Repeatable Read isolation level on versions 11.5.2, 11.4, and 10.5. Additionally, we manually reproduced MDEV-26642 in version 11.5.2. When testing under the Serializable isolation level, this bug does not seem to occur.


      Reproduce Steps

      The testing enviroment is provided in a docker container.
      To reproduce it,

      • Set up a mariadb server on port 4406 with username and password 'mysql'
      • Load the Docker image and run the test:

        docker load -i ubuntu-jepsen.tar 
        docker run -it --network=host ubuntu-jepsen 
        python3 test-docker.py
        

      We use jepsen's rw-register workload to generate a history and then use our prototype tool to verify.
      If you wish to modify the client configuration (e.g., port, username, or password), update the file /jepsen-mysql/src/jepsen/mysql/client.clj as shown below:

      ;; change CONFIG here
      (def user "mysql")
      (def password "mysql")
      (def port 4406) 
      (def db "test")
      

      Additional Information

      We apologize for the current Clj implementation's complexity.

      Attachments

        Issue Links

          Activity

            People

              vlad.lesin Vladislav Lesin
              Xiaozhi ZH Cai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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