in reply to Re: segmentation violations
in thread segmentation violations

I profiled the code, and found that it was crashing in DB_File::DoTie_. I checked my version (1.72) and then upgraded to the latest on CPAN (1.802).

When I ran the profile again, this time it crashed in one of my DEBUG routines. I ran it again, and it changed to one of my file locking routines. It seems to be jumping all over the place.

So, I jumped to a FreeBSD machine running 5.6.1, checked out the code and re-ran the identical test and it worked without any problems. Besides the 5.6.1, the other machine also has a newer version of Berkeley DB, so I am rebuilding the DB version on my machine to see if that makes a difference.

(Some time passes...) I changed from Berkeley DB 2.4.14 to 2.7.7 (to match one of the production machines), re-ran the script and sure enough, it moved the segmentation violation to yet another place in the code :-(

At this point, I am have to go with the assumption that the problem is caused by Perl 5.6.0

Replies are listed 'Best First'.
Re: Re: Re: segmentation violations
by BrowserUk (Patriarch) on Sep 11, 2003 at 21:51 UTC
    (Some time passes...)

    Sorry! I did warn you it slowed things down:)

    On the basis of what you have posted, I'd have to concur. It may well be that the 'fix' for 5.6.0 would be to downgrade your copy of DB_File rather than unpgrade, assuming the earlier version is still available, but if upgrading your build to 5.6.1 works, that is probably the easiest and safest route. There were lots of things fixed between 5.6.0, and 5.6.1, and your bug could well be another manifestation of one of those fixed bugs.

    You might try searching the changes file and bug lists for 5.6.0/5.6.1 and see if anything there looks like it might be your problem, but even if you found it, all you would know is that you had to upgrade to get the fix (or possibly where to obtain a patch so that you could re-build 5.6.0 to correct that one bug), but in the end, if the upgrade does the trick, knowing why it does is just icing.

    Good luck.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.