Microsoft MVP성태의 닷넷 이야기
오류 유형: 37. Visual SourceSafe - Anaylze 도중 비정상 종료 [링크 복사], [링크+제목 복사],
조회: 25142
글쓴 사람
정성태 (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)
13593정성태4/8/20249020닷넷: 2235. MSBuild - AccelerateBuildsInVisualStudio 옵션
13592정성태4/2/202411345C/C++: 165. CLion으로 만든 Rust Win32 DLL을 C#과 연동 [1]
13591정성태4/2/20249475닷넷: 2234. C# - WPF 응용 프로그램에 Blazor App 통합파일 다운로드1
13590정성태3/31/20249272Linux: 70. Python - uwsgi 응용 프로그램이 k8s 환경에서 OOM 발생하는 문제
13589정성태3/29/20249640닷넷: 2233. C# - 프로세스 CPU 사용량을 나타내는 성능 카운터와 Win32 API파일 다운로드1
13588정성태3/28/202410702닷넷: 2232. C# - Unity + 닷넷 App(WinForms/WPF) 간의 Named Pipe 통신 [2]파일 다운로드1
13587정성태3/27/20249583오류 유형: 900. Windows Update 오류 - 8024402C, 80070643
13586정성태3/27/202412486Windows: 263. Windows - 복구 파티션(Recovery Partition) 용량을 늘리는 방법
13585정성태3/26/202410151Windows: 262. PerformanceCounter의 InstanceName에 pid를 추가한 "Process V2"
13584정성태3/26/202411804개발 환경 구성: 708. Unity3D - C# Windows Forms / WPF Application에 통합하는 방법 [9]파일 다운로드1
13583정성태3/25/20249734Windows: 261. CPU Utilization이 100% 넘는 경우를 성능 카운터로 확인하는 방법
13582정성태3/19/202410871Windows: 260. CPU 사용률을 나타내는 2가지 수치 - 사용량(Usage)과 활용률(Utilization)파일 다운로드1
13581정성태3/18/202410521개발 환경 구성: 707. 빌드한 Unity3D 프로그램을 C++ Windows Application에 통합하는 방법
13580정성태3/15/20249492닷넷: 2231. C# - ReceiveTimeout, SendTimeout이 적용되지 않는 Socket await 비동기 호출파일 다운로드1
13579정성태3/13/202410428오류 유형: 899. HTTP Error 500.32 - ANCM Failed to Load dll
13578정성태3/11/202411173닷넷: 2230. C# - 덮어쓰기 가능한 환형 큐 (Circular queue)파일 다운로드1
13577정성태3/9/202411114닷넷: 2229. C# - 닷넷을 위한 난독화 도구 소개 (예: ConfuserEx)
13576정성태3/8/202410379닷넷: 2228. .NET Profiler - IMetaDataEmit2::DefineMethodSpec 사용법
13575정성태3/7/202410874닷넷: 2227. 최신 C# 문법을 .NET Framework 프로젝트에 쓸 수 있을까요?
13574정성태3/6/202410331닷넷: 2226. C# - "Docker Desktop for Windows" Container 환경에서의 IPv6 DualMode 소켓
13573정성태3/5/20249495닷넷: 2225. Windbg - dumasync로 분석하는 async/await 호출
13572정성태3/4/20249505닷넷: 2224. C# - WPF의 Dispatcher Queue로 알아보는 await 호출의 hang 현상파일 다운로드1
13571정성태3/1/20249473닷넷: 2223. C# - await 호출과 WPF의 Dispatcher Queue 동작 확인파일 다운로드1
13570정성태2/29/202410123닷넷: 2222. C# - WPF의 Dispatcher Queue 동작 확인파일 다운로드1
13569정성태2/28/202410234닷넷: 2221. C# - LoadContext, LoadFromContext 그리고 GAC파일 다운로드1
13568정성태2/27/20249822닷넷: 2220. C# - .NET Framework 프로세스의 LoaderOptimization 설정을 확인하는 방법파일 다운로드1
1  2  3  4  5  6  7  8  9  10  11  12  13  [14]  15  ...