Menu

Error I am too dumb for

Help
AvitarX
2007-07-29
2013-03-25
  • AvitarX

    AvitarX - 2007-07-29

    I got WTF installed (I thought) but when I go to the page and log in (correct or false) I get a server error 500.

    The error log reads:

    [Mon Jul 30 00:36:36 2007] [error] [client 196.0.0.252] DBD::mysql::st execute failed: handle 3 is owned by thread 879d988 not current thread 8c41230 (handles can't be shared between threads and your driver may need a CLONE method added) at /wtf/lib/WTF/Apache/Authen.pm line 28.\n

    Any ideas?

     
    • wazzuteke

      wazzuteke - 2007-11-07

      Well three months for a reply ....

      Your certainly not too dumb, it's just an awkward error into what the problem really is.  With not much to go off of, it looks like you are either:

      a) Installing WTF on Windows
      b) Installing WTF under Apache with Threaded MPMs (not default in *nix)

      In both cases, Apache will process requests via POSIX (ish) threads rather than forking independent and linked processes.  That said, earlier versions of DBD::mysql do not support threads.  The error about the CLONE method suggests you are running an earlier version given the new code not only supports threads but also has the CLONE method (http://search.cpan.org/src/CAPTTOFU/DBD-mysql-4.005/lib/DBD/mysql.pm).

      Try upgrading DBD::mysql and see how that works.

      Another shot would be (if you're running under *nix; you're stuck with threaded MPMs under Windows) is compiling Apache with the prefork MPM model. 

      Notably, upgrading Db Driver Perl modules on any system isn't the easiest thing to do, since you normally have to also upgrade DBI its self which also implies you will have to upgrade all Perl drivers on the system.  No fun, but probably necessary to make it work.

      If you're curious ...

      The CLONE method was designed to clear out any private data that will exist in the module that isn't (nor doesn't want to be) mutexed.  Given mutexing serializes stuff in multi-thread land, it's not all that ideal.  Furthermore, since DBI is effectively dealing with file handles (sockets to a database), DBI must be adequately aware of a threaded environment to ensure assumptions that are made regarding shared files are still safe assumptions.  Otherwise, you could send a query through one thread and have another thread pick up the response (in a highly trafficed situation, but easy to come across).

      There are a lot of nitty-gritty details I could get into, but that's the high-level.  Not sure if it helps, but it was fun thinking about and writing down ;)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.