[옛날꺼:2007/04/11] Heisenbugs

 쓸모는 없었지만, 언제부터였더라. 블로그는 꽤 초기 때부터 하긴 했었는데.. 티스토리 전에 썻던 블로그에서 재고정리 시리즈를 [옛날꺼:날짜] 를 붙여서 옮기려고 합니다.


http://en.wikipedia.org/wiki/Heisenbug#Heisenbugs

위키피디아

 

조엘 온 소프트웨어 읽다가 멀티 쓰레드 프로그램이 발생시킬 수 있는 문제라 해서…

궁금해서 찾아봄.

 

———————

Heisenbugs

heisenbug is a computer bug that disappears or alters its characteristics when it is researched.

One common example is a bug that occurs in a release-mode compile of a program, but not when researched under debug-mode; another is a bug caused by a race condition. The name “heisenbug” is a pun on the “Heisenberg uncertainty principle,” a quantum physics term which is commonly (yet inaccurately) used to refer to the way in which observers affect the measurements of the things that they are observing, by the act of observing alone (this is actually the observer effect, and is commonly confused with the Heisenberg uncertainty principle).

One common reason for heisenbug-like behaviour is that executing a program in debug mode often cleans memory before the program starts, and forces variables onto stack locations, instead of keeping them in registers. Another reason is that debuggers commonly provide watches or other user interfaces that cause code (such as property accessors) to be executed, which can, in turn, change the state of the program. Yet another reason is a fandango on core. Many heisenbugs are caused by uninitialized variables.

In an interview Bruce Lindsay tells of being there when the term was first used, and that it was created because Heisenberg said, “The more closely you look at one thing, the less closely can you see something else.”[1]

 

———————-

 

디버깅 모드로 문제를 찾아보려 하면 재현되지 않는 경우를 말하는 듯 하다.

하이젠버그의 불확정성 원리에 빗댄 버그 인듯…

디버그 모드로 하면 문제가 없다가 릴리즈 모드에서만 문제가 발생한다던가..

당연히 멀티 쓰레드 상황에서 디버그로 트랙킹이 안되는 상황등을 말하는듯..

 

머 멀티쓰레드에선 retailmsg나 debugmsg로 흐름 분석을 해보는 수밖에는… -_-;;