Bash lockups
Giorgos Keramidas
keramida at ceid.upatras.gr
Fri May 21 20:00:00 UTC 2010
On Fri, 21 May 2010 09:30:05 -0700, Carl Johnson <carlj at peak.org> wrote:
> Giorgos Keramidas <keramida at ceid.upatras.gr> writes:
>> Does this lock-up happen if you leave the shell 'idle' for too long
>> over an ssh session? There may be problems with stateful connection
>> tracking between your terminal and the remote shell :-/
>
> No, I don't think that could be the problem. I am just using ssh
> between local machines and there is no firewall between them. It also
> often seems to happen to a shell as I switch away from it to another
> one. One suspicion is that something is sending a signal to the shell
> as it switches, and bash sometimes doesn't handle that signal
> properly.
>
> I also should have mentioned that I have been running bash as my
> default shell for years under Linux and have never seen this problem
> there.
>
> Thanks for the suggestion.
That's ok. If you can attach to the bash process with ktrace please try
to grab a ktrace file from a deadlocked shell. We may be able to see
why it gets deadlocked by running kdump(8) on the shell trace file.
You can run a second shell under ktrace (and hope that the parent
doesn't deadlock before the traced child shell), by running:
bash$ ktrace -f bash.trace bash --login
When you exit from the child shell you can dump ktrace(8) events from
the bash.trace file with:
bash$ kdump -f bash.trace > logfile 2>&1
Looking near the last records dumped in 'logfile' should be quite
informative if the process is dead-locked or spinning around the same
code over and over again.
More information about the freebsd-questions
mailing list