[ic] workaround found for 99%CPU usage problem in Vend/SessionFile.pm: "::uneval($ref);" fixes it

Mike Heins interchange-users@interchange.redhat.com
Wed Nov 14 19:59:00 2001


Quoting Steffen Dettmer (steffen@dett.de):
> You're right, sorry. It's an SuSE 7.0 distribution:
> Linux stella 2.2.16-SMP #1 SMP Wed Aug 2 20:01:21 GMT 2000 i686 unknown
> with the old Perl 5.005_03.

Aha. This could be part of the problem, particularly if you do
have multiple processors.

> 
> > In any case, the thing you mentioned makes it seem like you
> > have a problem with file locks. I would run my "make test"
> > on Perl and see whether it passed 100%.
> 
> Thank you for the hint. You suggest to do a make test in the perl
> sources, right? I'll have to upgrade Perl anyway, so I'll do it.

If it is Linux, this is probably not an issue other than the general
out-of-datedness of your software.

> 
> File locks could really be problematic, since the file system is a NFS
> share. So this may be a NFS problem? I could check it by moving
> the home of this user to a local file system, this may be a nice
> idea, correct? 

Aha. That is it -- flock() doesn't work across NFS filesystems.
And it won't work at all if you don't have lockd running; even
then you should set LockType to "fcntl" if you want to still
try NFS. But on the 2.2.x kernel series there is not much hope
of it working.

In any case, I am certain if it moves to a local file system
the problem will disappear.

> 
> Do you have an idea why the line "::uneval($ref);" worksarounds
> this problems? After a very quick look at the source I think this
> statement should do nothing but return a "dump" of the referenced
> thing, is that correct? So this statement should do nothing
> except wasteing CPU cycles, correct?
> 
> Well, for me it looks like a mysteria at all. Any ideas?

This is just timing problem. If we can't lock reliably, file-based
sessions simply will not work. You could move to DBI sessions.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

"Laughter is inner jogging." -- Norman Cousins