Process in T state does not want to die.....

Willem Jan Withagen wjw at digiware.nl
Thu Nov 28 19:13:41 UTC 2019


On 28-11-2019 12:04, Eugene Grosbein wrote:
> 28.11.2019 17:37, Willem Jan Withagen wrote:
>
>>> Process in state T is STOPPED and prohibited for execution.
>>> It cannot even process signal like SIGTERM or SIGKILL because they are queied waiting for continuation.
>>> You need to resume it with kill -CONT first.
>> Tried that several times, but does not really have any effect.
>> I could check and see if the signals (TERM, KILL) were waiting somewhere?
>> With procstat??
>>
>> But the original question was more for a way on preventing this state of affairs.
>> Because uptill now the only resolution was to reboot the server, which is not a nice
>> thing for a storage sollution.
>>
>> Hence the: how to debug? question.
> Sometimes background process is (mistakenly) started without closing/redirecting output
> and if it tries to print something, it might get stopped depending on used shell.
Oke, that could very wel be the case....
When starting it prints to console, but I also know it forks. And I have 
seen some dev discusion on
closing so they could be closing before the fork.

> Use ktrace/kdump to verify what's going on with the process if you can reproduce the problem.
> You did not specify which version you use. Sometimes flags shown by ps are wrong due to kernel bugs
> and corrupted process state flag and process is not really Stopped but Exiting for example.
Running 12.1-RELEASE:
FreeBSD cephtest 12.1-RELEASE-p1 FreeBSD 12.1-RELEASE-p1 GENERIC amd64

> ktrace/kdump should show if process got SIGSTOP/SIGTSTP really. And if SIGCONT was delivered.
Thanx for the suggestion, I'll try and read up.
It is a bit of work, but the problem is "easily" reproduced.

--WjW

>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"



More information about the freebsd-hackers mailing list