Opened 11 years ago

Closed 11 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:
Has a Patch: no 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 11 years ago.

Download all attachments as: .zip

Change History (10)

Changed 11 years ago by bonefish

Attachment: kdl-session added

comment:1 Changed 11 years ago by bonefish

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

comment:2 Changed 11 years ago by thorn

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

comment:3 Changed 11 years ago by anevilyak

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 Changed 11 years ago by anevilyak

Cc: anevilyak added

comment:5 Changed 11 years ago by mmlr

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 Changed 11 years ago by anevilyak

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 Changed 11 years ago by mmlr

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 Changed 11 years ago by bonefish

Owner: changed from jackburton to bonefish
Status: newassigned

comment:9 Changed 11 years ago by bonefish

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.