Opened 17 years ago

Closed 16 years ago

#1918 closed bug (fixed)

Terminal Deadlock When TTY Buffer Full

Reported by: bonefish Owned by: bonefish
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1/pre-alpha1
Keywords: Cc: anevilyak
Blocked By: Blocking:
Platform: All

Description

hrev24356

The Terminal can deadlock when the tty buffer runs full. Attached is a KDL session analyzing the situation. In short:

  • Window thread: Is in Shell::Write() writing to the TTY, blocking because the TTY buffer is full.
  • PtyReader thread: Is in TermParse::PtyReader(), blocking on fReaderLocker.
  • EscParse thread: Is in TermView::_Redraw(), blocking trying to lock the window.

May or may not be related to #1755. I can't unblock the Terminal by resizing/zooming the window, though, so it probably isn't.

Regarding how to reproduce it: I have seen this only once yet. I suppose it helps to have a command line program that prints a lot and type something at the same time.

Attachments (1)

kdl-session (5.7 KB ) - added by bonefish 17 years ago.

Download all attachments as: .zip

Change History (10)

by bonefish, 17 years ago

Attachment: kdl-session added

comment:1 by bonefish, 17 years ago

Just verified the way to reproduce the bug: "seq 100000" + hammering on the keyboard seems to be reliable.

comment:2 by thorn, 17 years ago

looks like fixed. I can't reproduce with "seq 100000"

comment:3 by anevilyak, 17 years ago

Possibly related to this, I noticed tail -f on syslog while doing a Haiku build goes dead after a while, no user interaction needed though.

comment:4 by anevilyak, 17 years ago

Cc: anevilyak added

comment:5 by mmlr, 17 years ago

The tail -f probably just ends because the syslog is full and a new syslog file is created. You should try tail -F instead as this will reopen the new syslog and follow it when it is exchanged.

comment:6 by anevilyak, 17 years ago

What's the size limit on syslog? It hadn't shown more than maybe 20-30 lines before it stopped. Also ctrl+c to terminate tail didn't work at that point.

comment:7 by mmlr, 17 years ago

The limit doesn't really matter, if it was 90% full it might have been exchanged after only a few new lines. But that you couldn't ctrl-c it would obviously be a bug.

comment:8 by bonefish, 16 years ago

Owner: changed from jackburton to bonefish
Status: newassigned

comment:9 by bonefish, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev25881. At least the original problem. If the syslog issue still exists (and actually was a problem), please open a new ticket.

Note: See TracTickets for help on using tickets.