Apr 5, 1999 frc7v-cl1: Server Solaris 2.6、cc ドライバのテスト --- クライアントシステム上での cc ドライバのデバッグ#01(その19) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (http://www-online.kek.jp/~inoue/CAMAC/onl8v1-sol2.6-serv/ Cli1-CAMAC/debug-step19.txt) 高エネルギー加速器研究機構 素粒子原子核研究所 物理、オンライングループ 井上 栄二 (1). 現状確認 (A). 株式会社ロジックハウスの白田様より SPARC CPU-8VT と、VMEドライバ v2.3.1 を借用した。 (B). 株式会社ロジックハウスの白田様より Server Solaris 2.6 のシステム がインストールされているハードディスクを借用した。 (C). 借用したハードディスクのサーバ側のシステム設定を変更して、KEK の FP クラスタ上で立ち上げた。 (D). ファイルを直接修正する方法で、クライアント(その1)側のシステム 設定を変更したがクライアントは立ち上がれなかった。 (E). Solsticeを起動してホストマネージャを使って、frc7v-cl1ディスクレス クライアントの設定をやり直した。 (F). ディスクレス・クライアントのシステム、frc7v-cl1 が起動できること を確認した。 (G). frc7v-cl1 のシステムにVMEドライバ、FRCvme-2.3.1 をインストールし、 その後、frc7v-cl1 のシステム設定をやり直した。 (H). Solsticeを起動してホストマネージャを使って、frc7v-cl2ディスクレス クライアントの設定をやり直した。 (I). ディスクレス・クライアントのシステム、frc7v-cl2 が起動できること を確認した。 (J). frc7v-cl1、クライアントのシステムに ccドライバをインストールした。 (K). frc7v-cl1、クライアントのシステム上でサンプル・プログラムを実行 シングルアクションの 24ビットread/write は ok. LAM割り込み処理は、ok. ブロック転送 read/write は NG. (L). CPU-7Vのボードで FRCvme2.3.1 が正しく動作できることを確認した。 (M). frc8vt、サーバ・システムに ccドライバをインストールした。 (N). frc8vt、サーバ・システム上でンプル・プログラムを実行 シングルアクションの 24ビットread/write は ok. LAM割り込み処理は、ok. ブロック転送 read/write は 16 および 24ビットとも、ok. (O). 株式会社ロジックハウスの高橋様の修正された ccドライバを実行したが 状況に変化はなかった。 (P). 株式会社ロジックハウスの白田様の提案より、デスクレス・クライアント のシステムにローカル・ディスクをつなぎ、マウントした後で ccドライバ を実行したが状況に変化はなかった。 (Q). cam2 プログラムを実行すると、 cc.cプログラム中のどの命令を実行 した時にパニックを起こすのか調べた。 (R). 株式会社ロジックハウスの高橋様の提案より、savecore について調べる。 savecoreコマンドにより、vmcore.x および unix.x ファイルを入手した。 (S). ドライバ・プログラムが DMA完了の待ち状態のままになっているのを 確認 (T). cam2プログラムを frc8vt、frc7v-cl1上で実行して結果を調べた。    frc8vt上での実行: (1). cv_wait_sig()コールが入っていると、そこで待ち状態が続く。 (2). cv_wait_sig()コールが入っていないと、正常終了する。    frc7v-cl1上での実行: (1). cv_wait_sig()コールが入っていると、そこで待ち状態が続く。 (U). cv_wait_sig() を while文でループさせることで、シグナルを受け取れた (V). DMA 開始前に以前の割り込み信号が残って影響を与えていないことを 確認した。 (W). バーチャル・アドレス・スペースの割り当てを追加して動作させてみたが 症状は変わらない。 (X). cc->bp へのアクセスを camac_b()ルーチンでやらないようにしてみたが 症状は変わらない。 (Y). Soft State Managementルーチンを使ってみたが症状は変わらない。 (Z). minphys のバッファサイズを大きくして試してみたが症状は変わらない。 (2-A). camac_b()を呼び出す箇所で渡す値をチェックしたが症状は変わらない。 (2-B). クラッシュダンプのチェック。 physio()でエラー。 (2-C). cc_strategy()ルーチンをチェック。 physio()でエラー。 (2-D). cc_strategy()ルーチンのcv_wait() を mutexロックした。変化なし。 (2-E). クラッシュダンプのチェック。 camac_b+0x2d0アドレスでエラー。 0xf60b5080?i camac_b+0x2d0: ld [%l0], %l1 $q (2). ここでやるべきこと cc_device構造体へ cc_sys_statusを付加して調べる。 (3). cc_device構造体へ cc_sys_statusを付加して調べる 高橋さんからのメール ---ここから x.0,vmcore.0)をみると エラーの発生しているアドレスがcamac_b+0x2d0でした。 逆アセンブルしてみるとアドレスがcamac_b+0x230へ変わっているだけです。 どう考えても、cc_sys_statusのところで起きているとしか思えません。 添付ファイルのようにcc_sys_statusをcc_device構造体へ入れたときの状況は どうでしょうか? あと、こちらでcc.h上のCC_MINPHYS_SIZE 0x10000は最大で 768KB(0xc0000)と申しましたがこれは誤りでした。 正確には、minphysで処理可能なデータサイズは実際には最大124KB(0 x1f000)になります。 : ---ここまで cc.cファイルの修正 frc7v-cl1[51]% ls -l total 240 -rw------- 1 inoue staff 107792 Apr 5 1999 t67r.dat frc7v-cl1[52]% uudecode t67r.dat frc7v-cl1[53]% ls -l total 386 -rw-rw-rw- 1 inoue staff 74752 Apr 5 1999 cc.tar -rw------- 1 inoue staff 107792 Apr 5 1999 t67r.dat frc7v-cl1[54]% tar xvf cc.tar x cc.c, 73077 bytes, 143 tape blocks frc7v-cl1[55]% ls -l total 530 -rwxr----- 1 inoue staff 73077 Apr 5 12:41 cc.c* -rw-rw-rw- 1 inoue staff 74752 Apr 5 1999 cc.tar -rw------- 1 inoue staff 107792 Apr 5 1999 t67r.dat frc7v-cl1[56]% frc7v-cl1[58]% mv ../../cc.c ../../cc.c-Apr-5-1999 frc7v-cl1[59]% cp cc.c ../.. frc7v-cl1[60]% cd ../.. /export/home/frc7v-cl1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 frc7v-cl1[61]% diff cc.c-Apr-5-1999 cc.c 106a107 > int cc_sys_status; /* temporally system status storage */ 525c526 < static int cc_sys_status; /* temporally system status storage */ --- > /* static int cc_sys_status; temporally system status storage */ 642c643 < cc_sys_status = 0; --- > cc->cc_sys_status = 0; 752c753 < cc_sys_status == CC_STA_OK && --- > cc->cc_sys_status == CC_STA_OK && 840c841 < return cc_sys_status; --- > return cc->cc_sys_status; 1140c1141 < cc_sys_status = copyout((caddr_t)data_area, (caddr_t)cc->ptr_udata, --- > cc->cc_sys_status = copyout((caddr_t)data_area, (caddr_t)cc->ptr_udata, 1708c1709 < cc_sys_status = copyout((caddr_t)((u_short *)&cc->a_reg + 1), --- > cc->cc_sys_status = copyout((caddr_t)((u_short *)&cc->a_reg + 1), 1717c1718 < cc_sys_status = copyin((caddr_t)&ptr_prev_head[cc->ptr_list[1]-1], --- > cc->cc_sys_status = copyin((caddr_t)&ptr_prev_head[cc->ptr_list[1]-1], 1725c1726 < cc_sys_status = copyout((caddr_t)&cc->ptr_list[2], --- > cc->cc_sys_status = copyout((caddr_t)&cc->ptr_list[2], 2845c2846 < cc_sys_status = cc->bp->b_error; --- > cc->cc_sys_status = cc->bp->b_error; 2847c2848 < cmn_err(CE_NOTE," camac_b: debug step08. --- cc_sys_status = 0x%x", cc_sys _status); --- > cmn_err(CE_NOTE," camac_b: debug step08. --- cc_sys_status = 0x%x", cc->cc _sys_status); frc7v-cl1[62]% cc.hファイルを修正する。 frc7v-cl1[69]% mv cc.h cc.h-Apr-5-1999 frc7v-cl1[70]% cp cc.h-Apr-5-1999 cc.h frc7v-cl1[71]% vi cc.h : /* E.Inoue: begin */ /* #define CC_MINPHYS_SIZE 0x10000 */ /* max word count = 64k */ #define CC_MINPHYS_SIZE 0x1f000 /* max word count = 128k */ /* E.Inoue: end */ : "cc.h" 77 lines, 2861 characters frc7v-cl1[72]% cc.cファイルをコンパイルする。 frc7v-cl1[73]% pwd /export/home/frc7v-cl1/inoue/CAMAC/Driver/FORCE-5V-sol2.5 frc7v-cl1[74]% make ./script/cc_build.sh [Building for sun4m] rm -f cc.o frc7v-cl1[75]% cc および cc.confファイルをコピーし直す。 frc8vt# pwd /usr/kernel/drv frc8vt# ls -l cc* -rwxr-xr-x 1 root sys 61124 Apr 2 13:51 cc* -rwxr-xr-x 1 root sys 288 Apr 2 13:51 cc.conf* frc8vt# rcp frc7v-cl1:/export/home/frc7v-cl1/inoue/CAMAC/Driver/FORCE-5V-sol2.5/ cc . frc8vt# rcp frc7v-cl1:/export/home/frc7v-cl1/inoue/CAMAC/Driver/FORCE-5V-sol2.5/ cc.conf . frc8vt# ls -l cc* -rwxr-xr-x 1 root sys 60832 Apr 5 14:45 cc* -rwxr-xr-x 1 root sys 288 Apr 5 14:45 cc.conf* frc8vt# ccドライバをロードし直す。 frc7v-cl1# make unload ./script/cc_unload.sh [Removing CAMAC device driver] [Removing CAMAC device driver from system] [Deleting CAMAC device files] frc7v-cl1# make load ./script/cc_load.sh [Installing CAMAC device driver] cp: cannot create /usr/kernel/drv/cc: Read-only file system cp: cannot create /usr/kernel/drv/cc.conf: Read-only file system [Adding CAMAC device driver to system] [Configuring CAMAC device driver] [Making CAMAC device files] frc7v-cl1# cam2プログラムを実行する。 frc7v-cl1[45]% cam2 Input transfer mode (1:word 2:long word) >1 Input loop >5 Input mode (0:QSTOP 1:QIGNORE 2:QREPEAT 3:QSCAN) >1 Input data counts >5 Input n a f >3 0 0 cam2プログラムはここでフリーズした。 システムはパニックを起こしてリブートしてしまった。 以下はコンソール上のメッセージ。 NOTICE:B camac_A: D bugTRteA0P: --- enter ca acty() NOpICe: in: 0=39 3rp=10 f c0 0 0 NOTICE: 9camacbb: 8dbc ated02. --- caldrp=ysiof) NOTICE: c6_st0acegy: dfbfg5step03. --- enter cccstrat gmm) NOTIuE: cc_s_ratfgy:sre=ug step34.2--- found 6 e ramac rewd g TICE: c1_strategy: deb cam2: Data fault kernel read fault at addr=0xf60cff5c, pme=0x0 MMU sfsr=326: Invalid Address on supv data fetch at level 3 pte addr = 0xf608a43c, level = 3 wrong ctx/as ctx 0, as 0xf59143d0 wrong ctx/as 2 ctx 0, as 0xfd pid=935, pc=0xf60fe070, sp=0xfc09b928, psr=0x44010c5, context=0 g1-g7: f5900000, f026f0bc, a00, c00, 200, 1, f5fbc420 NtrIaE:ceounb ina3ckit=103c0 .O.ICE. c_stsatepy: d bu= s ep05fc---0start 9MA eOTICE:b c9_int2:8 Ca ltlp06. --ede ter fr_ontr() NOTICE:m cfintr6 0fb6g s0ep06a. ---dcc8,i terrfpt==xfc NOTICE: c09bntr: d9bu98, tep06b. -- cc->axecuting_rma_flag g= 0 NOTICE:s=cc0 ntr: deb2a s 6p06d. --- ac00pt inte rupt:freturn cc_cntr0) f1d18Eb acdstrate8y: fe0ug ste00000 -- retf5n DMb Called from f00bd3ac, fp=fc09ba70, args=f00000 5 600 2a fc09bb08 f5bf1d18 Called from f0068900, fp=fc09bb80, args=f5939b30 f5c826a4 22 3 22 3 Called from 11f30, fp=effff8c0, args=1 600 3f53c0 5 24a70 24a80 End traceback... panic: Data fault syncing file systems... 2 done 2850 static and sysmap kernel pages 104 dynamic kernel data pages 500 kernel-pageable pages 0 segkmap kernel pages 0 segvn kernel pages 287 current user process pages 3741 total pages (3741 chunks) dumping to vp f59444dc, offset 138048 3741 total pages, dump succeeded rebooting... Resetting ... screen not found. Can't open input device. Keyboard not present. Using tty for input and output. SPARC CPU-7V, No Keyboard ROM Rev. 2.15.1, 64 MB memory installed, Serial #9157050. Ethernet address 0:80:42:b:49:ba, Host ID: 808bb9ba. apply failed. Initializing Memory | Type help for more information ok ok boot net -r Boot device: /iommu/sbus/ledma@5,8400010/le@5,8c00000 File and args: -r 2dc00 hostname: frc7v-cl1 domainname: kek.jp root server: frc8vt root directory: /export/root/frc7v-cl1 SunOS Release 5.6 Version Generic_105181-05 [UNIX(R) System V Release 4.0] Copyright (c) 1983-1997, Sun Microsystems, Inc. configuring network interfaces: le0. Hostname: frc7v-cl1 Configuring the /devices directory FRCvme V2.3.1 VME Nexus (FGA-5000 FGA-5100) NOTICE: VME: slavewin at vme=0x0, size=0x100000 space=0x2d020617 CAMAC device driver V1.3x, 1991-1993 by Y.TAKEUCHI (T.I.T.) cc0 at VME0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 vmemem0 at VME0: vme32d16 0x0 vmemem1 at VME0: vme16d16 0x0 vmemem2 at VME0: vme24d16 0x0 vmemem3 at VME0: vme32d32 0x0 vmemem4 at VME0: vme16d32 0x0 vmemem5 at VME0: vme24d32 0x0 vmeplus0 at VME0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x 0 and vme24d32 0x0 and vme32d32 0x0 and space 0x2f offset 0x0 and space 0x6f offset 0x0 and space 0x10 offset 0x0 and space 0x11 offset 0x0 and space 0x50 offset 0x0 and space 0x51 offset 0x0 vmedma0 at VME0 vmefdma0 at VME0 vmedvma0 at VME0 vmectl0 at VME0 Configuring the /dev directory Configuring the /dev directory (compatibility devices) The system is coming up. Please wait. checking for crash dump...System went down at Mon Apr 5 14:47:12 1999 Saving 3741 pages of image in vmcore.43 3741 pages saved. Processing modules: Done. Constructing Namelist file: /var/crash/frc7v-cl1/unix.43 Namelist file complete. default ICCFP1.kek.jp done add net default: gateway ICCFP1 NIS domainname is kek.jp starting rpc services: rpcbind keyserv done. Setting netmask of le0 to 255.255.252.0 Setting default interface for multicast: add net 224.0.0.0: gateway frc7v-cl1 "/dev/swap" is not valid for swapping. It must be a block device or a regular file with the "save user text on execution" bit set. syslog service starting. syslogd: line 24: unexpected getnetconfig failure Print services started. volume management starting. Wnn6: Key License Server started.... Nihongo Multi Client Server (Wnn6 R2.30) Finished Reading Files The system is ready. frc7v-cl1 console login: ホームディレクトリをマウントする。 onlsun1[57]% !! rlogin frc7v-cl1 Password: No directory! Logging in with home=/ Last login: Mon Apr 5 14:05:51 from onlsun1.kek.jp Sun Microsystems Inc. SunOS 5.6 Generic August 1997 frc7v-cl1% su Password: # mount frc8vt:/export/home/frc8vt /export/home/frc7v-cl1 # frc7v-cl1% logout Connection closed. onlsun1[58]% !! rlogin frc7v-cl1 Last login: Mon Apr 5 14:53:05 from onlsun1.kek.jp Sun Microsystems Inc. SunOS 5.6 Generic August 1997 frc7v-cl1[33]% ls -l total 8 drwxr-xr-x 3 inoue staff 512 Feb 9 15:34 CAMAC/ drwxr-xr-x 3 inoue staff 512 Nov 6 11:07 FORCE/ drwxr-xr-x 2 inoue staff 512 Feb 18 10:29 Ktaka/ -rw------- 1 inoue staff 592 Feb 26 16:49 mbox frc7v-cl1[34]% クラッシュ・ファイルをチェックする。 frc7v-cl1[36]% adb -k unix.43 vmcore.43 physmem 3e2d $c complete_panic(0x0,0x4401ce0,0x0,0x44010e0,0x0,0xf5ae8f40) + 5c do_panic(0x1,0xfc09b78c,0x0,0x48010e0,0x8,0xf00) + a8 vcmn_err(0x3,0xf0269878,0xfc09b78c,0x3,0xffeec000,0x0) + 180 cmn_err(0x3,0xf0269878,0xfc09c,0x53,0x53,0xf025e400) + 1c die(0x9,0xfc09b8dc,0xf60cff5c,0x326,0x1,0xf0269878) + bc trap(0x0,0xfc09b8dc,0xf0000000,0x0,0x6,0x1) + 930 fault(?) + 84 physio(0x0,0xf028c49c,0xa,0x40,0xf59143d0,0xfc09bad8) camac_b(0x0,0x2a,0x600,0xfc09bad8,0xf00000,0xf5bf1d18) + 1e8 cc_write(0xf00000,0x5,0x600,0x2a,0xfc09bb08,0xf5bf1d18) + 430 writev(0xf5939b30) + 2b0 $ dump on /dev/dsk/c0t3d0s1 size 83988K pem: no event handler FRCvme V2.3.1 VME Nexus (FGA-5000 FGA-5100) NOTICE: VME: slavewin at vme=0x0, size=0x100000 space=0x2d020617 VME0 at sbus0: SBus slot 5 0xffffe00 sparc ipl 15, SBus level 1 sparc ipl 2, SBus level 2 sparc ipl 3, SBus level 3 sparc ipl 5, SBus level 4 sparc ipl 7, SBus level 5 sparc ipl 9, SBus level 6 sparc ipl 11, SBus level 7 sparc ipl 13 CAMAC device driver V1.3x, 1991-1993 by Y.TAKEUCHI (T.I.T.) cc0 at VME0: vme16d16 0xff00 VME level 4 vector 0xff sparc ipl 7 cc0 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/cc@2d,ff0 0 vmemem0 at VME0: vme32d16 0x0 vmemem0 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmeme m@d,0 vmemem1 at VME0: vme16d16 0x0 vmemem1 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmeme m@2d,0 vmemem2 at VME0: vme24d16 0x0 vmemem2 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmeme m@3d,0 vmemem3 at VME0: vme32d32 0x0 vmemem3 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmeme m@4d,0 vmemem4 at VME0: vme16d32 0x0 vmemem4 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmeme m@6d,0 vmemem5 at VME0: vme24d32 0x0 vmemem5 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmeme m@7d,0 sbusmem0 at sbus0: SBus slot 0 0x0 sbusmem0 is /iommu@0,10000000/sbus@0,10001000/sbusmem@0,0 sbusmem1 at sbus0: SBus slot 1 0x0 sbusmem1 is /iommu@0,10000000/sbus@0,10001000/sbusmem@1,0 sbusmem2 at sbus0: SBus slot 2 0x0 sbusmem2 is /iommu@0,10000000/sbus@0,10001000/sbusmem@2,0 sbusmem3 at sbus0: SBus slot 3 0x0 sbusmem3 is /iommu@0,10000000/sbus@0,10001000/sbusmem@3,0 sbusmem4 at sbus0: SBus slot 4 0x0 sbusmem4 is /iommu@0,10000000/sbus@0,10001000/sbusmem@4,0 sbusmem5 at sbus0: SBus slot 5 0x0 sbusmem5 is /iommu@0,10000000/sbus@0,10001000/sbusmem@5,0 SUNW,bpp0 at sbus0: SBus slot 5 0xc800000 SBus level 2 sparc ipl 3 SUNW,bpp0 is /iommu@0,10000000/sbus@0,10001000/SUNW,bpp@5,c80000 0 pseudo-device: winlock0 winlock0 is /pseudo/winlock@0 pseudo-device: lockstat0 lockstat0 is /pseudo/lockstat@0 pseudo-device: vol0 vol0 is /pseudo/vol@0 pseudo-device: llc10 llc10 is /pseudo/llc1@0 vmeplus0 at VME0: vme16d16 0x0 and vme24d16 0x0 and vme32d16 0x0 and vme16d32 0x0 and vme24d32 0x0 and vme32d32 0x0 and space 0x 2f offset 0x0 and space 0x6f offset 0x0 and space 0x10 offset 0x0 and space 0x11 offset 0x0 and space 0x50 offset 0x0 and space 0x51 offset 0x0 vmeplus0 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmep lus@2d,0 pseudo-device: pm0 pm0 is /pseudo/pm@0 vmedma0 at VME0 vmedma0 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmedm a vmefdma0 at VME0 vmefdma0 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmef dma vmedvma0 at VME0 vmedvma0 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmed vma vmectl0 at VME0 vmectl0 is /iommu@0,10000000/sbus@0,10001000/VME@5,ffffe00/vmect l sysconfig0: LCA is XC4003 compatible sysconfig0 at root: obio 0x71380000 sysconfig0 is /sysconfig@0,71380000 BAD TRAP: type=9 rp=fc09b8dc addr=f60cff5c mmu_fsr=326 rw=1 cam2: Data fault kernel read fault at addr=0xf60cff5c, pme=0x0 MMU sfsr=326: Invalid Address on supv data fetch at level 3 pte addr = 0xf608a43c, level = 3 wrong ctx/as ctx 0, as 0xf59143d0 wrong ctx/as 2 ctx 0, as 0xfd pid=935, pc=0xf60fe070, sp=0xfc09b928, psr=0x44010c5, context=0 g1-g7: f5900000, f026f0bc, a00, c00, 200, 1, f5fbc420 Begin traceback... sp = fc09b928 Called from f60f60d8, fp=fc09b998, args=0 2a 600 fc09bad8 f00000 f5bf1d18 Called from f00bd3ac, fp=fc09ba70, args=f00000 5 600 2a fc09bb08 f5bf1d18 Called from f0068900, fp=fc09bb80, args=f5939b30 f5c826a4 22 3 2 2 3 Called from 11f30, fp=effff8c0, args=1 600 3f53c0 5 24a70 24a80 End traceback... panic: Data fault syncing file systems... 2 done 2850 static and sysmap kernel pages 104 dynamic kernel data pages 500 kernel-pageable pages 0 segkmap kernel pages 0 segvn kernel pages 287 current user process pages 3741 total pages (3741 chunks) dumping to vp f59444dc, offset 0xf60fe070?i camac_b+0x2d0: ld [%l0], %l1 $q frc7v-cl1[37]% クラッシュ時のプログラムカウンタの値はこれまでと同じく、camac_b+0x2d0 のアドレスを指している。 ---xxx ここまでやった(継続中) --- (6). セクション (6-1). サブセクション (6-1-1). サブサブセクション