Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-2752

TokenTest.TestKeyValidity is flaky

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 1.10.0
    • NA
    • security, test
    • None

    Description

      Saw this in a DEBUG precommit run. I took a brief look at the test and saw that there's a timing element there; maybe there's not enough fuzziness built-in to allow for slight deviations in timing? There are also multiple threads at play; maybe there's some assumption that if X time elapses in one thread, the same is true in the other? I'm not sure if monotonic clocks are guaranteed to be synchronized between threads,

      [ RUN      ] TokenTest.TestKeyValidity
      I0326 07:39:46.987874   212 token-test.cc:828] Waiting for a second key...
      I0326 07:39:47.992386   212 token-test.cc:828] Waiting for a second key...
      I0326 07:39:48.997269   212 token-test.cc:828] Waiting for a second key...
      I0326 07:39:50.001567   212 token-test.cc:828] Waiting for a second key...
      I0326 07:39:51.005970   212 token-test.cc:828] Waiting for a second key...
      I0326 07:39:51.010686   212 token-test.cc:832] Added second key!
      I0326 07:39:51.061529   217 token-test.cc:85] Generating authn token for activity interval 0
      I0326 07:39:51.061780   218 token-test.cc:85] Generating authz token for activity interval 0
      I0326 07:39:52.069823   218 token-test.cc:85] Generating authz token for activity interval 0
      I0326 07:39:52.069860   217 token-test.cc:85] Generating authn token for activity interval 0
      I0326 07:39:53.078717   217 token-test.cc:85] Generating authn token for activity interval 0
      I0326 07:39:53.078835   218 token-test.cc:85] Generating authz token for activity interval 0
      I0326 07:39:54.085886   217 token-test.cc:85] Generating authn token for activity interval 0
      I0326 07:39:54.086171   218 token-test.cc:85] Generating authz token for activity interval 0
      I0326 07:39:55.093113   217 token-test.cc:85] Generating authn token for activity interval 0
      I0326 07:39:55.093514   218 token-test.cc:85] Generating authz token for activity interval 0
      I0326 07:40:02.988148   216 token-test.cc:821] First TSK's validity interval of 16 secs has finished!
      /home/jenkins-slave/workspace/kudu-master/1/src/kudu/security/token-test.cc:845: Failure
            Expected: VerificationResult::EXPIRED_TOKEN
            Which is: 4-byte object <03-00 00-00>
      To be equal to: result
            Which is: 4-byte object <00-00 00-00>
      authn token expires at 1553586002, currently: 1553586002.9886971
      /home/jenkins-slave/workspace/kudu-master/1/src/kudu/security/token-test.cc:880: Failure
      Expected: verify_expired(tsks[0], "authn") doesn't generate new fatal failures in the current thread.
        Actual: it does.
      I0326 07:40:02.988909   212 test_util.cc:135] -----------------------------------------------
      I0326 07:40:02.988929   212 test_util.cc:136] Had fatal failures, leaving test files at /tmp/dist-test-taskgShY8j/test-tmp/token-test.0.TokenTest.TestKeyValidity.1553585966794339-212
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            adar Adar Dembo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: