You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Mike Drob (Jira)" <ji...@apache.org> on 2022/05/19 19:13:00 UTC

[jira] [Resolved] (SOLR-16191) Sanity-check assumptions about Linux `ps` command in `solr/bin/solr` script

     [ https://issues.apache.org/jira/browse/SOLR-16191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Drob resolved SOLR-16191.
------------------------------
    Fix Version/s: main (10.0)
       Resolution: Fixed

> Sanity-check assumptions about Linux `ps` command in `solr/bin/solr` script
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-16191
>                 URL: https://issues.apache.org/jira/browse/SOLR-16191
>             Project: Solr
>          Issue Type: Improvement
>          Components: scripts and tools
>    Affects Versions: 9.0, 8.11.2, main (10.0)
>            Reporter: Michael Gibney
>            Assignee: Mike Drob
>            Priority: Minor
>             Fix For: 8.11.2, 9.1, main (10.0), 9.0.1
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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|https://github.com/apache/solr/blob/f5e927ed1ed9cb43ac843cac4e12b6edc1b8a904/solr/bin/solr#L58-L63] because of utility version incompatibility, but perhaps we could also/instead add "walks like a duck" sanity-check, e.g.:
> {code:sh}
> if [ "$$" != "`ps -o pid='' $$`" ]; then
>   exit 1
> fi
> {code}
> 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!



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org