Re: Storable segfaulting

2002-02-23 Thread rise

On 18 Feb 2002, raptor wrote:

> I have object that inherit Storable... so I store the object.. later
> when I try to "retrieve" the object I get :
>
> Segmentation fault (11)
>
> Mandrake 8.1, Storable 1.012
>
> Can u help me .

I'll be glad to try.  There's an individual on p5p who is seeing a
segfault with CPAN under bleadperl and suspects Storable.  It'd help us
trace this if you can give me sample code that triggers the bug.

-- 
Jonathan Conway   [EMAIL PROTECTED]

Not only is there no accounting for taste, there is no accounting for what can
happen when entirely new tech meets bad taste. [John P. Caplinger]




Re: Storable segfaulting

2002-02-23 Thread rise

On 18 Feb 2002, raptor wrote:

> Date: 18 Feb 2002 12:56:36 +0200
> From: raptor <[EMAIL PROTECTED]>
> To: modperl <[EMAIL PROTECTED]>
> Subject: Storable segfaulting
>
> hi,
>
>
> I have object that inherit Storable... so I store the object.. later
> when I try to "retrieve" the object I get :
>
> Segmentation fault (11)
>
> Mandrake 8.1, Storable 1.012
>
> Can u help me .

This may have to do with Bugid 20020221.007 which I submitted to perlbug a
couple of days ago:
http://bugs.perl.org/_perlbug.cgi?req=bug_id&bug_id=20020221.007&format=H&trim=25&range=412

The short summary is that a scalar object consisting of an empty
string (but not undef) stored and retrieved by Storable will cause a
segmentation fault/SEGV/Bus error at a point soon after the retrieval.
This occurs regardless of whether the primary reference you store is
the object or another object/reference such as a hash or array that
contains the object.  The simplest test case I've come up with is:

#
#! /usr/bin/perl
use Storable;

package TestString;
sub new {
my ($type, $string) = @_;
return bless(\$string, $type);
};

1;

my $empty_string_obj = TestString->new('');
my $clone = Storable::dclone($empty_string_obj);
#

You might want to check if you're doing something similar in your code
(and ending up with an empty string object isn't that hard to do).  If
you're not it may indicate a different bug or just that the bug goes
deeper than I thought.


-- 
Jonathan Conway   [EMAIL PROTECTED]

Not only is there no accounting for taste, there is no accounting for what can
happen when entirely new tech meets bad taste. [John P. Caplinger]




Re: DB_File needs compatible versions

2001-10-02 Thread rise

On Tue, 2 Oct 2001, [EMAIL PROTECTED] wrote:

> I just installed apache 1.3.20, mod_perl 1.26 on a Redhat 7.1
> perl 5.6.0
>
> When I go to start apache with my startup.pl file it fails and says
>
> DB_File needs compatible versions of libdb & db.h
> you have db.h version 3.1.17 and libdb version 2.4.14

You've run into the classic problem of having a DB version preinstalled
(or as part of glibc) that wasn't fully replaced by a new install.
You're getting the DB header from the new install and the library from the
old.  My solution (on SuSE) was to use LD_PRELOAD, but your best bet
is to try the recommendations in the troubleshooting section of the
DB_File distribution's README.  The sections "Incompatible versions of
db.h and libdb" and "Linux Notes" are particularly relevant.  The file
docs/ref/build_unix/shlib.html in the Berkeley DB distribution also
discusses the details of shared library versions.

-- 
Jonathan Conway"Reverse Polish LISP" - for those times Forth
[EMAIL PROTECTED]just isn't on enough crack.







Re: Interfacing from Apache to Access

2000-07-11 Thread rise

On Tue, 11 Jul 2000, Mike Miller wrote:
> Not good for heavy use, but for the 3-4 times a month
> it gets used in production, it works perfectly okay.

There is one significant issue with using DBD::Proxy / DBI::ProxyServer on
Windows: lack of fork. If you're going to be using it you probably want to
either use 5.6 (problem mostly solved) or start several proxies on
differenct ports. Check the PlRPC & Net::Daemon docs for informations
about forking. This is mainly annoying because only one connection can use
the single process proxy at once. Otherwise we've seen no problems with
using it as production method to slurp data from an Access DB into a
RRDBMS (Real Relational Database Management System tm).

Jonathan Conway
Senior DBA
ipoPros.com