[Isocops] Build problem

Geoffrey B. Crew gbc at space.mit.edu
Wed Jun 2 17:18:42 EDT 2010


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.

-- 

		Geoff (gbc at space.mit.edu)

On Wed, Jun 02, 2010 at 04:56:37PM -0400, DeMajistre, Bob wrote:
> This answers the question that I posted to the list earlier.
> I'm going to summarize my understanding to make sure I have it right here:
> 
> >From this (and more poking around) I understand that Jacob was running
> make_me_bin_overlay
> And it died before it was able to delete the temporary file (used as an
> argument buffer for a call to ibex_rotate from IDL). When the process
> running the check tried to execute make_me_bin_overlay, it found that the
> temporary file already existed in such a way that it couldn't be modified,
> so it barfed all over the floor. Similarly, any other process using this
> code would also barf.
> 
> A quick check of infra/idl and pipe/sci/idl shows that make_me_bin_overlay
> is the only code that uses a temporary file in /tmp (or at least it's the
> only one found by grep /tmp/ *.pro). So this is the only place that this is
> a problem. 
> 
> It would seem to me that the way it is coded now, zombie files might not be
> the only problem (e.g., if two people or processes use make_me_bin_overlay
> at the same time, it can't end well). This is pretty easy to fix quickly,
> but I would hesitate to do so without coordinating with others. What is the
> right way to get this fixed? Is this a Ken question?
> 
> Bob
> 
> 
> On 6/2/10 9:44 AM, "Geoff Crew" <gbc at space.mit.edu> wrote:
> 
> > This is a good example (Roland) of why putting temporary files in /tmp
> > is a bad idea.
> > 
> > svn wasn't informed about createDFluxvsLatNorm.pro, but that actually
> > isn't a problem (yet).
> > 
> > If you look at the log file, you'll find:
> > 
> >   FAIL: try_skymap.sh
> >   ...
> >   Leaving directory `/usr/local/ibex/sw/build-3.3/isoc/infra/idl/test'
> > 
> > for the devel environment, and similarly for the gbc environment.
> > 
> > I'll comment as an aside that the nightly I have running on my home
> > machine had no trouble at all.  That is a useful, but not essential hint.
> > 
> > It's reproducible:
> > 
> >   $ cd /home/gbc/IBEX/sw/build-3.3/isoc/infra/idl/test
> >   $ make check TESTS=try_skymap.sh
> >   ...
> >   FAIL: try_skymap.sh
> >   ==================================
> >   1 of 1 tests failed
> >   Please report to gbc at space.mit.edu
> >   ==================================
> > 
> >   $ ls -ltr
> >   ... (lots of 3am files) ...
> >   -rw-rw---- 1 gbc isoc   6323 Jun  2 09:31 sky-sample-flat.png
> >   -rw-rw-r-- 1 gbc isoc    530 Jun  2 09:31 sky-sample-flat.geom.errs
> >   -rw-rw---- 1 gbc isoc  15395 Jun  2 09:31 sky-sample-orig.png
> >   -rw-rw---- 1 gbc isoc   1207 Jun  2 09:31 sky-sample.errs
> > 
> > Looking at the last one:
> > 
> >   ...
> >   % OPENW: Error opening file. Unit: 101, File: /tmp/IDLsuxReallyBadly
> >     Permission denied
> >   $ l /tmp/IDLsuxReallyBadly
> >   -rw-rw---- 1 jacob707 jacob707 1295 Jun  1 18:20 /tmp/IDLsuxReallyBadly
> > 
> > So removing the file will solve this problem.
> > 
> > A grep in the source directory (the parent of the test directory) suggests
> > that Jacob must have done a ^C (or IDL died of its own accord) between:
> > 
> >   openw,lun,'/tmp/IDLsuxReallyBadly',/get
> >   ...
> >   file_delete,'/tmp/IDLsuxReallyBadly'
> > 
> > Someone IDL knowledgeable could fix this code so the temp file has the
> > PID in the name.  (I.e. time to fix this sloppy code.)
> 
> 
> 
> Please restrict discussions on this email list to non-ITAR sensitive topics.
> ______________________________________________
> Isocops mailing list
> Isocops at lists.sr.unh.edu
> http://lists.sr.unh.edu/mailman/listinfo/isocops


More information about the Isocops mailing list