Microsoft MVP성태의 닷넷 이야기
오류 유형: 37. Visual SourceSafe - Anaylze 도중 비정상 종료 [링크 복사], [링크+제목 복사],
조회: 25139
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 



Visual SourceSafe - Anaylze 도중 비정상 종료


요즘 들어서, 왜 이리 해결해야 할 문제들이 나타나는지 모르겠군요. 공부 좀 해야 하는데... ^^;

이번엔, Visual SourceSafe의 DB에 문제가 발생해서 원인 파악에 나섰습니다. 우선, 지난 경험을 되살려 해당 DB를 검사해 보는 것부터 시작해 보았는데,

C:\>analyze -C -D -F -V4 d:\db\vss\data

실행하는 도중, 다음과 같은 오류 창이 뜨면서 비정상 종료를 해버렸습니다.

[그림 1: Analyze 비정상 종료]
analyze_crash_1.png
"
There is a diff chain size mismatch in file 'XXXXX' (....) at version XX(versions earlier than that version can no longer be retrieved from the database).
"



혹시나 또 다른 정보를 얻을 수 있을까 싶어서, Debug 버튼을 누르고 좀 더 추적해 보았습니다. VS.NET 2005 디버그 창에서 다음과 같은 곳에서 디버깅이 시작되었습니다.

analyze_crash_2.png

"
Unhandled exception at 0x76cb3843 in analyze.exe:
Microsoft C++ exception: CInvalidArgException at memory location 0x02caec8c..
"



위의 메시지로 검색을 해봤지만, 딱히 원하는 정보가 발견되지 않았습니다. 다시 analyze.exe로 돌아와서, analyze.exe 자체에서 제공되는 기능을 이용하여 문제를 해결하는 것이 최선이 아닐까 생각이 되어 다음과 같이 옵션을 바꿔서 분석을 해보았습니다.

C:\>analyze -BC:\Temp d:\db\vss\data

이번에도 비정상 종료가 되어버렸고, Debugger로 들어가니 동일하게 CInvalidArgException 예외가 발생을 했습니다.




다시 돌아가서, "There is a diff chain size mismatch in file"과 관련된 정보를 웹에서 검색해 보았습니다. 그랬더니 다음과 같은 토픽이 발견되었습니다.

PRB: "There Is a Diff Chain Size Mismatch in File" Error Message in Analyze.log 
When You Run the Analyze Tool Against a Visual SourceSafe Database
; http://support.microsoft.com/kb/323698

일단, 오류상으로 확인되는 현상은 이렇습니다.

예를 들어서 다음과 같은 오류가 있다고 할 때.

There is a diff chain size mismatch in file 'ResMessage.cs' (mxbaaaaa) at version 3 
(versions earlier than that version can no longer be retrieved from the database).

ResMessage.cs 파일의 버전이 3보다 낮은 것들을 찾을 수 없다는 것입니다. 정말 그런지... 확인을 해봤습니다. Visual SourceSafe Explorer를 실행시키고, 'ResMessage.cs' 파일을 찾아내어 "Show History..." 메뉴를 선택하여 다음과 같은 화면을 띄웠습니다.

analyze_crash_3.png

에러 메시지에 의해서, "3, 4, ..."에 해당하는 버전의 파일들은 "Get", "View" 등이 되지만, "1, 2" 버전의 파일들에 대해서 "Get", "View"로 보려고 하면, 다음과 같은 오류 메시지 상자가 뜨는 것을 확인할 수 있었습니다.

analyze_crash_4.png
"
SourceSafe was unable to finish writing a file. 
Check your available disk space, and ask the administrator to analyze your SourceSafe database.
"

자... 그럼, 이제부터 "diff chain size mismatch"와 관련된 오류를 유발하는 항목들을 위의 "PRB" KB에서 알려주는 대로 해결을 해보겠습니다. 위에서 보여주는 'ResMessage.cs'에 대해서 오류 수정은 다음과 같이 했습니다.

C:\>ssarc -d -v3 archive1.ssa $/northwindsolution/Projects/Northwind.Data/ResMessage.cs

Microsoft (R) Visual SourceSafe Version 8.0
Copyright (C) Microsoft Corporation. All rights reserved.
Username: TestUser
Password: **********************************

Building project list.
Building project list.
... done

Saving files.... done

Loading file list... done

Checking archive file consistency.... done
Processed 1 files in 0 hours, 0 minutes, and 1 seconds.

위의 동작은 쉽게 말해서, 해당 파일의 버전 3 미만의 기록들을 제거해 버리고 버전 3을 최초 파일로 지정해 버리는 것입니다. 위와 같이 해서 나머지 모든 오류들을 수정해 줍니다.

이쯤 되면, 오류가 잡히지 않았을까 하는 기대감을 갖고, analyze.exe를 실행해 봤지만,,, ^^; 정성이 부족했나 봅니다. 여전히 analyze.exe를 구동시키면 비정상 종료가 발생했습니다.




다시... 돌아가서, "그림 1: Analyze 비정상 종료" 화면을 보았습니다. 오... 좌측 하단의 상태바에 보니 "Analyzing file rgbaaaaa"라는 문구가 눈에 들어왔습니다. 도대체 무슨 파일인지 알아보기 위해 다음과 같이 해당 소스 파일의 위치를 찾아보았습니다.

C:\>dir /a/s rgbaaaaa
 Volume in drive D has no label.
 Volume Serial Number is A2F9-55ED

 Directory of C:\VSS\data\r

2007-06-02  오후 11:37             4,969 rgbaaaaa
               1 File(s)          4,969 bytes

     Total Files Listed:
               4 File(s)         19,876 bytes
               0 Dir(s)  18,130,542,592 bytes free

아하... 드디어 찾아낸 것 같습니다.

(제가 소스세이프의 내부 구조는 잘 모르지만.) 일반적으로 "xxxxxxxx"라는 파일과 함께 "xxxxxxxx.a" / "xxxxxxxx.b"라는 파일들이 있는데, "xxxxxxxx"인 경우에는 메타데이터 정도가 보관되어 있는 것 같고, ".a, .b" 파일에는 실제 소스가 들어가는 형식입니다. 즉, 위의 예를 들어 보면 "rgbaaaaa" 파일과 함께 "rgbaaaaa.a"라는 파일이 있었는데, "rgbaaaaa" 파일은 2진 파일 형식이었던지라 일단 해당 파일이 정상인지는 알 수 없었습니다. 그런데, "rgbaaaaa.a" 파일은 "소스 코드"가 담겨 있어야 함에도 불구하고 2진 파일처럼 마구 깨진 문자열들이 들어가 있는 것을 확인할 수 있었습니다.

이런 문자열들이 입력으로 들어갔으니 당연히 "CInvalidArgException"와 같은 예외가 발생했겠지요.

휴... 이제 원인은 찾은 것 같고... 문제는 해결 방법인데... ^^;

과연... 어떻게 하는 것이 최선의 방법일지...?

일단, "analyze.exe"에서 제공되는 어떠한 옵션을 사용해도 "rgbaaaaa" 단계를 검사하는 도중 오류가 발생했기 때문에 "analyze.exe"로는 기대할 수가 없었습니다.

음... 좋은 생각이 났습니다. backup 폴더를 하나 만들어서 "rgbaaaaa", "rgbaaaaa.a" 파일을 백업해 놓고, 원래의 폴더에서는 삭제해 버리는 것입니다. ^^

오호... 그렇게 한 후 다시 "analyze -C -D -F -V4"를 해보니 다음과 같은 오류들이 발생했습니다.

Visual SourceSafe Analyze Version 8.0
Copyright (C) Microsoft Corporation. All rights reserved.

Database analysis in progress @ 07-06-03;12:32a.
The Parent Project for item Northwind.snk (bjbaaaaa) is corrupt and the link to the child file has been lost until the project is recovered.
The Parent Project for item Northwind (ejbaaaaa) is corrupt and the link to the child file has been lost until the project is recovered.
The Parent Project for item DxEF11 (mlbaaaaa) is corrupt and the link to the child file has been lost until the project is recovered.
The Parent Project for item northwindsolution.sln (ugbaaaaa) is corrupt and the link to the child file has been lost until the project is recovered.
The Parent Project for item northwindsolution.vssscc (vgbaaaaa) is corrupt and the link to the child file has been lost until the project is recovered.
The Parent Project for item Projects (wgbaaaaa) is corrupt and the link to the child file has been lost until the project is recovered.
The Parent Project for item northwindsolution.vsd (xkbaaaaa) is corrupt and the link to the child file has been lost until the project is recovered.
Unable to open file 'd:\db\vss\data\R\RGBAAAAA'.
File "c:\vss\data\R\RGBAAAAA" not found
The project $/ references a child whose physical file (RGBAAAAA) is missing or corrupted.
The project $/ contains a child that does not recognize this project as a parent. The child will be added to the project.
Analysis complete @ 07-06-03;12:33a
  Some errors or inconsistencies were found and fixed.

아무래도, "rgbaaaaa" 파일이란 것이 (소스세이프에 저장된) 솔루션 파일의 내부 논리 폴더였던 것 같습니다. 위와 같이 실행한 후, 확인해 보니 "rgbaaaaa", "rgbaaaaa.a" 파일이 다시 생성되어 있었고, 심지어 "rgbaaaaa.a" 파일은 여전히 2진 파일 형식이었습니다. 백업해 놓은 파일과 비교해 보니 오히려 "rgbaaaaa.a" 파일의 내용은 동일하고 "rgbaaaaa" 파일의 내용이 다른 것이 나타났습니다. 그러니까 문제는... 결국 "analyze.exe" 실행 중에 상태바에 보였던 그 파일이 원인이었다는 것이죠.

어쨌든,,, 이렇게 해서, 이번에도 기나긴 오류 추적 여행이 끝이 났습니다.



[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 7/10/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




1  2  3  4  5  [6]  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13795정성태10/31/20245201Windows: 268. Windows - 리눅스 환경처럼 공백으로 끝나는 프롬프트 만들기
13794정성태10/30/20245292닷넷: 2307. C# - 윈도우에서 한글(및 유니코드)을 포함한 콘솔 프로그램을 컴파일 및 실행하는 방법
13793정성태10/28/20245167C/C++: 183. C++ - 윈도우에서 한글(및 유니코드)을 포함한 콘솔 프로그램을 컴파일 및 실행하는 방법
13792정성태10/27/20244659Linux: 99. Linux - 프로세스의 실행 파일 경로 확인
13791정성태10/27/20244920Windows: 267. Win32 API의 A(ANSI) 버전은 DBCS를 사용할까요?파일 다운로드1
13790정성태10/27/20244632Linux: 98. Ubuntu 22.04 - 리눅스 커널 빌드 및 업그레이드
13789정성태10/27/20244957Linux: 97. menuconfig에 CONFIG_DEBUG_INFO_BTF, CONFIG_DEBUG_INFO_BTF_MODULES 옵션이 없는 경우
13788정성태10/26/20244473Linux: 96. eBPF (bpf2go) - fentry, fexit를 이용한 트레이스
13787정성태10/26/20245012개발 환경 구성: 730. github - Linux 커널 repo를 윈도우 환경에서 git clone하는 방법 [1]
13786정성태10/26/20245245Windows: 266. Windows - 대소문자 구분이 가능한 파일 시스템
13785정성태10/23/20245001C/C++: 182. 윈도우가 운영하는 2개의 Code Page파일 다운로드1
13784정성태10/23/20245280Linux: 95. eBPF - kprobe를 이용한 트레이스
13783정성태10/23/20244877Linux: 94. eBPF - vmlinux.h 헤더 포함하는 방법 (bpf2go에서 사용)
13782정성태10/23/20244638Linux: 93. Ubuntu 22.04 - 커널 이미지로부터 커널 함수 역어셈블
13781정성태10/22/20244822오류 유형: 930. WSL + eBPF: modprobe: FATAL: Module kheaders not found in directory
13780정성태10/22/20245581Linux: 92. WSL 2 - 커널 이미지로부터 커널 함수 역어셈블
13779정성태10/22/20244879개발 환경 구성: 729. WSL 2 - Mariner VM 커널 이미지 업데이트 방법
13778정성태10/21/20245715C/C++: 181. C/C++ - 소스코드 파일의 인코딩, 바이너리 모듈 상태의 인코딩
13777정성태10/20/20244967Windows: 265. Win32 API의 W(유니코드) 버전은 UCS-2일까요? UTF-16 인코딩일까요?
13776정성태10/19/20245314C/C++: 180. C++ - 고수준 FILE I/O 함수에서의 Unicode stream 모드(_O_WTEXT, _O_U16TEXT, _O_U8TEXT)파일 다운로드1
13775정성태10/19/20245512개발 환경 구성: 728. 윈도우 환경의 개발자를 위한 UTF-8 환경 설정
13774정성태10/18/20245212Linux: 91. Container 환경에서 출력하는 eBPF bpf_get_current_pid_tgid의 pid가 존재하지 않는 이유
13773정성태10/18/20244902Linux: 90. pid 네임스페이스 구성으로 본 WSL 2 + docker-desktop
13772정성태10/17/20245180Linux: 89. pid 네임스페이스 구성으로 본 WSL 2 배포본의 계층 관계
13771정성태10/17/20245084Linux: 88. WSL 2 리눅스 배포본 내에서의 pid 네임스페이스 구성
13770정성태10/17/20245372Linux: 87. ps + grep 조합에서 grep 명령어를 사용한 프로세스를 출력에서 제거하는 방법
1  2  3  4  5  [6]  7  8  9  10  11  12  13  14  15  ...