Opened 12 years ago

Closed 12 years ago

#1454 closed bug (duplicate)

Running "tar zxf" on 1.4 MB tar.gz file results in KDL

Reported by: leavengood Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

This is on the latest Haiku revision, hrev22185.

I was trying to untar some JavaScript test files to test my JavaScriptCore port:

tar xvf mozilla.tar.gz

I received the same KDL 3 times. I am not sure if the size of the tar file matters, but to reproduce I would recommend using a tar.gz file of around 1.5 MB, preferably with a lot of small files (part of the Haiku source would probably work.)

Untarring this file worked last night on an older revision (not sure exactly which, maybe a week old.)

Attached is the relevant serial output and the KDL stack trace.

Attachments (1)

tar_kdl.txt (3.5 KB ) - added by leavengood 12 years ago.
Serial output and KDL stack trace

Download all attachments as: .zip

Change History (5)

by leavengood, 12 years ago

Attachment: tar_kdl.txt added

Serial output and KDL stack trace

comment:1 by leavengood, 12 years ago

Also this was on VMWare running in Linux and compiled with GCC4.

FYI the tar.gz in question expands to 16.6 MB with 3757 files. If someone wishes to test with it I uploaded it to http://ryanleavengood.com/files/mozilla.tar.gz

I just tested on hrev22185 compiled with GCC2 and it was fine. So it seems to be a GCC4-only issue.

Another interesting thing was the expanded file seemed to consume 64.3 MB of space on the drive. In other words my 250 MB image had 90.7 MB used before the untarring, then 155 MB used after. Yet Tracker only shows 16.6 MB in that directory. Any ideas why? Even at 4K blocks, 3757 files would only need 15,388,672 bytes if each file used a block.

comment:2 by leavengood, 12 years ago

OK I tested again with a freshly build image using GCC4 and it worked. The other image I was testing with included some of the JavaScriptCore files, though I'm not sure why that would cause a KDL.

I just tested again with an image which included some of the JavaScriptCore stuff and again, the KDL. This happened on 200 MB and 250 MB images, I don't think space is an issue. Weird.

comment:3 by bonefish, 12 years ago

This is a duplicate of #1363. I don't think it's compiler specific. It seems to be an algorithmic problem of bfs' BPlusTree::_SplitNode() method. It apparently can read one (or more?) element out of array bounds and only when the array is aligned with a page boundary the KDL happens. Definitely needs debugging, but everyone is too scared to look into it. ;-)

comment:4 by bonefish, 12 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.