jepri has asked for the wisdom of the Perl Monks concerning the following question:

I had been using Tie::DBI in a CGI app I was writing. All was working nicely, but as the project progressed, the script starting segfaulting randomly, usually near a database access (I found it difficult to get debugging information near the the point where it segfaulted. Repeated the query usually worked.

Then I started concurrency testing, and discovered to my horror that I was getting consistent segfaults while two or more people were accessing the site at the same time.

At this point I am well on the way to converting my scripts back to 'plain' DBI, so I am not looking for an answer as such, just wondering if there is some piece of knowledge that I have overlooked.

I haven't submitted a bug report because I have no idea what could be going wrong.

____________________
Jeremy
I didn't believe in evil until I dated it.

  • Comment on Serious concurrency issues with Tie::DBI

Replies are listed 'Best First'.
Re: Serious concurrency issues with Tie::DBI
by Stegalex (Chaplain) on Oct 06, 2001 at 21:22 UTC
    Pardon my ignorance, but are you using a DBMS? If so, please tell us what it is (including version) along with info about h/w, os, versions for everything.
      I wasn't able to find out what a DBMS is (DataBase Management System?), but I was using PostGreSQL 6.5 with Perl 5.3 (5.005.3). I can't recall the version of Tie::DBI, but I installed it in March, so it would be 0.8x.

      Oh yeah, OS. Debian potato, kernel 2.2.18, running on a P-one hundred and something with 32 MB ram.

      The author of Tie::DBI does state in the docs that DBD::Pg is broken when dealing with NULL values, but DBI with DBD::Pg seems to cope fine so I don't know what's wrong there.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

        Hmmm.

        Are you segfaulting under Apache or are you running your process from the command line or cron? If you are segfaulting under Apache and you are using mod_perl, you should upgrade mod_perl to v 1.24. Earlier versions have serious problems.

        Also, Is there a reason you have not yet upgraded your Perl to 5.6?

        My generic advice is to check the CPAN and upgrade your modules (such as DBD:Pg, DBI, mod_perl, and any others).

        Let me know if you get any joy from this.