2009/07/15

죽어버린 X-window (X window crash)

오픈 솔라리스 2009.06 버젼으로 업데이트해서 잘 사용하고 있었습니다.
너무 문제가 없어서 그랬는지, 어제는 악마의 속삭임에 빠져서, 이것 저것 업데이트를 했습니다.
pkg로 업데이트를 하면 괜찮았을 텐데, 별개로 컴파일해서 인스톨하고 했습니다.

제가 설치한 화일들은 잘 돌은 듯 했습니다.

문제는 오늘 발생. 모니터를 붙여서 화면 클로닝으로 설정하려고 했습니다. nVidia configuration으로 평소에 하던 대로 아주 편하게 했습니다. 그런데 이게 웬걸.. 화면 구성을 하고 apply를 누르는 순간 X-window가 죄다 없어지고, 텍스트 콘솔 화면이 잠깐 보였다고 다시 재로그인하는 화면으로 돌아옵니다.

여러 창으로 작업을 하던 상황에서 이렇게 되니 당황스럽습니다.  일단, X server가 시그널 받아서 죽는 것 같다는 느낌이 듭니다. 그런데,  명령어 창을 띄워야 뭘 live로 추적해볼 텐데.. 윈도우즈가 죽어버리니.. 어쩌나 하는 생각을 하게 됐습니다. 급기야, 'dtrace를 쓸 수 있나? ' 하는 생각에 이르렀습니다.

마침 /opt/DTT 디렉토리에 Dtrace Toolkit이 설치되어 있었습니다.

창을 하나 열었습니다. 그리고 다음처럼 명령을 실행했습니다.
$pfexec dtrace -s /opt/DTT/Proc/crash.d > /var/tmp/crash.report &

마침 Dtrace Toolkit에는 프로세스가 죽을때를 캡쳐해주는 스크립트가 있더군요.
다시 화면 구성을 시도했습니다. 예상대로 또 죽었습니다.  이럴 때 안죽으면 사실 좀 황당한데. 아주 착하게 잘 죽었습니다. ㅡㅡ;

재 로그인을 한 후 /var/tmp/crash.report 화일을 확인해봤습니다.

아~~주 훌륭합니다.  프로세스 죽을 때 이렇게 분석해주는 보고서는 첨 봤습니다.
단지 놀라울 따름입니다.


:/var/tmp$ cat crash.report
Waiting for crashing applications...

-----------------------------------------------------
CRASH DETECTED at 2009 Jul 15 15:47:06
-----------------------------------------------------
Type:    SIGSEGV
Program: Xorg
Args:    /usr/X11/bin/Xorg :0 -depth 24 -nolisten tcp -audit 0 -br -auth /var/lib/gdm/:0\0
PID:     1640
TID:     1
LWPs:    1
PPID:    1639
UID:     0
GID:     0
TaskID:  115
ProjID:  0
PoolID:  0
ZoneID:  0
zone:    global
CWD:     /var/lib/gdm
errno:   0

User Stack Backtrace,
              libglx.so.1`0xfffffd7ffd1c45ae

Kernel Stack Backtrace,
              genunix`sigaddqa+0x5f
              genunix`trapsig+0x119
              unix`trap+0x12a1
              unix`0xfffffffffb8001d9

Ansestors,
    1640 /usr/X11/bin/Xorg :0 -depth 24 -nolisten tcp -audit 0 -br -auth /var/lib/gdm/:0\0
      1639 /usr/sbin/gdm-binary\0
        1351 /usr/sbin/gdm-binary\0
          1 /sbin/init\0
            0 sched\0

Times,
    User:    9182 ticks
    Sys:     8066 ticks
    Elapsed: 209133 ms

Sizes,
    Heap:   43286536 bytes
    Stack:  577536 bytes


보고서에 나온대로 Xorg 서버의 현재 작업 디렉토리로 가봤습니다.  예상대로 core 알을 까놨군요.
보고서 상으로 보면 libglx.so에서 죽었네요. ( libglx.so.1`0xfffffd7ffd1c45ae )

core를 좀 더 확인해봤습니다.
$echo "\$C" | mdb core ; pstack과 같습니다.
/var/lib/gdm# echo "\$C" | mdb core
fffffd7fffdfe450 libc.so.1`_lwp_kill+0xa()
fffffd7fffdfe470 libc.so.1`raise+0x19()
fffffd7fffdfe4b0 libc.so.1`abort+0xd9()
fffffd7fffdfe4d0 0x4c32ba()
fffffd7fffdfe4e0 AbortServer+0x13()
fffffd7fffdfe5d0 FatalError+0xe4()
fffffd7fffdfe700 xf86SigHandler+0xb5()
fffffd7fffdfe710 libc.so.1`__sighndlr+6()
fffffd7fffdfe7a0 libc.so.1`call_user_handler+0x2a7()
fffffd7fffdfe7d0 libc.so.1`sigacthandler+0xc6(b, 0, fffffd7fffdfe7f0)
000000000100c640 0xfffffd7ffd4c43de()
000000000217b910 0()
0000000000001000 0()


고개가 갸우뚱 하네요... 어디서 죽은 거지 ? dtrace 말이 맞는 건가 ?
어드레스 맵을 한번 더 확인해보기로 했습니다.
# echo "\$m" | mdb core
            BASE            LIMIT             SIZE NAME
          400000           5fc000           1fc000 /usr/X11/bin/amd64/Xorg
          60c000           620000            14000 /usr/X11/bin/amd64/Xorg
          800000          6c3b000          643b000 /usr/X11/bin/amd64/Xorg
fffffd7ff52d6000 fffffd7ff54d6000           200000
fffffd7ff6b88000 fffffd7ff6d88000           200000
fffffd7ff6ef8000 fffffd7ff70f8000           200000
fffffd7ff7d46000 fffffd7ff7f46000           200000
fffffd7ff80e8000 fffffd7ff82e8000           200000
fffffd7ff84ec000 fffffd7ff86ec000           200000
fffffd7ff873a000 fffffd7ff893a000           200000
fffffd7ff8ad6000 fffffd7ff8cd6000           200000
fffffd7ff8dc6000 fffffd7ff8fc6000           200000
fffffd7ff9400000 fffffd7ff9442000            42000 /usr/X11/lib/modules/amd64/libfb.so
fffffd7ff9452000 fffffd7ff9454000             2000 /usr/X11/lib/modules/amd64/libfb.so
fffffd7ff9800000 fffffd7ff9801000             1000 /usr/X11/lib/modules/amd64/libfb.so
fffffd7ff9a00000 fffffd7ff9d85000           385000 /usr/X11/lib/modules/drivers/amd64/nvidia_drv.so
fffffd7ff9e85000 fffffd7ff9f1f000            9a000 /usr/X11/lib/modules/drivers/amd64/nvidia_drv.so
fffffd7ff9f1f000 fffffd7ff9f3e000            1f000 /usr/X11/lib/modules/drivers/amd64/nvidia_drv.so
fffffd7ff9ff0000 fffffd7ff9ff1000             1000
fffffd7ffa000000 fffffd7ffa004000             4000 /usr/X11/lib/modules/extensions/amd64/libIA.so
fffffd7ffa014000 fffffd7ffa015000             1000 /usr/X11/lib/modules/extensions/amd64/libIA.so
fffffd7ffa400000 fffffd7ffa401000             1000 /usr/X11/lib/modules/extensions/amd64/libIA.so
fffffd7ffa7f0000 fffffd7ffa7f1000             1000
fffffd7ffa800000 fffffd7ffa809000             9000 /usr/X11/lib/modules/extensions/amd64/libdri.so
fffffd7ffa819000 fffffd7ffa81a000             1000 /usr/X11/lib/modules/extensions/amd64/libdri.so
fffffd7ffac00000 fffffd7ffac01000             1000 /usr/X11/lib/modules/extensions/amd64/libdri.so
fffffd7ffaff0000 fffffd7ffaff1000             1000
fffffd7ffb000000 fffffd7ffb009000             9000 /usr/X11/lib/modules/extensions/amd64/librecord.so
fffffd7ffb019000 fffffd7ffb01a000             1000 /usr/X11/lib/modules/extensions/amd64/librecord.so
fffffd7ffb400000 fffffd7ffb401000             1000 /usr/X11/lib/modules/extensions/amd64/librecord.so
fffffd7ffb7f0000 fffffd7ffb7f1000             1000
fffffd7ffb800000 fffffd7ffb801000             1000 /usr/X11/lib/modules/fonts/amd64/libfreetype.so
fffffd7ffb811000 fffffd7ffb812000             1000 /usr/X11/lib/modules/fonts/amd64/libfreetype.so
fffffd7ffbab7000 fffffd7ffbbff000           148000
fffffd7ffbc00000 fffffd7ffbc01000             1000 /usr/X11/lib/modules/fonts/amd64/libfreetype.so
fffffd7ffbc8b000 fffffd7ffbceb000            60000
fffffd7ffc000000 fffffd7ffccf4000           cf4000 /usr/X11/lib/NVIDIA/amd64/libGLcore.so.1
fffffd7ffcdf4000 fffffd7ffd245000           451000 /usr/X11/lib/NVIDIA/amd64/libGLcore.so.1
fffffd7ffd245000 fffffd7ffd257000            12000 /usr/X11/lib/NVIDIA/amd64/libGLcore.so.1
fffffd7ffd270000 fffffd7ffd2d0000            60000
fffffd7ffd400000 fffffd7ffd540000           140000 /usr/X11/lib/modules/extensions/NVIDIA/amd64/libglx.so.1
fffffd7ffd57d000 fffffd7ffd5dd000            60000
fffffd7ffd5de000 fffffd7ffd63e000            60000
fffffd7ffd63f000 fffffd7ffd6a5000            66000 /usr/X11/lib/modules/extensions/NVIDIA/amd64/libglx.so.1
fffffd7ffd6a5000 fffffd7ffd6a7000             2000 /usr/X11/lib/modules/extensions/NVIDIA/amd64/libglx.so.1
fffffd7ffd6cd000 fffffd7ffd72d000            60000
fffffd7ffd7f0000 fffffd7ffd7f1000             1000
fffffd7ffd800000 fffffd7ffd805000             5000 /usr/X11/lib/modules/extensions/amd64/libdbe.so
fffffd7ffd815000 fffffd7ffd816000             1000 /usr/X11/lib/modules/extensions/amd64/libdbe.so
fffffd7ffd826000 fffffd7ffd86f000            49000
fffffd7ffd8af000 fffffd7ffd90f000            60000
fffffd7ffd910000 fffffd7ffd970000            60000
fffffd7ffd971000 fffffd7ffd9d1000            60000
fffffd7ffda70000 fffffd7ffdad0000            60000
fffffd7ffdaff000 fffffd7ffdb5f000            60000
fffffd7ffdb9f000 fffffd7ffdbff000            60000
fffffd7ffdc00000 fffffd7ffdc01000             1000 /usr/X11/lib/modules/extensions/amd64/libdbe.so
fffffd7ffdcef000 fffffd7ffdd4f000            60000
fffffd7ffdd6c000 fffffd7ffddcc000            60000
fffffd7ffddcd000 fffffd7ffde2d000            60000
fffffd7ffde2e000 fffffd7ffde8e000            60000
fffffd7ffde8f000 fffffd7ffdeef000            60000
fffffd7ffdf0c000 fffffd7ffdf10000             4000
fffffd7ffdf1a000 fffffd7ffdf7a000            60000
fffffd7ffdf90000 fffffd7ffdf98000             8000
fffffd7ffdf9f000 fffffd7ffdfff000            60000
fffffd7ffe000000 fffffd7ffe027000            27000 /usr/X11/lib/modules/extensions/amd64/libextmod.so
fffffd7ffe037000 fffffd7ffe039000             2000 /usr/X11/lib/modules/extensions/amd64/libextmod.so
fffffd7ffe04a000 fffffd7ffe0aa000            60000
fffffd7ffe0b5000 fffffd7ffe1b5000           100000
fffffd7ffe1b6000 fffffd7ffe1b7000             1000
fffffd7ffe1ba000 fffffd7ffe21a000            60000
fffffd7ffe21b000 fffffd7ffe27b000            60000
fffffd7ffe28f000 fffffd7ffe2cf000            40000
fffffd7ffe2d0000 fffffd7ffe2dc000             c000
fffffd7ffe2dd000 fffffd7ffe33d000            60000
fffffd7ffe33e000 fffffd7ffe39e000            60000
fffffd7ffe39f000 fffffd7ffe3ff000            60000
fffffd7ffe400000 fffffd7ffe401000             1000 /usr/X11/lib/modules/extensions/amd64/libextmod.so
fffffd7ffe413000 fffffd7ffe414000             1000
fffffd7ffe424000 fffffd7ffe444000            20000
fffffd7ffe445000 fffffd7ffe4a5000            60000
fffffd7ffe4b7000 fffffd7ffe506000            4f000
fffffd7ffe507000 fffffd7ffe567000            60000
fffffd7ffe568000 fffffd7ffe5c8000            60000
fffffd7ffe5c9000 fffffd7ffe5cd000             4000
fffffd7ffe5cf000 fffffd7ffe6cf000           100000
fffffd7ffe6d0000 fffffd7ffe6d1000             1000
fffffd7ffe6d9000 fffffd7ffe719000            40000
fffffd7ffe730000 fffffd7ffe733000             3000
fffffd7ffe73b000 fffffd7ffe79e000            63000
fffffd7ffe79f000 fffffd7ffe7ff000            60000
fffffd7ffe800000 fffffd7ffe8a3000            a3000 /usr/X11/lib/modules/amd64/libpcidata.so
fffffd7ffe8b3000 fffffd7ffe902000            4f000 /usr/X11/lib/modules/amd64/libpcidata.so
fffffd7ffe912000 fffffd7ffe913000             1000
fffffd7ffe91d000 fffffd7ffe97d000            60000
fffffd7ffe97e000 fffffd7ffe9de000            60000
fffffd7ffe9f0000 fffffd7ffe9f8000             8000
fffffd7ffea12000 fffffd7ffea13000             1000
fffffd7ffea23000 fffffd7ffea24000             1000
fffffd7ffea7f000 fffffd7ffeadf000            60000
fffffd7ffeae0000 fffffd7ffeae3000             3000
/usr/X11/lib/amd64/libXau.so.6
fffffd7ffeaf3000 fffffd7ffeaf4000             1000
/usr/X11/lib/amd64/libXau.so.6
fffffd7ffeb06000 fffffd7ffeb0a000             4000
fffffd7ffeb10000 fffffd7ffeb12000             2000
fffffd7ffeb20000 fffffd7ffeb36000            16000 /lib/amd64/libz.so.1
fffffd7ffeb45000 fffffd7ffeb47000             2000 /lib/amd64/libz.so.1
fffffd7ffeb60000 fffffd7ffeb61000             1000
fffffd7ffeb70000 fffffd7ffebdf000            6f000 /lib/amd64/libm.so.2
fffffd7ffebee000 fffffd7ffebf1000             3000 /lib/amd64/libm.so.2
fffffd7ffec00000 fffffd7ffec01000             1000
fffffd7ffec5e000 fffffd7ffec7f000            21000
fffffd7ffec80000 fffffd7ffec81000             1000
fffffd7ffec90000 fffffd7ffecd6000            46000 /usr/X11/lib/modules/NVIDIA/amd64/libnvidia-wfb.so.1
fffffd7ffece5000 fffffd7ffece7000             2000 /usr/X11/lib/modules/NVIDIA/amd64/libnvidia-wfb.so.1
fffffd7ffed00000 fffffd7ffed01000             1000
fffffd7ffed20000 fffffd7ffed21000             1000
fffffd7ffed30000 fffffd7ffed34000             4000 /usr/X11/lib/modules/input/amd64/kbd_drv.so
fffffd7ffed44000 fffffd7ffed45000             1000 /usr/X11/lib/modules/input/amd64/kbd_drv.so
fffffd7ffed55000 fffffd7ffed56000             1000
fffffd7ffed60000 fffffd7ffed6c000             c000 /usr/X11/lib/modules/input/amd64/mouse_drv.so
fffffd7ffed7c000 fffffd7ffed7e000             2000 /usr/X11/lib/modules/input/amd64/mouse_drv.so
fffffd7ffed80000 fffffd7ffed81000             1000
fffffd7ffedd0000 fffffd7ffedd1000             1000
fffffd7ffee00000 fffffd7ffee01000             1000 /usr/X11/lib/NVIDIA/amd64/libnvidia-tls.so.1
fffffd7ffee11000 fffffd7ffee12000             1000
fffffd7ffee20000 fffffd7ffee21000             1000
fffffd7ffee32000 fffffd7ffee33000             1000
fffffd7ffee54000 fffffd7ffee64000            10000
fffffd7ffee70000 fffffd7ffee71000             1000
fffffd7ffee72000 fffffd7ffee73000             1000
fffffd7ffee82000 fffffd7ffee83000             1000
fffffd7ffee8e000 fffffd7ffee9f000            11000
fffffd7ffeea0000 fffffd7ffeea1000             1000
fffffd7ffeeb0000 fffffd7ffeebd000             d000 /usr/X11/lib/X11/xserver/amd64/libdrm.so.2
fffffd7ffeecd000 fffffd7ffeece000             1000 /usr/X11/lib/X11/xserver/amd64/libdrm.so.2
fffffd7ffeee0000 fffffd7ffeee1000             1000
fffffd7ffeef1000 fffffd7ffeef2000             1000
fffffd7ffeef6000 fffffd7ffeef7000             1000
fffffd7ffef00000 fffffd7ffef01000             1000 /usr/X11/lib/NVIDIA/amd64/libnvidia-tls.so.1
fffffd7ffef12000 fffffd7ffef13000             1000
fffffd7ffef16000 fffffd7ffef17000             1000
fffffd7ffef20000 fffffd7ffef21000             1000
fffffd7ffef30000 fffffd7ffef32000             2000 /lib/amd64/librt.so.1
fffffd7ffef40000 fffffd7ffef41000             1000
fffffd7ffef52000 fffffd7ffef53000             1000
fffffd7ffef60000 fffffd7ffef61000             1000
fffffd7ffef72000 fffffd7ffef73000             1000
fffffd7ffef80000 fffffd7ffef81000             1000
fffffd7ffef90000 fffffd7ffef9c000             c000 /usr/sfw/lib/amd64/libgcc_s.so.1
fffffd7ffefab000 fffffd7ffefac000             1000 /usr/sfw/lib/amd64/libgcc_s.so.1
fffffd7ffefc0000 fffffd7ffefc1000             1000
fffffd7ffefca000 fffffd7ffefcb000             1000
fffffd7ffefd0000 fffffd7ffefe0000            10000
fffffd7ffeff0000 fffffd7ffeff6000             6000
fffffd7fff000000 fffffd7fff001000             1000
fffffd7fff010000 fffffd7fff0d0000            c0000 /lib/amd64/libnsl.so.1
fffffd7fff0d0000 fffffd7fff0d7000             7000 /lib/amd64/libnsl.so.1
fffffd7fff0d7000 fffffd7fff0e0000             9000 /lib/amd64/libnsl.so.1
fffffd7fff0f0000 fffffd7fff101000            11000 /lib/amd64/libsocket.so.1
fffffd7fff111000 fffffd7fff112000             1000 /lib/amd64/libsocket.so.1
fffffd7fff112000 fffffd7fff113000             1000 /lib/amd64/libsocket.so.1
fffffd7fff120000 fffffd7fff121000             1000
fffffd7fff130000 fffffd7fff131000             1000
fffffd7fff140000 fffffd7fff1a5000            65000 /usr/X11/lib/X11/xserver/amd64/libXfont.so.1
fffffd7fff1b5000 fffffd7fff1b8000             3000 /usr/X11/lib/X11/xserver/amd64/libXfont.so.1
fffffd7fff1b8000 fffffd7fff1bb000             3000 /usr/X11/lib/X11/xserver/amd64/libXfont.so.1
fffffd7fff1c0000 fffffd7fff355000           195000 /lib/amd64/libc.so.1
fffffd7fff365000 fffffd7fff371000             c000 /lib/amd64/libc.so.1
fffffd7fff371000 fffffd7fff373000             2000 /lib/amd64/libc.so.1
fffffd7fff375000 fffffd7fff387000            12000
fffffd7fff390000 fffffd7fff391000             1000
fffffd7fff3a0000 fffffd7fff3a1000             1000
fffffd7fff3a3000 fffffd7fff3eb000            48000 /lib/amd64/ld.so.1
fffffd7fff3fb000 fffffd7fff3fe000             3000 /lib/amd64/ld.so.1
fffffd7fff3fe000 fffffd7fff3ff000             1000 /lib/amd64/ld.so.1
fffffd7fffd72000 fffffd7fffe00000            8e000 [ stack ]


core에서 나오는 메모리 맵에서는 base map 400000에서 시작하니, d5c4...  영역을 봤더니
libglx.so 가 맞군요.

NVidia driver 화일이군요... Nvidia를 다시 설치해야 겠군요.

pkg search libglx.so 로 어떤 패키지인가 검색해봤더니... 예상대로
pkg:/SUNWxorg-mesa@7.2-0.111

어떻게 이 패키지만 업데이트 하나 고민하고 있습니다.  차라리 앞으로 롤백을 해야 할까요? 흠...


댓글 없음: