in reply to Re: segmentation violations
in thread segmentation violations

Thanks for the reply.

I'll put the code through gdb. I've had limited experience with the perl source, as I did managed to get a Perl 4 version running on VMS many years ago.

I'd forgetton about 'out of memory' as a cause, I will definitely look into that. Its also really helpful to know that regexes can cause problems as well, although in this case I would think the segmentation violation would be 'repeatable'.

Unfortunately, the smaller/shorter versions of the code all work correctly. If I re-run the code when the underlying data is exactly identical the segmentation violation is repeatable, but any type of change to the code or the input causes it to significantly move to earlier or later parts of the code.

The code is portable, I've run it on ActiveState's 5.6.1 for NT, and it worked correctly. That's one of the reasons why I think its compiled code that sits inside of one of the modules, but that could also imply that the problem is with 5.6.0. I use a large number of Perl modules, Storable being one, and an older version (2.x) of Berkeley DB.I haven't had any problems with the shorter smaller versions, its only whe it all comes together and runs for a long period of time.

Thanks.

Replies are listed 'Best First'.
Re: Re: Re: segmentation violations
by Phomer (Novice) on Sep 11, 2003 at 20:22 UTC
    I checked memory and its appears the script is just slightly over 11Mbs when it dies (which for my machine is very small). I am actually surprised to see the usage so low. Similar scripts that I've written for the same problem often exceed 40Mbs.

    I can't shorted the code and get the segmentation violation but I've found a set of data (and circumstances) that causes the crash to occur about 10 mins.