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

on ^C javascript runner panics query with a SIGILL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.0.0
    • Cheshire-Cat
    • js-evaluator
    • None
    • Untriaged
    • 1
    • Yes

    Description

      I haven't been able to try this myself because I have a linux laptop and the issue only reproduces on mac, but, since the switch of the javascript evaluator to run in process, every time cbq-engine is killed with a SIGINT, it panics in os.Exit()

      Stacks are as follows:

      _time=2021-03-09T16:12:20.586-07:00 _level=INFO _msg=Shutting down immediately
      SIGILL: illegal instruction
       
      PC=0x7fff6b95a66e m=16 sigcode=1
       
      goroutine 0 [idle]:
      runtime.exit(0x0)
            /usr/local/Cellar/go/1.13.7/libexec/src/runtime/sys_darwin.go:220 +0x31 fp=0xc00092bc70 sp=0xc00092bc48 pc=0x4051951
      syscall.Exit(0x0)
            /usr/local/Cellar/go/1.13.7/libexec/src/runtime/runtime.go:64 +0x1b fp=0xc00092bc88 sp=0xc00092bc70 pc=0x404237b
      os.Exit(0x0)
            /usr/local/Cellar/go/1.13.7/libexec/src/os/proc.go:67 +0x30 fp=0xc00092bca0 sp=0xc00092bc88 pc=0x40d5d90
      main.signalCatcher(0xc0004723c0, 0xc00032d760)
            /Users/bingjie.miao/master/query1/src/github.com/couchbase/query/server/cbq-engine/main.go:415 +0x33e fp=0xc00092bd50 sp=0xc00092bca0 pc=0x525665e
      main.main()
            /Users/bingjie.miao/master/query1/src/github.com/couchbase/query/server/cbq-engine/main.go:385 +0xda0 fp=0xc00092bf60 sp=0xc00092bd50 pc=0x5255700
      runtime.main()
            /usr/local/Cellar/go/1.13.7/libexec/src/runtime/proc.go:203 +0x21e fp=0xc00092bfe0 sp=0xc00092bf60 pc=0x4034e7e
      runtime.goexit()
            /usr/local/Cellar/go/1.13.7/libexec/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc00092bfe8 sp=0xc00092bfe0 pc=0x4063031
      

      This does not happen if the evaluator is not started with

      n1ql_client.SingleInstance.Fetch()

      We do have a few instances where the query team needs to start a standalone query service, which then needs to be killed. The query engine shouldn't panic on exit.

      As I understand the repro is quite simple:
      On mac, fire a single node cluster, identify the cbq-engine process, sudo kill -INT on it.
      Linux, doesn't repro.
      Windows, untested.

      Attachments

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

        Activity

          People

            ajay.bhullar Ajay Bhullar
            marco.greco Marco Greco (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty