Ticket #1918 (closed bug: fixed)

Opened 2 years ago

Last modified 21 months ago

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: Platform: All
Blocking:

Description

r24356

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

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

Change History

Changed 2 years ago by bonefish

Changed 2 years ago by bonefish

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

Changed 2 years ago by thorn

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

Changed 2 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.

Changed 2 years ago by anevilyak

  • cc anevilyak added

Changed 2 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.

Changed 2 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.

Changed 2 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.

Changed 22 months ago by bonefish

  • owner changed from jackburton to bonefish
  • status changed from new to assigned

Changed 21 months ago by bonefish

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r25881. 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.