Microsoft MVP성태의 닷넷 이야기
오류 유형: 37. Visual SourceSafe - Anaylze 도중 비정상 종료 [링크 복사], [링크+제목 복사],
조회: 25137
글쓴 사람
정성태 (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)
13845정성태12/16/20244553디버깅 기술: 207. Windbg로 알아보는 PTE (_MMPTE)
13844정성태12/14/20245251디버깅 기술: 206. Windbg로 알아보는 PFN (_MMPFN)파일 다운로드1
13843정성태12/13/20244409오류 유형: 938. Docker container 내에서 빌드 시 error MSB3021: Unable to copy file "..." to "...". Access to the path '...' is denied.
13842정성태12/12/20244552디버깅 기술: 205. Windbg - KPCR, KPRCB
13841정성태12/11/20244880오류 유형: 937. error MSB4044: The "ValidateValidArchitecture" task was not given a value for the required parameter "RemoteTarget"
13840정성태12/11/20244459오류 유형: 936. msbuild - Your project file doesn't list 'win' as a "RuntimeIdentifier"
13839정성태12/11/20244896오류 유형: 936. msbuild - error CS1617: Invalid option '12.0' for /langversion. Use '/langversion:?' to list supported values.
13838정성태12/4/20244615오류 유형: 935. Windbg - Breakpoint 0's offset expression evaluation failed.
13837정성태12/3/20245092디버깅 기술: 204. Windbg - 윈도우 핸들 테이블 (3) - Windows 10 이상인 경우
13836정성태12/3/20244654디버깅 기술: 203. Windbg - x64 가상 주소를 물리 주소로 변환 (페이지 크기가 2MB인 경우)
13835정성태12/2/20245109오류 유형: 934. Azure - rm: cannot remove '...': Directory not empty
13834정성태11/29/20245360Windows: 275. C# - CUI 애플리케이션과 Console 윈도우 (Windows 10 미만의 Classic Console 모드인 경우) [1]파일 다운로드1
13833정성태11/29/20245017개발 환경 구성: 737. Azure Web App에서 Scale-out으로 늘어난 리눅스 인스턴스에 SSH 접속하는 방법
13832정성태11/27/20244969Windows: 274. Windows 7부터 도입한 conhost.exe
13831정성태11/27/20244412Linux: 111. eBPF - BPF_MAP_TYPE_PERF_EVENT_ARRAY, BPF_MAP_TYPE_RINGBUF에 대한 다양한 용어들
13830정성태11/25/20245248개발 환경 구성: 736. 파이썬 웹 앱을 Azure App Service에 배포하기
13829정성태11/25/20245218스크립트: 67. 파이썬 - Windows 버전에서 함께 설치되는 py.exe
13828정성태11/25/20244459개발 환경 구성: 735. Azure - 압축 파일을 이용한 web app 배포 시 디렉터리 구분이 안 되는 문제파일 다운로드1
13827정성태11/25/20245122Windows: 273. Windows 환경의 파일 압축 방법 (tar, Compress-Archive)
13826정성태11/21/20245367닷넷: 2313. C# - (비밀번호 등의) Console로부터 입력받을 때 문자열 출력 숨기기(echo 끄기)파일 다운로드1
13825정성태11/21/20245703Linux: 110. eBPF / bpf2go - BPF_RINGBUF_OUTPUT / BPF_MAP_TYPE_RINGBUF 사용법
13824정성태11/20/20244768Linux: 109. eBPF / bpf2go - BPF_PERF_OUTPUT / BPF_MAP_TYPE_PERF_EVENT_ARRAY 사용법
13823정성태11/20/20245333개발 환경 구성: 734. Ubuntu에 docker, kubernetes (k3s) 설치
13822정성태11/20/20245208개발 환경 구성: 733. Windbg - VirtualBox VM의 커널 디버거 연결 시 COM 포트가 없는 경우
13821정성태11/18/20245113Linux: 108. Linux와 Windows의 프로세스/스레드 ID 관리 방식
13820정성태11/18/20245285VS.NET IDE: 195. Visual C++ - C# 프로젝트처럼 CopyToOutputDirectory 항목을 추가하는 방법
1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...