Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-40576

cbas crash 'URISyntaxException: Illegal character in path'

    XMLWordPrintable

    Details

    • Triage:
      Untriaged
    • Story Points:
      1
    • Is this a Regression?:
      Unknown
    • Sprint:
      CX Sprint 209, CX Sprint 212

      Description

      I'm seeing a cbas crash on my Windows 6.6.0-7862 cluster.  And what could be the same crash on our CI tests, against a Linux 6.6.0-7883 cluster.

      One of our tests that reliably creates the crash for me is:

      private static AnalyticsIndexManager analytics;
      private static final String name = "integration-test dataverse";

      @Test
      void dropDataverse() {
        analytics.createDataverse(name);
        // assertDataverseExists(name);
       
        analytics.dropDataverse(name);
        // assertDataverseDoesNotExist(name);
      }
       

      All analytics logs are attached.  The most pertinent bit looks to be:

      2020-07-22T11:52:45.728+01:00 FATA CBAS.lang.CBStatementExecutor [QueryTranslator:90c8bb8c-0a18-40eb-9362-e56fbad3d3b2] Successfully dropped a dataverse but not its buckets and links
      org.apache.hyracks.api.exceptions.HyracksDataException: Conversion = '4'
      	at org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:51) ~[hyracks-api.jar:6.6.0-7862]
      	at com.couchbase.analytics.bootstrap.MetaKvService.delete(MetaKvService.java:166) ~[cbas-server.jar:6.6.0-7862]
      	at com.couchbase.analytics.bootstrap.NsServerHelper.delete(NsServerHelper.java:275) ~[cbas-server.jar:6.6.0-7862]
      	at com.couchbase.analytics.metadata.CBMetadataUtil.dropLinkDetails(CBMetadataUtil.java:442) ~[cbas-connector.jar:6.6.0-7862]
      	at com.couchbase.analytics.lang.CBStatementExecutor.doDropDataverse(CBStatementExecutor.java:221) ~[cbas-connector.jar:6.6.0-7862]
      	at org.apache.asterix.app.translator.QueryTranslator.handleDataverseDropStatement(QueryTranslator.java:1392) ~[asterix-app.jar:6.6.0-7862]
      	at com.couchbase.analytics.lang.CBStatementExecutor.handleDataverseDropStatement(CBStatementExecutor.java:165) ~[cbas-connector.jar:6.6.0-7862]
      	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:336) ~[asterix-app.jar:6.6.0-7862]
      	at org.apache.asterix.app.message.ExecuteStatementRequestMessage.handle(ExecuteStatementRequestMessage.java:155) ~[asterix-app.jar:6.6.0-7862]
      	at org.apache.asterix.messaging.CCMessageBroker.receivedMessage(CCMessageBroker.java:64) ~[asterix-app.jar:6.6.0-7862]
      	at org.apache.hyracks.control.cc.work.ApplicationMessageWork.lambda$notifyMessageBroker$0(ApplicationMessageWork.java:68) ~[hyracks-control-cc.jar:6.6.0-7862]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
      	at java.lang.Thread.run(Unknown Source) [?:?]
      Caused by: java.net.URISyntaxException: Illegal character in path at index 102: http://%40:11864f6698ffc41f066629d358638cb7@127.0.0.1:8091/_metakv/cbas/metadata/link/integration-test dataverse/Local
      	at java.net.URI$Parser.fail(Unknown Source) ~[?:?]
      	at java.net.URI$Parser.checkChars(Unknown Source) ~[?:?]
      	at java.net.URI$Parser.parseHierarchical(Unknown Source) ~[?:?]
      	at java.net.URI$Parser.parse(Unknown Source) ~[?:?]
      	at java.net.URI.<init>(Unknown Source) ~[?:?]
      	at org.apache.http.client.utils.URIBuilder.<init>(URIBuilder.java:82) ~[httpclient-4.5.11.jar:4.5.11]
      	at com.couchbase.analytics.bootstrap.MetaKvService.delete(MetaKvService.java:146) ~[cbas-server.jar:6.6.0-7862]
      	... 12 more
      2020-07-22T11:52:45.764+01:00 FATA CBAS.util.ExitUtil [pool-2-thread-1] JVM halting with status 8; thread dump at halt:  

      Please let me know if there's any additional diagnostics I can provide.  

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          murtadha.hubail Murtadha Hubail added a comment - - edited

          Hi Graham Pople,

          This issue is caused by the space in the dataverse name. It looks like the issue will be deferred to 6.6.1, so in the mean time you may adjust your test by removing the space in the dataverse name and the test should work.

          Show
          murtadha.hubail Murtadha Hubail added a comment - - edited Hi Graham Pople , This issue is caused by the space in the dataverse name. It looks like the issue will be deferred to 6.6.1, so in the mean time you may adjust your test by removing the space in the dataverse name and the test should work.
          Hide
          graham.pople Graham Pople added a comment -

          Oh, ok.  I just spent some time getting these tests to not run on 6.6.0.  Sure, will make this test change.

          Show
          graham.pople Graham Pople added a comment - Oh, ok.  I just spent some time getting these tests to not run on 6.6.0.  Sure, will make this test change.
          Hide
          murtadha.hubail Murtadha Hubail added a comment -

          Sorry for the late update. We had the fix ready but were waiting for the target version decision.

          Show
          murtadha.hubail Murtadha Hubail added a comment - Sorry for the late update. We had the fix ready but were waiting for the target version decision.
          Hide
          till Till Westmann added a comment - - edited

          Description for release notes:

          Summary: If an identifier for a metadata entity (e.g. a dataverse or a dataset) contains characters that require URL encoding (percent-encoding) when used in a URI, requests that use this identifier can fail with an URISyntaxException.

          Workaround: Construct identifiers using characters that do not require URL encoding.

          Show
          till Till Westmann added a comment - - edited Description for release notes: Summary: If an identifier for a metadata entity (e.g. a dataverse or a dataset) contains characters that require URL encoding (percent-encoding) when used in a URI, requests that use this identifier can fail with an URISyntaxException. Workaround: Construct identifiers using characters that do not require URL encoding.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.6.1-9007 contains cbas-core commit c35a599 with commit message:
          MB-40576: url encode metakv paths

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.1-9007 contains cbas-core commit c35a599 with commit message: MB-40576 : url encode metakv paths
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-7.0.0-2970 contains cbas-core commit c35a599 with commit message:
          MB-40576: url encode metakv paths

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-2970 contains cbas-core commit c35a599 with commit message: MB-40576 : url encode metakv paths
          Hide
          ritam.sharma Ritam Sharma added a comment -

          Arunkumar Senthilnathan - Please validate this defect on SDK CI.

          Show
          ritam.sharma Ritam Sharma added a comment - Arunkumar Senthilnathan - Please validate this defect on SDK CI.
          Hide
          arunkumar Arunkumar Senthilnathan added a comment -

          Graham Pople 6.6-stable points to 6.6.1-9133 - but I don't see com.couchbase.client.java.manager.analytics.AnalyticsIndexManagerIntegrationTest passing in CI - but the stack trace is different though - please take a look at http://sdk.jenkins.couchbase.com/blue/organizations/jenkins/jvm%2Fjvm-clients%2Fcouchbase-jvm-clients-scipted-build-pipeline/detail/couchbase-jvm-clients-scipted-build-pipeline/545/tests and see if this issue can be closed

          Show
          arunkumar Arunkumar Senthilnathan added a comment - Graham Pople 6.6-stable points to 6.6.1-9133 - but I don't see com.couchbase.client.java.manager.analytics.AnalyticsIndexManagerIntegrationTest passing in CI - but the stack trace is different though - please take a look at http://sdk.jenkins.couchbase.com/blue/organizations/jenkins/jvm%2Fjvm-clients%2Fcouchbase-jvm-clients-scipted-build-pipeline/detail/couchbase-jvm-clients-scipted-build-pipeline/545/tests and see if this issue can be closed
          Hide
          graham.pople Graham Pople added a comment -

          Arunkumar Senthilnathan yes that failing test looks different.  At a very quick triage we're not getting back any pending mutations from cbas (endpoint /analytics/node/agg/stats/remaining), after creating a dataset and connecting a link, but we expect one.  99% sure it's unrelated to this ticket and we can close this one out.

          Show
          graham.pople Graham Pople added a comment - Arunkumar Senthilnathan  yes that failing test looks different.  At a very quick triage we're not getting back any pending mutations from cbas (endpoint /analytics/node/agg/stats/remaining), after creating a dataset and connecting a link, but we expect one.  99% sure it's unrelated to this ticket and we can close this one out.
          Hide
          arunkumar Arunkumar Senthilnathan added a comment -

          Closing this issue as per comment above

          Show
          arunkumar Arunkumar Senthilnathan added a comment - Closing this issue as per comment above
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.6.2-9599 contains cbas-core commit c35a599 with commit message:
          MB-40576: url encode metakv paths

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.2-9599 contains cbas-core commit c35a599 with commit message: MB-40576 : url encode metakv paths

            People

            Assignee:
            graham.pople Graham Pople
            Reporter:
            graham.pople Graham Pople
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                PagerDuty