in reply to Segmenation Fault in IO::Uncompress:Bunzip2

Welcome megaframe,

Today this type of error is rare, but I've seen this problem on older systems in the past. My guess is that you have a hardware failure on one of your system disks. Try this,

If they work, then the disk hardware area in the original file(now renamed) has problems. Do not erase the file since you then put the bad area back into the free disk block area. I'd also look at the log files for hardware error messages. Note: Also consider replacing the disk if you have too many of these errors.

Now if the error moves to the new file, then you've found a real bad software problem.

As what has already been mentioned by others, you have a long line that is overflowing an internal buffer. When you get that line using Perl, 'print' the length to the console to see if that helps solve the software problem.

Good Luck...Ed!

"Well done is better than well said." - Benjamin Franklin

  • Comment on Re: Segmenation Fault in IO::Uncompress:Bunzip2

Replies are listed 'Best First'.
Re^2: Segmenation Fault in IO::Uncompress:Bunzip2
by megaframe (Novice) on May 10, 2013 at 17:17 UTC

    Thanks.

    Seems the issue occured on another system on the original ascii file but got copied into the compressed archive and I ended up with the bad chunk.

    Couldn't figure out a clean way to move past it the perl IO::Uncompress::Bunzip2 is allocating a reasonable amount of memory to store the line but the corrupted line is huge and causes a seg fault. Only way would be some C code level fix in that module.

    So I kind of had to leave it there and hunt down and manually clear the several hundred corrupted files.

      Hello megaframe,

      I'm curious about your answer/comment. If I understand you correctly, It sounds like the problem was created on another system and then transferred to your system where the problem occurred for you. If that is correct then you have found a software bug in the utility that generates the archive.

      That implies that you'll get this problem again, and you'll have to manually fix the corrupted files. That doesn't sound like a good fix, but your time is important and maybe it will be years before it happens again. If not try to change the utility on the offending computer.

      Good Luck...Ed

      "Well done is better than well said." - Benjamin Franklin