Ticket #1918 (closed bug: fixed)

Opened 8 months ago

Last modified 6 months ago

Terminal Deadlock When TTY Buffer Full

Reported by: bonefish Owned by: bonefish
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1 development
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 (5.7 kB) - added by bonefish 8 months ago.

Change History

Changed 8 months ago by bonefish

Changed 8 months ago by bonefish

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

Changed 8 months ago by thorn

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

Changed 8 months 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 8 months ago by anevilyak

  • cc anevilyak added

Changed 8 months 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 8 months 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 8 months 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 6 months ago by bonefish

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

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