Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Bug of the Month - May 2012

Matt Schuetze1 Absent Member.
Absent Member.
0 0 1,458

The May bug story gives me one more chance to ski before the dog days of summer hit Detroit. A very close customer, let’s call him Chris, hit a apparent hang running BoundsChecker under his rather large 3D app, an app so large, it’s really the Max of 3D apps. Anyway, Rick recognized that Chris’s app was falling over in way that he could reproduce, so he took the case on as his highest priority queued work item. The crux of this story is that a very small snowball was tripping an avalanche. The snowball turned out to be a small oversight in ASCII versus Wide function validations. This conflict however, triggered exception handling code inside Chris’s application to take its own mini dump in an attempt to capture the fault. The mini dump process naturally asked the rest of the application to suspend all its threads, including the BoundsChecker threads in its backend core modules, while the mini dump thread collected stack details for all other threads. This tenacious API therefore also suspended the BoundsChecker communication thread, thereby stalling the shared memory interprocess communication chain back to the BoundsChecker front end inside Visual Studio, freezing up that process too. AVALANCHE! In all, this feels like skiing down a bunny hill, only to find a howling wind-swept corridor leading straight down the north face of Mount Everest. Rick of course brings out a pair of trick skis for cases like this. After cruising the bunny hill, he then pulled out a parachute, night vision goggles, and a laser range finder to descend Everest in style. The trick moves he pulled from the seat of his snow pants included: intercepting SuspendThread( ) properly, collecting all of BoundsChecker’s back side critical sections, letting SuspendThread do its thing, and then releasing all the critical sections, except of course for the communications thread who should never be stopped, which now tells SuspendThread() to buzz off and aborts the suspend API call. Oh, and he corrected the triggering ASCII/Wide oversight snowball too, a difference between 32 versus 48 bytes worth of one parameter: output buffer size. But I cannot do written justice to the actual techniques. Listen to Rick in his own words and consider whether this was triple black diamond or just a green run.

If you want the audio for a podcast version, then download attached file RickSuspendThread.wma.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.