DES has no destroy.al

Discussion in 'Perl Misc' started by Greg G, Nov 19, 2003.

  1. Greg G

    Greg G Guest

    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
    Greg G, Nov 19, 2003
    #1
    1. Advertising

  2. Greg G

    Anno Siegel Guest

    Greg G <> wrote in comp.lang.perl.misc:
    >
    > 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
    Anno Siegel, Nov 21, 2003
    #2
    1. Advertising

  3. Greg G

    Greg G Guest

    Anno Siegel wrote:
    > Greg G <> wrote in comp.lang.perl.misc:
    >
    >>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?


    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.

    >
    >> 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.


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

    >
    >>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?


    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
    Greg G, Nov 21, 2003
    #3
  4. Greg G

    Anno Siegel Guest

    Greg G <> wrote in comp.lang.perl.misc:
    >
    >
    > Anno Siegel wrote:
    > > Greg G <> wrote in comp.lang.perl.misc:
    > >
    > >>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?

    >
    > 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.


    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.

    > >> 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


    [more similar trace lines snipped]

    > >>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.

    >
    > 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
    Anno Siegel, Nov 21, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    366
  2. Alex Nitulescu

    DES Crypto not working ???

    Alex Nitulescu, Feb 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    367
    Kevin
    Feb 13, 2005
  3. =?Utf-8?B?Y2h1YXls?=

    what is TripleDes algorithm DES-EDE3/ECB/NONE

    =?Utf-8?B?Y2h1YXls?=, Jun 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    853
    Alvin Bruney [MVP - ASP.NET]
    Jun 9, 2005
  4. Rob Love

    JCE and DES

    Rob Love, Aug 18, 2003, in forum: Java
    Replies:
    0
    Views:
    445
    Rob Love
    Aug 18, 2003
  5. Ook
    Replies:
    2
    Views:
    312
Loading...

Share This Page