Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16191

Sanity-check assumptions about Linux `ps` command in `solr/bin/solr` script

    XMLWordPrintableJSON

Details

    Description

      SOLR-15558 made more apparent some assumptions/implicit dependencies on the Linux ps command in the solr/bin/solr script. The script already disables running in cygwin because of utility version incompatibility, but perhaps we could also/instead add "walks like a duck" sanity-check, e.g.:

      if [ "$$" != "`ps -o pid='' $$`" ]; then
        exit 1
      fi
      

      The issue arose while running gradlew :solr:packaging:integrationTests for Alpine Linux with BusyBox ps installed, for which ps -o pid='' $WHATEVER dumps all running pids, regardless of the value of $WHATEVER. The behavior observed appeared mainly to affect solr stop, where the command watches for the PID to exit, but the pid is never detected as having exited. I'm not sure, it's possible that jstack/kill was being run against random PIDs!

      Attachments

        Issue Links

          Activity

            People

              mdrob Mike Drob
              magibney Michael Gibney
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h