Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-722

PuppetDB response hanging on select-nodes subquery

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDB 2.1.0
    • Fix Version/s: PDB 3.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      OSX 10.9.3

      Description

      Running the following query causes PuppetDB to hang for some time before responding with "curl: (52) Empty reply from server"

      Maybe it should send an empty list instead (or raise an exception if the query is malformed.)

      Query:

      curl -X GET 'http://localhost:8080/v3/facts' --data-urlencode 'query=["and", ["=", "name", "swapfree"], ["in", "name", ["extract", ["parameter", "name"], ["select-nodes", ["=",     ["parameter", "name"], "mbp.corp.puppetlabs.net"]]]]]'
      

      Traceback:

      java.lang.AssertionError: Assert failed: (string? field)
              at com.puppetlabs.puppetdb.query$compile_extract.invoke(query.clj:330) ~[na:na]
              at clojure.lang.AFn.applyToHelper(AFn.java:165) ~[clojure-1.6.0.jar:na]
              at clojure.lang.AFn.applyTo(AFn.java:144) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:628) ~[clojure-1.6.0.jar:na]
              at clojure.core$partial$fn__4230.doInvoke(core.clj:2470) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.applyTo(RestFn.java:137) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:na]
              at com.puppetlabs.puppetdb.query$compile_term.invoke(query.clj:145) ~[na:na]
              at com.puppetlabs.puppetdb.query$compile_in.invoke(query.clj:360) ~[na:na]
              at clojure.lang.AFn.applyToHelper(AFn.java:171) ~[clojure-1.6.0.jar:na]
              at clojure.lang.AFn.applyTo(AFn.java:144) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:630) ~[clojure-1.6.0.jar:na]
              at clojure.core$partial$fn__4232.doInvoke(core.clj:2472) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.applyTo(RestFn.java:137) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:na]
              at com.puppetlabs.puppetdb.query$compile_term.invoke(query.clj:145) ~[na:na]
              at com.puppetlabs.puppetdb.query$compile_boolean_operator_STAR_$fn__6918.invoke(query.clj:158) ~[na:na]
              at clojure.core$map$fn__4245.invoke(core.clj:2557) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RT.seq(RT.java:484) ~[clojure-1.6.0.jar:na]
              at clojure.core$seq.invoke(core.clj:133) ~[clojure-1.6.0.jar:na]
              at clojure.core$map$fn__4245.invoke(core.clj:2551) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RT.seq(RT.java:484) ~[clojure-1.6.0.jar:na]
              at clojure.core$seq.invoke(core.clj:133) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:na]
              at clojure.core$mapcat.doInvoke(core.clj:2586) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.invoke(RestFn.java:423) ~[clojure-1.6.0.jar:na]
      at com.puppetlabs.puppetdb.query$compile_boolean_operator_STAR_.doInvoke(query.clj:159) ~[na:na]                                                                    [62/1319]
              at clojure.lang.RestFn.applyTo(RestFn.java:142) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:626) ~[clojure-1.6.0.jar:na]
              at clojure.core$partial$fn__4228.doInvoke(core.clj:2468) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.applyTo(RestFn.java:137) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:626) ~[clojure-1.6.0.jar:na]
              at clojure.core$partial$fn__4228.doInvoke(core.clj:2468) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.applyTo(RestFn.java:137) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:na]
              at com.puppetlabs.puppetdb.query$compile_term.invoke(query.clj:145) ~[na:na]
              at com.puppetlabs.puppetdb.query$compile_boolean_operator_STAR_$fn__6918.invoke(query.clj:158) ~[na:na]
              at clojure.core$map$fn__4245.invoke(core.clj:2557) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RT.seq(RT.java:484) ~[clojure-1.6.0.jar:na]
              at clojure.core$seq.invoke(core.clj:133) ~[clojure-1.6.0.jar:na]
              at clojure.core$map$fn__4245.invoke(core.clj:2551) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.sval(LazySeq.java:40) ~[clojure-1.6.0.jar:na]
              at clojure.lang.LazySeq.seq(LazySeq.java:49) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RT.seq(RT.java:484) ~[clojure-1.6.0.jar:na]
              at clojure.core$seq.invoke(core.clj:133) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:na]
              at clojure.core$mapcat.doInvoke(core.clj:2586) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.invoke(RestFn.java:423) ~[clojure-1.6.0.jar:na]
              at com.puppetlabs.puppetdb.query$compile_boolean_operator_STAR_.doInvoke(query.clj:159) ~[na:na]
              at clojure.lang.RestFn.applyTo(RestFn.java:142) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:626) ~[clojure-1.6.0.jar:na]
              at clojure.core$partial$fn__4228.doInvoke(core.clj:2468) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.applyTo(RestFn.java:137) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:626) ~[clojure-1.6.0.jar:na]
              at clojure.core$partial$fn__4228.doInvoke(core.clj:2468) ~[clojure-1.6.0.jar:na]
              at clojure.lang.RestFn.applyTo(RestFn.java:137) ~[clojure-1.6.0.jar:na]
              at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:na]
              at com.puppetlabs.puppetdb.query$compile_term.invoke(query.clj:145) ~[na:na]
              at com.puppetlabs.puppetdb.query$fact_query__GT_sql.invoke(query.clj:385) ~[na:na]
              at com.puppetlabs.puppetdb.query.facts$facts_sql.invoke(facts.clj:40) ~[na:na]
              at com.puppetlabs.puppetdb.query.facts$query__GT_sql.invoke(facts.clj:56) ~[na:na]
              at com.puppetlabs.puppetdb.http.facts$produce_body$fn__11915.invoke(facts.clj:24) ~[na:na]
              at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6464$fn__6465.invoke(jdbc.clj:209) ~[na:na]
      at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:204) ~[na:na]                                                                                   [23/1319]
              at com.puppetlabs.jdbc$with_transacted_connection_fn$fn__6464.invoke(jdbc.clj:208) ~[na:na]
              at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186) ~[na:na]
              at com.puppetlabs.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:205) ~[na:na]
              at com.puppetlabs.puppetdb.http.facts$produce_body.invoke(facts.clj:21) ~[na:na]
              at com.puppetlabs.puppetdb.http.facts$query_app$fn__11926$fn__11929$fn__11934.invoke(facts.clj:46) ~[na:na]
              at clojure.core$comp$fn__4192.invoke(core.clj:2403) ~[clojure-1.6.0.jar:na]
              at com.puppetlabs.puppetdb.http.facts$query_app$fn__11926$fn__11929.invoke(facts.clj:39) ~[na:na]
              at net.cgrand.moustache$alter_request$fn__11763.invoke(moustache.clj:54) ~[na:na]
              at com.puppetlabs.puppetdb.http.facts$query_app$fn__11926.invoke(facts.clj:39) ~[na:na]
              at com.puppetlabs.middleware$validate_query_params$fn__11375.invoke(middleware.clj:155) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_paging_options$fn__11359.invoke(middleware.clj:94) ~[na:na]
              at com.puppetlabs.middleware$verify_accepts_content_type$fn__11364.invoke(middleware.clj:114) ~[na:na]
              at com.puppetlabs.puppetdb.http.facts$build_facts_app$fn__11945.invoke(facts.clj:51) ~[na:na]
              at com.puppetlabs.puppetdb.http.v3$v3_app$fn__12867.invoke(v3.clj:26) ~[na:na]
              at net.cgrand.moustache$alter_request$fn__11763.invoke(moustache.clj:54) ~[na:na]
              at com.puppetlabs.puppetdb.http.v3$v3_app.invoke(v3.clj:21) ~[na:na]
              at com.puppetlabs.puppetdb.http.server$routes$fn__13391$fn__13405.invoke(server.clj:48) ~[na:na]
              at net.cgrand.moustache$alter_request$fn__11763.invoke(moustache.clj:54) ~[na:na]
              at com.puppetlabs.puppetdb.http.server$routes$fn__13391.invoke(server.clj:48) ~[na:na]
              at ring.middleware.resource$wrap_resource$fn__13373.invoke(resource.clj:24) ~[na:na]
              at ring.middleware.params$wrap_params$fn__11706.invoke(params.clj:58) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_authorization$fn__11336.invoke(middleware.clj:40) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_certificate_cn$fn__11340.invoke(middleware.clj:55) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_default_body$fn__11344.invoke(middleware.clj:62) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_metrics_STAR_$fn__11391$fn__11400.invoke(middleware.clj:207) ~[na:na]
              at com.puppetlabs.utils.metrics$multitime_BANG__STAR_$fn__11058$fn__11059$fn__11060.invoke(metrics.clj:14) ~[na:na]
              at com.puppetlabs.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na]
              at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[metrics-core-2.0.1.jar:na]
              at com.puppetlabs.utils.metrics$multitime_BANG__STAR_$fn__11058$fn__11059.invoke(metrics.clj:14) ~[na:na]
              at com.puppetlabs.utils.metrics$multitime_BANG__STAR_$fn__11058$fn__11059$fn__11060.invoke(metrics.clj:14) ~[na:na]
              at com.puppetlabs.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source) ~[na:na]
              at com.yammer.metrics.core.Timer.time(Timer.java:91) ~[metrics-core-2.0.1.jar:na]
              at com.puppetlabs.utils.metrics$multitime_BANG__STAR_$fn__11058$fn__11059.invoke(metrics.clj:14) ~[na:na]
              at com.puppetlabs.utils.metrics$multitime_BANG__STAR_.invoke(metrics.clj:17) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_metrics_STAR_$fn__11391.invoke(middleware.clj:206) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_globals$fn__11348.invoke(middleware.clj:73) ~[na:na]
              at com.puppetlabs.middleware$wrap_with_debug_logging$fn__11332.invoke(middleware.clj:27) ~[na:na]
              at compojure.core$routing$fn__16513.invoke(core.clj:107) ~[na:na]
              at clojure.core$some.invoke(core.clj:2515) ~[clojure-1.6.0.jar:na]
              at compojure.core$routing.doInvoke(core.clj:107) ~[na:na]
              at clojure.lang.RestFn.invoke(RestFn.java:423) ~[clojure-1.6.0.jar:na]
              at com.puppetlabs.puppetdb.cli.services$start_puppetdb$fn__17904.invoke(services.clj:326) ~[na:na]
              at compojure.core$wrap_context$fn__16567.invoke(core.clj:165) ~[na:na]
              at compojure.core$if_route$fn__16491.invoke(core.clj:40) ~[na:na]
              at puppetlabs.trapperkeeper.services.webserver.jetty9_core$proxy_handler$fn__18161.invoke(jetty9_core.clj:66) ~[na:na]
              at puppetlabs.trapperkeeper.services.webserver.jetty9_core.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source) ~[na:na]
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1112) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1048) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.servlets.gzip.GzipHandler.handle(GzipHandler.java:325) ~[jetty-servlets-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.Server.handle(Server.java:459) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) ~[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505) ~[jetty-io-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) ~[jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115]
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) ~[jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115]
              at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  demonshi Andrii Nikitiuk
                  Reporter:
                  wyatt Wyatt Alt
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: