[Isocops] Build problem

DeMajistre, Bob Bob.DeMajistre at jhuapl.edu
Thu Jun 3 15:28:56 EDT 2010


I've put in a fix for this intermittent failure. Someone (Geoff, Roland,
Ken, Nathan?) should let their eyes rest lightly on what I did to be sure I
haven't hosed anything - this is the first time I've gone full loop on
software maintenance at the ISOC.

TO MAKE THE CHANGE
1) I copied the file (make_me_bin_overlay.pro) out of
/usr/local/ibex/sw/isoc/src/infra/idl to a working area
2) I set up some stuff to test it in my work area
3) I made the change, did the tests and copied it back to src/infra/idl
4) in /usr/local/ibex/sw/build-3.3/isoc/infra/idl, I did
make clean
make all
5) I checked all the *.errs file (more *.errs) to be sure everything
compiled cleanly
6) in infra/idl/test I executed
make check
Which ended with
===================
All 23 tests passed
===================
7) I committed make_me_bin_overlay.pro

THE CHANGE I MADE
The problem was the creation of a temporary file. The filename was
hardcoded, so that if it wasn't deleted properly, the file creation would
fail on the next attempt to run the routine. This would also happen in the
unlikely event that two processes used the routine at the same time.

To fix this, I did a few things. First, I added a keyword in the call to the
routine so the caller could direct the temporary file to an arbitrary
location. I kept the old name as a default, but added the system time to the
end of it so that it would almost always be unique. To be REALLY sure,
before opening the file, I check for the existence of a file with the same
name. If the file already exists, I append more stuff to it and check again.

In the end, someone may want to check /tmp to be sure an army of zombies
isn't being created.

Bob



On 6/2/10 5:18 PM, "Geoff Crew" <gbc at space.mit.edu> wrote:

> You're the IDL expert, so I'll bet Ken will defer to you.  ;-)
> 
> I created the mess as I didn't know a quick way of passing the
> information between IDL and ibex_rotate.  I suspect IDL has some
> way of qualifying my (static) temporary name with one that is
> user and process specific--that certainly reduces the cross-section
> for this problem.
> 
> If I had been writing in shell syntax I'd have done:
> 
>   /tmp/IDLsuxReallyBadly-$USER-$$
> 
> (and of course, removed it 5 lines later) so there's little risk of
> filling up /tmp with such things, even if someone is agressively
> typing ^C.
> 
> In the normal operation the file should only exist for a fraction of a
> second (i.e. while ibex_rotate is running) and then be deleted by IDL
> which is why this is a "bump-in-the-night" sort of bug rarely seen.




More information about the Isocops mailing list