Ticket #1965 (closed bug: fixed)

Opened 2 months ago

Last modified 5 days ago

No Shell Prompt In Terminal

Reported by: bonefish Assigned to: axeld
Priority: normal Milestone: R1
Component: - General Version: R1 development
Cc: Platform: All

Description

r24604

Sometimes a Terminal comes up without a shell prompt. I've analyzed the situation and apparently the shell had received a SIGWINCH while it was in the allocator (free()) and held the lock. The signal handler it had installed earlier was invoked and this handler called malloc(), thus causing a deadlock when it tried to re-lock.

I'm not quite sure, who's to blame. I suppose the memory allocator can't really do anything about it -- temporarily blocking signals would be a little too expensive. So it would be either the Terminal, which maybe shouldn't cause a SIGWINCH that early, or the shell, which should be more careful about what signal handlers it has installed and what signals unblocked while allocating/freeing memory. I tend towards the latter, but also wonder why I've never seen this problem on other platforms before.

Change History

(follow-up: ↓ 2 ) 05/11/08 11:31:26 changed by bonefish

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r25452.

(in reply to: ↑ 1 ; follow-up: ↓ 3 ) 05/12/08 02:09:30 changed by jackburton

Replying to bonefish:

Fixed in r25452.

The fix is nice et all, but maybe we could at the same time delay the SIGWINCH in Terminal, though.

(in reply to: ↑ 2 ) 05/12/08 08:04:08 changed by bonefish

Replying to jackburton:

Replying to bonefish:

Fixed in r25452.


The fix is nice et all, but maybe we could at the same time delay the SIGWINCH in Terminal, though.

You mean wait with setting the tty window size? I don't know, why we should do that.