Microsoft MVP성태의 닷넷 이야기
오류 유형: 37. Visual SourceSafe - Anaylze 도중 비정상 종료 [링크 복사], [링크+제목 복사],
조회: 25145
글쓴 사람
정성태 (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

비밀번호

댓글 작성자
 




... [16]  17  18  19  20  21  22  23  24  25  26  27  28  29  30  ...
NoWriterDateCnt.TitleFile(s)
13543정성태1/30/20249798Windows: 254. Windows - 기본 사용 중인 5357 포트 비활성화는 방법
13542정성태1/30/20248882오류 유형: 893. Visual Studio - Web Application을 실행하지 못하는 IISExpress - 두 번째 이야기
13541정성태1/29/20249645VS.NET IDE: 188. launchSettings.json의 useSSL 옵션
13540정성태1/29/20249550Linux: 69. 리눅스 - "Docker Desktop for Windows" Container 환경에서 IPv6 Loopback Address 바인딩 오류
13539정성태1/26/20249377개발 환경 구성: 703. Visual Studio - launchSettings.json을 이용한 HTTP/HTTPS 포트 바인딩
13538정성태1/25/20249964닷넷: 2211. C# - NonGC(FOH) 영역에 .NET 개체를 생성파일 다운로드1
13537정성태1/24/202410761닷넷: 2210. C# - Native 메모리에 .NET 개체를 생성파일 다운로드1
13536정성태1/23/202410367닷넷: 2209. .NET 8 - NonGC Heap / FOH (Frozen Object Heap) [1]
13535정성태1/22/202410818닷넷: 2208. C# - GCHandle 구조체의 메모리 분석
13534정성태1/21/202410187닷넷: 2207. C# - SQL Server DB를 bacpac으로 Export/Import파일 다운로드1
13533정성태1/18/202410174닷넷: 2206. C# - TCP KeepAlive의 서버 측 구현파일 다운로드1
13532정성태1/17/202410235닷넷: 2205. C# - SuperSimpleTcp 사용 시 주의할 점파일 다운로드1
13531정성태1/16/202410618닷넷: 2204. C# - TCP KeepAlive에 새로 추가된 Retry 옵션파일 다운로드1
13530정성태1/15/20249894닷넷: 2203. C# - Python과의 AES 암호화 연동파일 다운로드1
13529정성태1/15/202410076닷넷: 2202. C# - PublishAot의 glibc에 대한 정적 링킹하는 방법
13528정성태1/14/202410254Linux: 68. busybox 컨테이너에서 실행 가능한 C++, Go 프로그램 빌드
13527정성태1/14/202410357오류 유형: 892. Visual Studio - Failed to launch debug adapter. Additional information may be available in the output window.
13526정성태1/14/202410684닷넷: 2201. C# - Facebook 연동 / 사용자 탈퇴 처리 방법
13525정성태1/13/20249814오류 유형: 891. Visual Studio - Web Application을 실행하지 못하는 IISExpress
13524정성태1/12/20249833오류 유형: 890. 한국투자증권 KIS Developers OpenAPI - GW라우팅 중 오류가 발생했습니다.
13523정성태1/12/20249846오류 유형: 889. Visual Studio - error : A project with that name is already opened in the solution.
13522정성태1/11/202410687닷넷: 2200. C# - HttpClient.PostAsJsonAsync 호출 시 "Transfer-Encoding: chunked" 대신 "Content-Length" 헤더 처리
13521정성태1/11/202410307닷넷: 2199. C# - 한국투자증권 KIS Developers OpenAPI의 WebSocket Ping, Pong 처리
13520정성태1/10/202410015오류 유형: 888. C# - Unable to resolve service for type 'Microsoft.Extensions.ObjectPool.ObjectPool`....' [1]
13519정성태1/10/20249687닷넷: 2198. C# - Reflection을 이용한 ClientWebSocket의 Ping 호출파일 다운로드1
13518정성태1/9/202410455닷넷: 2197. C# - ClientWebSocket의 Ping, Pong 처리
... [16]  17  18  19  20  21  22  23  24  25  26  27  28  29  30  ...