odd crash in file upload via CGI

Discussion in 'Perl Misc' started by msoulier, Jul 31, 2006.

  1. msoulier

    msoulier Guest

    Hey people,

    This one is baffling me. I'm moving from a RedHat 7.3 platform to
    CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.

    I have an upload dialog making use of a CGI with the CGI module that
    works fine on the old platform, but all I get on the new platform is an
    internal server error, due to no content being sent back to apache.

    It would seem that the interpreter is sending nothing, and I'm having a
    hell of a time finding out why. Running it on the command line with the
    same environment does not produce similar results (thus, the
    environment is obviously not similar enough). And yet, it seems like
    the interpreter might just be crashing out for some reason.

    Suggestions appreciated as to how to troubleshoot this going forward.

    Mike
     
    msoulier, Jul 31, 2006
    #1
    1. Advertising

  2. msoulier

    Guest

    "msoulier" <> wrote:
    > Hey people,
    >
    > This one is baffling me. I'm moving from a RedHat 7.3 platform to
    > CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.
    >
    > I have an upload dialog making use of a CGI with the CGI module that
    > works fine on the old platform, but all I get on the new platform is an
    > internal server error, due to no content being sent back to apache.


    Does a simple "hello world" CGI work? Does your log file contain anything
    useful?

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Jul 31, 2006
    #2
    1. Advertising

  3. msoulier

    Ben Morrow Guest

    Quoth "msoulier" <>:
    > Hey people,
    >
    > This one is baffling me. I'm moving from a RedHat 7.3 platform to
    > CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.
    >
    > I have an upload dialog making use of a CGI with the CGI module that
    > works fine on the old platform, but all I get on the new platform is an
    > internal server error, due to no content being sent back to apache.
    >
    > It would seem that the interpreter is sending nothing, and I'm having a
    > hell of a time finding out why. Running it on the command line with the
    > same environment does not produce similar results (thus, the
    > environment is obviously not similar enough). And yet, it seems like
    > the interpreter might just be crashing out for some reason.
    >
    > Suggestions appreciated as to how to troubleshoot this going forward.


    Run it as whatever user it gets run as when it's called as a CGI.
    CGI::Carp

    Ben

    --
    'Deserve [death]? I daresay he did. Many live that deserve death. And some die
    that deserve life. Can you give it to them? Then do not be too eager to deal
    out death in judgement. For even the very wise cannot see all ends.'
     
    Ben Morrow, Jul 31, 2006
    #3
  4. msoulier

    msoulier Guest

    wrote:
    > Does a simple "hello world" CGI work? Does your log file contain anything
    > useful?


    CGIs work in general, yes. This CGI works fine in fact, except for this
    one feature.

    [Mon Jul 31 11:51:46 2006] [error] [client 127.0.0.1] Premature end of
    script headers: tug, referer:
    https://10.33.15.145/server-manager...nupage=1&.id=85ea497895b72e17ca7a1a8b94edbef3

    Basically says that the CGI returned prematurely, as it returning
    nothing.

    Mike
     
    msoulier, Jul 31, 2006
    #4
  5. msoulier

    msoulier Guest

    Ben Morrow wrote:
    > Quoth "msoulier" <>:
    > > Hey people,
    > >
    > > This one is baffling me. I'm moving from a RedHat 7.3 platform to
    > > CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.
    > >
    > > I have an upload dialog making use of a CGI with the CGI module that
    > > works fine on the old platform, but all I get on the new platform is an
    > > internal server error, due to no content being sent back to apache.
    > >
    > > It would seem that the interpreter is sending nothing, and I'm having a
    > > hell of a time finding out why. Running it on the command line with the
    > > same environment does not produce similar results (thus, the
    > > environment is obviously not similar enough). And yet, it seems like
    > > the interpreter might just be crashing out for some reason.
    > >
    > > Suggestions appreciated as to how to troubleshoot this going forward.

    >
    > Run it as whatever user it gets run as when it's called as a CGI.
    > CGI::Carp


    Yeah, tried CGI::Carp already, and ran it as the right user. However, I
    just removed and eval call and this error popped up. For some reason
    the eval masked the problem. Perhaps it crashed the interpreter, not
    sure.

    Can't coerce GLOB to string in entersub at
    /usr/lib/perl5/site_perl/5.8.0/Persistence/Object/Simple.pm line 125.

    So this is apparently my issue. I didn't see it because evaling the
    code and checking $@ for some reason did not turn the issue up. Very,
    very odd.

    Mike
     
    msoulier, Jul 31, 2006
    #5
  6. msoulier wrote:
    > Ben Morrow wrote:
    >> Quoth "msoulier" <>:
    >>> Hey people,
    >>>
    >>> This one is baffling me. I'm moving from a RedHat 7.3 platform to
    >>> CentOS 4.3, which includes a move from Perl 5.6.1 to 5.8.5.

    ^^^^^
    >
    > Yeah, tried CGI::Carp already, and ran it as the right user. However, I
    > just removed and eval call and this error popped up. For some reason
    > the eval masked the problem. Perhaps it crashed the interpreter, not
    > sure.
    >
    > Can't coerce GLOB to string in entersub at
    > /usr/lib/perl5/site_perl/5.8.0/Persistence/Object/Simple.pm line 125.

    ^^^^^

    Is the version discrepancy between 5.8.5 and 5.8.0 expected... Could
    your environment be picking up older installs...

    --
    Charles DeRykus
     
    Charles DeRykus, Jul 31, 2006
    #6
  7. msoulier

    msoulier Guest

    Charles DeRykus wrote:
    > Is the version discrepancy between 5.8.5 and 5.8.0 expected... Could
    > your environment be picking up older installs...


    I don't believe so, but I suppose I should ask the CentOS people, and
    the owner of the Dag repository. I believe that's where the code is
    coming from.

    Mike
     
    msoulier, Aug 1, 2006
    #7
  8. msoulier

    msoulier Guest

    Heisenbug! was: odd crash in file upload via CGI

    msoulier wrote:
    > Can't coerce GLOB to string in entersub at
    > /usr/lib/perl5/site_perl/5.8.0/Persistence/Object/Simple.pm line 125.


    And believe it or not, this little bit of code prevents it from
    happening.

    foreach my $param ($cgi->param)
    {
    my $val = $cgi->param($param);
    my $string = "$val";
    }

    Seems completely unrelated, but if I don't stringify the incoming
    parameters once, then it crashes.

    Any perl gurus with black magick to explain this one for me?

    Cheers,
    Mike
     
    msoulier, Aug 1, 2006
    #8
  9. msoulier

    Paul Lalli Guest

    Re: Heisenbug! was: odd crash in file upload via CGI

    msoulier wrote:
    > msoulier wrote:
    > > Can't coerce GLOB to string in entersub at
    > > /usr/lib/perl5/site_perl/5.8.0/Persistence/Object/Simple.pm line 125.

    ^^^^^
    > Any perl gurus with black magick to explain this one for me?


    5.8.0 is notoriously buggy. You use known-buggy software, you
    encounter bugs. Upgrade.

    Paul Lalli
     
    Paul Lalli, Aug 1, 2006
    #9
  10. msoulier

    msoulier Guest

    Re: Heisenbug! was: odd crash in file upload via CGI

    Paul Lalli wrote:
    > 5.8.0 is notoriously buggy. You use known-buggy software, you
    > encounter bugs. Upgrade.


    If you'll check the thread, you'll find that I'm running 5.8.5.

    Mike
     
    msoulier, Aug 2, 2006
    #10
  11. msoulier

    Paul Lalli Guest

    Re: Heisenbug! was: odd crash in file upload via CGI

    msoulier wrote:
    > Paul Lalli wrote:
    > > 5.8.0 is notoriously buggy. You use known-buggy software, you
    > > encounter bugs. Upgrade.

    >
    > If you'll check the thread, you'll find that I'm running 5.8.5.


    If you'll check the paths in the error messages, you'll see you're
    using modules from a 5.8.0 installation.

    Paul Lalli
     
    Paul Lalli, Aug 2, 2006
    #11
  12. msoulier

    msoulier Guest

    Re: Heisenbug! was: odd crash in file upload via CGI

    Paul Lalli wrote:
    > If you'll check the paths in the error messages, you'll see you're
    > using modules from a 5.8.0 installation.


    Indeed, as packaged by CentOS. Still, the interpreter is 5.8.5, and I
    tried a newer CGI::persistent and it didn't fix the issue. We seem to
    be using the latest Persistence::Object::Simple and the latest
    Data::Dumper, which is where the error appears to be occurring.

    Mike
     
    msoulier, Aug 2, 2006
    #12
    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. laniik
    Replies:
    4
    Views:
    421
    laniik
    Apr 8, 2005
  2. ZER0K3WL

    Using mysqlclient library -- odd crash

    ZER0K3WL, Sep 30, 2004, in forum: C Programming
    Replies:
    2
    Views:
    305
    Peter Slootweg
    Oct 1, 2004
  3. Michael Speer

    Odd behavior with odd code

    Michael Speer, Feb 16, 2007, in forum: C Programming
    Replies:
    33
    Views:
    1,144
    Richard Heathfield
    Feb 18, 2007
  4. B. Chernick
    Replies:
    1
    Views:
    341
    B. Chernick
    Dec 12, 2007
  5. Chris Bergstresser

    Odd PyQt4 crash on exit when importing on windows

    Chris Bergstresser, Apr 6, 2008, in forum: Python
    Replies:
    0
    Views:
    427
    Chris Bergstresser
    Apr 6, 2008
Loading...

Share This Page