DES has no destroy.al

G

Greg G

I've got some perl code that's using Crypt::CBC in which I'm generating
a DES key like so:
my $cipher = Crypt::CBC->new( {'key' => '12345678',
'cipher' => 'DES',
'iv' => '87654321',
'regenerate_key' => 0, # default true
'padding' => 'space',
'prepend_iv' => 0
});

Well, at some point, the process falls down. I'm not sure exactly where
in the perl code this is happening, but truss tells me this:

stat("/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/Crypt/DES/DESTROY.al",
0x000C1434) Err#2 ENOENT
open("/usr/local/lib/perl5/5.00503/sun4-solaris/auto/Crypt/DES/DESTROY.al",
O_RDONLY) Err#2 ENOENT
open("/usr/local/lib/perl5/5.00503/auto/Crypt/DES/DESTROY.al", O_RDONLY)
Err#2 ENOENT
open("/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/Crypt/DES/DESTROY.al",
O_RDONLY) Err#2 ENOENT
open("/usr/local/lib/perl5/site_perl/5.005/auto/Crypt/DES/DESTROY.al",
O_RDONLY) Err#2 ENOENT
open("./auto/Crypt/DES/DESTROY.al", O_RDONLY) Err#2 ENOENT

As far as I can tell DES doesn't *have* a DESTROY.al. What does this
mean, and how can I fix it? (Yes, it's an old version of perl, I
realize that. I'd prefer not to upgrade it at this point if I don't
have to.)

Thanks.

-Greg G
 
A

Anno Siegel

Greg G said:
I've got some perl code that's using Crypt::CBC in which I'm generating
a DES key like so:
my $cipher = Crypt::CBC->new( {'key' => '12345678',
'cipher' => 'DES',
'iv' => '87654321',
'regenerate_key' => 0, # default true
'padding' => 'space',
'prepend_iv' => 0
});

Well, at some point, the process falls down.

In what way? Is there no error message?

Your code works for me. Perl 5.8.1, Crypt::CBC 2.08.
I'm not sure exactly where
in the perl code this is happening, but truss tells me this:

stat("/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/Crypt/DES/DESTROY.al",
0x000C1434) Err#2 ENOENT
open("/usr/local/lib/perl5/5.00503/sun4-solaris/auto/Crypt/DES/DESTROY.al",
O_RDONLY) Err#2 ENOENT
open("/usr/local/lib/perl5/5.00503/auto/Crypt/DES/DESTROY.al", O_RDONLY)
Err#2 ENOENT
open("/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/Crypt/DES/DESTROY.al",
O_RDONLY) Err#2 ENOENT
open("/usr/local/lib/perl5/site_perl/5.005/auto/Crypt/DES/DESTROY.al",
O_RDONLY) Err#2 ENOENT
open("./auto/Crypt/DES/DESTROY.al", O_RDONLY) Err#2 ENOENT

As far as I can tell DES doesn't *have* a DESTROY.al. What does this

That doesn't mean perl can't look for one.
mean, and how can I fix it? (Yes, it's an old version of perl, I
realize that. I'd prefer not to upgrade it at this point if I don't
have to.)

There must be tens or hundreds of failed open()s in the truss trace.
This could be the fatal one, but nothing you have reported backs that
up. What makes you think it is?

Anno
 
G

Greg G

Anno said:
In what way? Is there no error message?

Nope. Nothing. Just some unusual behavior. I'm doing this with
some DBD::Oracle stuff and I'm losing all of my open connections to
everything.
Your code works for me. Perl 5.8.1, Crypt::CBC 2.08.

Yeah. That's the funny part. This is working about 90% of the time
for me. I'm having trouble isolating the code fragment that's causing
this to happen.
That doesn't mean perl can't look for one.

It doesn't? Shoot. :) Well, I figured that might be the case. I
guess I'm asking what would make perl look for it.
There must be tens or hundreds of failed open()s in the truss trace.
This could be the fatal one, but nothing you have reported backs that
up. What makes you think it is?

In code that functions, I never see the above entries. I really
don't have that many failed open() calls. There's nothing above this
set of entries that looks unusual (which I realize doesn't really mean
anything).

-Greg G
 
A

Anno Siegel

Greg G said:
Nope. Nothing. Just some unusual behavior. I'm doing this with
some DBD::Oracle stuff and I'm losing all of my open connections to
everything.


Yeah. That's the funny part. This is working about 90% of the time
for me. I'm having trouble isolating the code fragment that's causing
this to happen.

Does that mean the program runs for a while and then spontaneously stops
working? Or does it not work from the start on a bad day?

What are the running conditions? If the error is indeed a failed search
by AutoLoader (see below), there should be a Perl error message.

[more similar trace lines snipped]
It doesn't? Shoot. :) Well, I figured that might be the case. I
guess I'm asking what would make perl look for it.

Apparently the Crypt::DES package has an AUTOLOADER() sub from the
standard AutoLoader module when one of its objects is destroyed.
That would be consistent with the search through .../auto/ directories.
(The call to AUTOLOAD happens *because* Crypt::DES doesn't have a
DESTROY method.)

Just how the AUTOLOAD() gets into Crypt::DES I don't know. I don't
see anything like it in Crypt/DES.pm, but other files can write to the
Crypt::DES namespace too.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top