CAC 2017-10-10

fixing threadz fault in idle process

iniitialize_faults.pl1

/* entry for connect faults */
          fv.f_tra_ptr (FAULT_NO_CON) = codeptr (prds$fast_connect_code);
          fv.f_scu_ptr (FAULT_NO_CON) = addr (prds$fim_data.scu);
bound_interceptors                 34  (0, 0, 0) read execute privileged encacheable wired
     fim                                         wired length: 3072 words;
     wired_fim                        iom_interrupt                    fim_util                         sys_trouble

sys_trouble                       3470    366      0      4   1212    252

          segdef    sys_trouble
sys_trouble:

So system_trouble entry point should be at 034:03470

Error:  Illegal cross ring transfer by ipc_real_$full_block|5541 
(>sl1>bound_ipc_)
referencing pl1_operators_|7747 (>sl1>bound_library_wired_|30257)
Transfer instructions cannot be used to cross rings
only call and rtcd instructions may be used.
r 13:40 0.784 0 level 2
(gdb) p/o cpus[0].PPR
$2 = {PRR = 0, PSR = 034, P = 01, IC = 03502}
(gdb) p hdbgPrint ()
$3 = void

DBG(534694)> CPU TRACE: 00034:002230 0 002210254220 (SPRI 002210,N*)
DBG(534694)> CPU TRACE: 00034:002231 0 002210352220 (EPP2 002210,N*)
DBG(534694)> CPU TRACE: 00034:002232 0 200020753300 (SREG PR2|20)
DBG(534694)> CPU TRACE: 00034:002233 0 200050447700 (SPL PR2|50)
DBG(534694)> CPU TRACE: 00034:002234 0 002226370220 (EPP4 002226,N*)
DBG(534694)> CPU TRACE: 00034:002235 0 003364700200 (TSX0 003364)

    000020                         150  connect_handler:    
    000020  0a   000000 2542 20    151            spri      prs,*               save prs
    000021  0a   000000 3522 20    152            eppbp     prs,*               bp -> place for machine conditions
    000022  aa  2 00020 7533 00    153            sreg      bp|mc.regs          save regs 
    000023  aa  2 00050 4477 00    154            spl       bp|mc.eis_info      save EIS ptrs and lgths
    000024  0a   000016 3702 20    155            epplp     my_linkage_ptr,*    set up linkage ptr
                                   156
    000025  4a  4 00012 7003 20    157            tsx0      fim_util$v_time_init  start virtual time metering

DBG(534694)> CPU TRACE: 00034:003364 0 003414707200 (TSX7 003414)

    000374                         499  v_time_init:
    000374  0a   000424 7072 00    500            tsx7      get_times           get fault time and virtual time

DBG(534694)> CPU TRACE: 00034:003414 0 400174633320 (RCCL PR4|174,N*)
DBG(534694)> CPU TRACE: 00034:003415 0 200046757300 (STAQ PR2|46)
DBG(534694)> CPU TRACE: 00034:003416 0 400336177320 (SBAQ PR4|336,N*)
DBG(534694)> CPU TRACE: 00034:003417 0 000000710217 (TRA 000000,7)

    000424                         537  get_times:
    000424  4a  4 00140 6333 20    538            rccl      sys_info$clock_,*   read the clock
    000425  aa  2 00046 7573 00    539            staq      bp|mc.fault_time    save time of fault/interrupt
    000426  4a  4 00142 1773 20    540            sbaq      pds$cpu_time        compute virtual time
    000427  aa   000000 7102 17    541            tra       0,7                 return to caller

DBG(534694)> CPU TRACE: 00034:003365 0 000000634207 (LDI 000000,DL)
DBG(534694)> CPU TRACE: 00034:003366 0 400330054320 (AOS PR4|330,N*)
DBG(534694)> CPU TRACE: 00034:003367 0 000000605610 (TPNZ 000000,0)
DBG(534694)> CPU TRACE: 00034:003370 0 400332757320 (STAQ PR4|332,N*)
DBG(534694)> CPU TRACE: 00034:003371 0 000000710210 (TRA 000000,0)

    000375  aa   000000 6342 07    502            ldi       0,dl                clear indicators as a service to our caller
    000376  4a  4 00126 0543 20    503            aos       pds$vtime_count     step virtual time count
    000377  aa   000000 6056 10    504            tpnz      0,0                 if already set, don't meter
                                   505
    000400  4a  4 00130 7573 20    506            staq      pds$time_v_temp     save for later
    000401  aa   000000 7102 10    507            tra       0,0

DBG(534694)> CPU TRACE: 00034:002236 0 400156235320 (LDA PR4|156,N*)
DBG(534694)> CPU TRACE: 00034:002237 0 400160315320 (CANA PR4|160,N*)
DBG(534694)> CPU TRACE: 00034:002240 0 003502601200 (TNZ 003502)

    000026  4a  4 00014 2353 20    159            lda       scs$sys_trouble_pending  system trouble?
    000027  4a  4 00016 3153 20    160            cana      prds$processor_pattern  for this CPU?
    000030  4a  4 00020 6013 20    161            tnz       sys_trouble$sys_trouble  go handle it
azm:  scs$sys_trouble_pending
bound_hc_data_wired$scs|203 (25|203):
Absolute Addr 120203 (Word 120203 in Mem a).
Thread 20 "CPU a" hit Hardware watchpoint 1: M[0120203]

Old value = 0
New value = 68719476733
core_write (addr=41091, data=68719476733, ctx=0x520657 "OPERAND_STORE")
    at dps8_cpu.c:2238
2238        if (watchBits [addr])
(gdb) p/o cpus[0].PPR
$1 = {PRR = 0, PSR = 034, P = 01, IC = 03050}

A timer runout in bound_355_wired

DBG(534645)> CPU TRACE: 00122:000730 0 301000315003 (CANA 301000,DU)
DBG(534645)> CPU TRACE: 00122:000731 0 000631600100 (TZE PR0|631)
DBG(534645)> CPU FAULT: Fault 4(04), sub 0(00), 'Timer runout'
DBG(534645)> CPU TRACE: 000732 0 000510657220 (SCU 000510,N*)
DBG(534645)> CPU TRACE: 000732 0 000410710220 (TRA 000410,N*)

And restart:

DBG(534694)> CPU TRACE: 00034:002463 0 002214613220 (RCU 002214,N*)
DBG(534694)> CPU TRACE: 00122:000732 0 600254371520 (EPP5 PR6|254,N*)
DBG(534694)> CPU FAULT: Fault 20(024), sub 1(01), 'acvFault: fetchDSPTW out of segment bounds fault'

fim:0

                                   105  " ACCESS_VIOLATION_ENTRY - Handle Access Violation Faults.
                                   106
                        000000     107            segdef    access_violation_entry
                                   108
                                   109            even
    000000                         110  access_violation_entry:
    000000  0a   001242 2542 20    111            spri      prs,*                         save prs
    000001  0a   001242 3522 20    112            eppbp     prs,*                         bp -> machine conditions
    000002  aa  2 00020 7533 00    113            sreg      bp|mc.regs                    save registers
    000003  0a   001240 3702 20    114            epplp     lp,*                          set lp value
    000004  aa  2 00050 4477 00    115            spl       bp|mc.eis_info                save eis ptrs and lengths
    000005  4a  4 00036 7003 20    116            tsx0      fim_util$fim_v_time_init      remember accrued virtual time

DBG(534694)> CPU TRACE: 000732 0 000550657220 (SCU 000550,N*)
DBG(534694)> CPU TRACE: 000732 0 000450710220 (TRA 000450,N*)
DBG(534694)> CPU TRACE: 00034:000000 0 001242254220 (SPRI 001242,N*)
DBG(534694)> CPU TRACE: 00034:000001 0 001242352220 (EPP2 001242,N*)
DBG(534694)> CPU TRACE: 00034:000002 0 200020753300 (SREG PR2|20)
DBG(534694)> CPU TRACE: 00034:000003 0 001240370220 (EPP4 001240,N*)
DBG(534694)> CPU TRACE: 00034:000004 0 200050447700 (SPL PR2|50)
DBG(534694)> CPU TRACE: 00034:000005 0 003373700200 (TSX0 003373)

    000403                         512  fim_v_time_init:
    000403  0a   000424 7072 00    513            tsx7      get_times           get times

DBG(534694)> CPU TRACE: 00034:003373 0 003414707200 (TSX7 003414)

    000424                         537  get_times:
    000424  4a  4 00140 6333 20    538            rccl      sys_info$clock_,*   read the clock
    000425  aa  2 00046 7573 00    539            staq      bp|mc.fault_time    save time of fault/interrupt
    000426  4a  4 00142 1773 20    540            sbaq      pds$cpu_time        compute virtual time
    000427  aa   000000 7102 17    541            tra       0,7                 return to caller

DBG(534694)> CPU TRACE: 00034:003414 0 400174633320 (RCCL PR4|174,N*)
DBG(534694)> CPU TRACE: 00034:003415 0 200046757300 (STAQ PR2|46)
DBG(534694)> CPU TRACE: 00034:003416 0 400336177320 (SBAQ PR4|336,N*)
DBG(534694)> CPU TRACE: 00034:003417 0 000000710217 (TRA 000000,7)

    000403                                       512  fim_v_time_init:    
    000403  0a   000424 7072 00    513            tsx7      get_times           get times 
                                   514
    000404  aa   000000 6342 07    515            ldi       0,dl                clear indicators as a service to our caller
    000405  4a  4 00126 2343 20    516            szn       pds$vtime_count     metering already?
    000406  aa   000000 6052 10    517            tpl       0,0                 if so, return
                                   518
    000407  4a  4 00132 7573 20    519            staq      pds$fim_v_temp      save current virtual time
    000410  4a  4 00134 2373 20    520            ldaq      pds$virtual_delta   save current delta
    000411  4a  4 00136 7573 20    521            staq      pds$fim_v_delta     ..
    000412  aa   000000 7102 10    522            tra       0,0                 and return to caller

DBG(534694)> CPU TRACE: 00034:003374 0 000000634207 (LDI 000000,DL)
DBG(534694)> CPU TRACE: 00034:003375 0 400330234320 (SZN PR4|330,N*)
DBG(534694)> CPU TRACE: 00034:003376 0 000000605210 (TPL 000000,0)
DBG(534694)> CPU TRACE: 00034:003377 0 400060757320 (STAQ PR4|60,N*)
DBG(534694)> CPU TRACE: 00034:003400 0 400334237320 (LDAQ PR4|334,N*)
DBG(534694)> CPU TRACE: 00034:003401 0 400062757320 (STAQ PR4|62,N*)
DBG(534694)> CPU TRACE: 00034:003402 0 000000710210 (TRA 000000,0)

    000006  4a  4 00040 7003 20    117            tsx0      fim_util$check_fault  is it OK to take this fault?

DBG(534694)> CPU TRACE: 00034:000006 0 002770700200 (TSX0 002770)

    000000                          79  check_fault:
    000000  4a  4 00012 2373 20     80            ldaq      pds$apt_ptr         get pointer to our APT entry
    000001  4a  4 00014 1173 20     81            cmpaq     prds$idle_ptr       are we in idle process?
    000002  0a   000046 6002 00     82            tze       idle_trouble        if so, stop the entire system at once

DBG(534694)> CPU TRACE: 00034:002770 0 400236237320 (LDAQ PR4|236,N*)
DBG(534694)> CPU TRACE: 00034:002771 0 400240117320 (CMPAQ PR4|240,N*)
DBG(534694)> CPU TRACE: 00034:002772 0 003036600200 (TZE 003036)

And we're down...

DBG(534694)> CPU TRACE: 00034:003036 0 000003335207 (LCA 000003,DL)
DBG(534694)> CPU TRACE: 00034:003037 0 003050710200 (TRA 003050)
DBG(534694)> CPU TRACE: 00034:003050 0 400156755320 (STA PR4|156,N*)
DBG(534694)> CPU TRACE: 00034:003051 0 400176235320 (LDA PR4|176,N*)
DBG(534694)> CPU TRACE: 00034:003052 0 400200354320 (STAC PR4|200,N*)
DBG(534694)> CPU TRACE: 00034:003053 0 003203701200 (TSX1 003203)
DBG(534694)> CPU TRACE: 00034:003203 0 200046237300 (LDAQ PR2|46)
DBG(534694)> CPU TRACE: 00034:003204 0 777777375207 (ANA 777777,DL)
DBG(534694)> CPU TRACE: 00034:003204 0 777777375207 (ANA 777777,DL)
DBG(534694)> CPU TRACE: 00034:003205 0 400264117320 (CMPAQ PR4|264,N*)
DBG(534694)> CPU TRACE: 00034:003206 0 000000604611 (TMOZ 000000,1)
DBG(534694)> CPU TRACE: 00034:003207 0 400264757320 (STAQ PR4|264,N*)
DBG(534694)> CPU TRACE: 00034:003210 0 200044452301 (SCPR PR2|44,AU)
DBG(534694)> CPU TRACE: 00034:003211 0 200044237300 (LDAQ PR2|44)
DBG(534694)> CPU TRACE: 00034:003212 0 200045755300 (STA PR2|45)
DBG(534694)> CPU TRACE: 00034:003213 0 000002231200 (RSW 000002)
DBG(534694)> CPU TRACE: 00034:003214 0 000036771200 (ARL 000036)
DBG(534694)> CPU TRACE: 00034:003215 0 000003375207 (ANA 000003,DL)
DBG(534694)> CPU TRACE: 00034:003216 0 000000624205 (EAX4 000000,AL)
DBG(534694)> CPU TRACE: 00034:003217 0 000003773200 (LRL 000003)
DBG(534694)> CPU TRACE: 00034:003220 0 200046752370 (STCQ PR2|46,*0)
DBG(534694)> CPU TRACE: 00034:003221 0 400044235320 (LDA PR4|44,N*)
DBG(534694)> CPU TRACE: 00034:003222 0 003241716205 (XEC 003241,AL)
DBG(534694)> CPU TRACE: 00034:003222 0 400266371720 (EPP5 PR4|266,N*)
DBG(534694)> CPU TRACE: 00034:003223 0 200045235300 (LDA PR2|45)
DBG(534694)> CPU TRACE: 00034:003224 0 000010375207 (ANA 000010,DL)
DBG(534694)> CPU TRACE: 00034:003225 0 003227600200 (TZE 003227)
DBG(534694)> CPU TRACE: 00034:003227 0 077774376203 (ANQ 077774,DU)
DBG(534694)> CPU TRACE: 00034:003230 0 000000600211 (TZE 000000,1)
DBG(534694)> CPU TRACE: 00034:003054 0 400106235320 (LDA PR4|106,N*)
DBG(534694)> CPU TRACE: 00034:003055 0 000002115207 (CMPA 000002,DL)
DBG(534694)> CPU TRACE: 00034:003056 0 003502604600 (TMOZ 003502)
DBG(534694)> CPU TRACE: 00034:003057 0 400044721320 (LXL1 PR4|44,N*)
DBG(534694)> CPU TRACE: 00034:003060 0 400116015320 (CIOC PR4|116,N*)
DBG(534694)> CPU TRACE: 00034:003061 0 003061616200 (DIS 003061)
DBG(534694)> CPU FAULT: Fault 8(010), sub 0(00), 'Connect'
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License