Microsoft MVP성태의 닷넷 이야기
오류 유형: 37. Visual SourceSafe - Anaylze 도중 비정상 종료 [링크 복사], [링크+제목 복사],
조회: 19784
글쓴 사람
정성태 (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)
13275정성태3/3/20235025.NET Framework: 2101. C# 11의 ref 필드 설명
13274정성태3/2/20234600.NET Framework: 2100. C# - ref 필드로 ref struct 타입을 허용하지 않는 이유
13273정성태2/28/20234362.NET Framework: 2099. C# - 관리 포인터로서의 ref 예약어 의미
13272정성태2/27/20234605오류 유형: 850. SSMS - mdf 파일을 Attach 시킬 때 Operating system error 5: "5(Access is denied.)" 에러
13271정성태2/25/20234585오류 유형: 849. Sql Server Configuration Manager가 시작 메뉴에 없는 경우
13270정성태2/24/20234097.NET Framework: 2098. dotnet build에 /p 옵션을 적용 시 유의점
13269정성태2/23/20234722스크립트: 46. 파이썬 - uvicorn의 콘솔 출력을 UDP로 전송
13268정성태2/22/20235232개발 환경 구성: 667. WSL 2 내부에서 열고 있는 UDP 서버를 호스트 측에서 접속하는 방법
13267정성태2/21/20235139.NET Framework: 2097. C# - 비동기 소켓 사용 시 메모리 해제가 finalizer 단계에서 발생하는 사례파일 다운로드1
13266정성태2/20/20234774오류 유형: 848. .NET Core/5+ - Process terminated. Couldn't find a valid ICU package installed on the system
13265정성태2/18/20234662.NET Framework: 2096. .NET Core/5+ - PublishSingleFile 유형에 대한 runtimeconfig.json 설정
13264정성태2/17/20236251스크립트: 45. 파이썬 - uvicorn 사용자 정의 Logger 작성
13263정성태2/16/20234412개발 환경 구성: 666. 최신 버전의 ilasm.exe/ildasm.exe 사용하는 방법
13262정성태2/15/20235485디버깅 기술: 191. dnSpy를 이용한 (소스 코드가 없는) 닷넷 응용 프로그램 디버깅 방법 [1]
13261정성태2/15/20234860Windows: 224. Visual Studio - 영문 폰트가 Fullwidth Latin Character로 바뀌는 문제
13260정성태2/14/20234605오류 유형: 847. ilasm.exe 컴파일 오류 - error : syntax error at token '-' in ... -inf
13259정성태2/14/20234759.NET Framework: 2095. C# - .NET5부터 도입된 CollectionsMarshal
13258정성태2/13/20234583오류 유형: 846. .NET Framework 4.8 Developer Pack 설치 실패 - 0x81f40001
13257정성태2/13/20234673.NET Framework: 2094. C# - Job에 Process 포함하는 방법 [1]파일 다운로드1
13256정성태2/10/20235415개발 환경 구성: 665. WSL 2의 네트워크 통신 방법 - 두 번째 이야기
13255정성태2/10/20234832오류 유형: 845. gihub - windows2022 이미지에서 .NET Framework 4.5.2 미만의 프로젝트에 대한 빌드 오류
13254정성태2/10/20234764Windows: 223. (WMI 쿼리를 위한) PowerShell 문자열 escape 처리
13253정성태2/9/20235582Windows: 222. C# - 다른 윈도우 프로그램이 실행되었음을 인식하는 방법파일 다운로드1
13252정성태2/9/20234377오류 유형: 844. ssh로 명령어 수행 시 멈춤 현상
13251정성태2/8/20234751스크립트: 44. 파이썬의 3가지 스레드 ID
13250정성태2/8/20236639오류 유형: 843. System.InvalidOperationException - Unable to configure HTTPS endpoint
1  2  3  4  5  6  7  8  9  10  11  12  13  14  [15]  ...