rcornwell / sims

Burroughs B5500, ICL1900, SEL32, IBM 360/370, IBM 7000 and DEC PDP10 KA10/KI10/KL10/KS10, PDP6 simulators for SimH
http://sky-visions.com
95 stars 20 forks source link

KL10: DTE20 TTY hangs #266

Closed larsbrinkhoff closed 3 years ago

larsbrinkhoff commented 3 years ago

I build a KL10 ITS the other day. When I logged in from a DTE20 TTY line, it was ok at first but then the emulator hung.

Symptoms:

larsbrinkhoff commented 3 years ago

How to repeat:

  1. Build KL ITS.
  2. Boot, type $L ITS, then $G to start ITS.
  3. Telnet localhost 10015.
  4. ^Z to login.
  5. .^F to list files in the . directory. Bam!
larsbrinkhoff commented 3 years ago

I tested telnet to port 10007 and it seemed to work fine. Then I tested the VT52 port 10018 and it hung the same way.

larsbrinkhoff commented 3 years ago

Tested 10007 again, no problem. Plain telnet to 10018 hung.

SIMH spinning at 100% CPU.

larsbrinkhoff commented 3 years ago

Triggered the hang, here's the backtrace:

#0  0x0000000000487417 in tmxr_putc_ln ()
#1  0x0000000000430364 in ttyo_svc ()
#2  0x000000000045033b in sim_process_event.part ()
#3  0x000000000040f824 in sim_instr ()
#4  0x000000000045aea6 in run_cmd ()
#5  0x0000000000458f94 in do_cmd_label ()
#6  0x000000000040505c in main ()
larsbrinkhoff commented 3 years ago

With DEBUG=1.


#0  sim_tt_outcvt (c=50, mode=17) at ./sim_console.c:3011
#1  0x000000000043c17e in ttyo_svc (uptr=0x739040 <tty_unit+256>)
    at ./PDP10/kl10_fe.c:2298
#2  0x0000000000463964 in sim_process_event () at ./scp.c:11746
#3  0x00000000004078e7 in sim_instr () at ./PDP10/kx10_cpu.c:4342
#4  0x000000000045c4bd in run_cmd (flag=1, cptr=0x7fffffff01b2 "")
    at ./scp.c:9078
#5  0x000000000044af28 in do_cmd_label (flag=0, 
    fcptr=0x7fffffff9680 "build/pdp10-kl/run", label=0x0) at ./scp.c:4180
#6  0x000000000044a1d0 in do_cmd (flag=0, 
    fcptr=0x7fffffff9680 "build/pdp10-kl/run") at ./scp.c:4004
#7  0x00000000004451d7 in main (argc=2, argv=0x27ad010) at ./scp.c:2910
larsbrinkhoff commented 3 years ago

I poked at the ttyo_svc in various ways without pretending any deeper understanding. I tried various replacements for the continue statements in the while loop, but the only thing that worked is replacing continue with break.

While this avoids the hang, it's probably just papering over the problem. If I type ^F repeatedly to get more output there is an occasional pause and this typed to the console TTY:

TTY: TIMEOUT ON OUTPUT XFER TO DTE, DTEBBY 1015,,100  16:29:08
rcornwell commented 3 years ago

Try this: --- a/PDP10/kl10_fe.c +++ b/PDP10/kl10_fe.c @@ -2275,6 +2275,7 @@ t_stat ttyo_svc (UNIT uptr) t_stat r; int32 ln; TMLN lp;

--

Richard Cornwell @.*** http://sky-visions.com LinkedIn: https://www.linkedin.com/in/richard-cornwell-991076107

larsbrinkhoff commented 3 years ago

Checks out ok. Thanks!

larsbrinkhoff commented 3 years ago

Verified with latest ITS and KL10 emulator.