[
https://issues.apache.org/jira/browse/SOLR-14442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17109094#comment-17109094
]
Mikhail Khludnev commented on SOLR-14442:
-----------------------------------------
Hi, [~cpoerschke]. Thanks for your effort. But it turns to be little bit more
complicated. I truned {{echo on}} for {{.cmd}} before exercise. That how the
stopping attempt looks like
{code}
REM Attempt jstack before killing the process
IF EXIST "C:\Program Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin\jstack.exe" (
"C:\Program Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin\jstack.exe" %N
)
taskkill /f /PID %N
) ) )
) )
)
Stopping Solr process 5860 running on port 8983
Waiting for 0 seconds, press a key to continue ...
C:\Users\Mikhail_Khludnev\git\lucene-solr\solr>ENDLOCAL
{code}
And it's over. Note: no jstack output. It seems like it's killed process
afterwards.
But it doesn't. Notice PID in Task Manager
!screenshot-1.png!
That java process is still hanging that lock solr.log and prevent bootstrapping
solr again. And ... _hardly belive_..
I can {{jstack}} it
{{code}}
C:\Users\Mikhail_Khludnev\git\lucene-solr\solr>"C:\Program
Files\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin\jstack.exe" 5860
2020-05-16 17:54:32
Full thread dump OpenJDK 64-Bit Server VM (11.0.6+10 mixed mode):
{{code}}
Threads are really interesting, There's no query exec thread which is expected
to hang on {{sleep()}}
Then, can {{taskkill /F}} it successfully
{{code}}
taskkill /F /PID 5860
SUCCESS: The process with PID 5860 has been terminated.
{{code}}
It's dead after it. The only idea I have is suspicious {{%N}} Does it work as
var substitution in CMD?
> bin/solr to attempt jstack before killing hung Solr instance
> ------------------------------------------------------------
>
> Key: SOLR-14442
> URL: https://issues.apache.org/jira/browse/SOLR-14442
> Project: Solr
> Issue Type: Improvement
> Reporter: Christine Poerschke
> Assignee: Christine Poerschke
> Priority: Minor
> Attachments: SOLR-14442.patch, SOLR-14442.patch, screenshot-1.png
>
>
> If a Solr instance did not respond to the 'stop' command in a timely manner
> then the {{bin/solr}} script will attempt to forcefully kill it:
> [https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.5.1/solr/bin/solr#L859]
> Gathering of information (e.g. a jstack of the java process) before the kill
> command may be helpful in determining why the instance did not stop as
> expected.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]