Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 2010 22:59:28 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Carl Johnson <carlj@peak.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Bash lockups
Message-ID:  <8739xlnhzz.fsf@kobe.laptop>
In-Reply-To: <87pr0przea.fsf@cjlinux.localnet> (Carl Johnson's message of "Fri, 21 May 2010 09:30:05 -0700")
References:  <877hmzbi1f.fsf@cjlinux.localnet> <878w7d7qbb.fsf@kobe.laptop> <87pr0przea.fsf@cjlinux.localnet>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 21 May 2010 09:30:05 -0700, Carl Johnson <carlj@peak.org> wrote:
> Giorgos Keramidas <keramida@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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8739xlnhzz.fsf>