fsck.hfsplus gives segmentation fault

Bug #234516 reported by Lars Noodén on 2008-05-24
Affects Status Importance Assigned to Milestone
hfsprogs (Debian)
Fix Released
hfsprogs (Ubuntu)
Laurent Bigonville

Bug Description

Binary package hint: hfsprogs

Running fsck.hfsplus gives a segmentation fault. This is running it plain, e.g. fsck.hfsplus /dev/sda6, or with a few parameters, e.g. fsck.hfsplus -nd /dev/sda6

This is on Kubuntu 8.04 as provided by kubuntu-kde4-8.04-alternate-amd64.iso plus subsequent updates.

Package: hfsprogs
332.14-1 (/var/lib/apt/lists/fi.archive.ubuntu.com_ubuntu_dists_hardy_universe_binary-amd64_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/fi.archive.ubuntu.com_ubuntu_dists_hardy_universe_binary-amd64_Packages
                  MD5: 423d6e2718114e57fd40ee87e30beaef

$ dpkg -S fsck.hfsplus
hfsprogs: /usr/share/man/man8/fsck.hfsplus.8.gz
hfsprogs: /sbin/fsck.hfsplus

$ lsb_release -rc
Release: 8.04
Codename: hardy

It segfaults like this:

 # mount |grep sda5
 /dev/sda5 on /home type hfsplus (rw,noexec,nodev,relatime)
 # umount /dev/sda5
 # fsck.hfsplus /dev/sda5
 ** /dev/sda5
 ** Checking HFS Plus volume.
 Segmentation fault

Here is the response from Rogério Brito over at Debian:

> *Please*
> upgrade your package to Debian's revision -4 or else you will have
> problems doing an fsck (and ask Ubuntu to do the same thing).

I think it's relevant here.

Johannes H. Jensen (joh) wrote :

I can confirm this on hardy.

Laurent Bigonville (bigon) wrote :

The bug should be fixed on intrepid

Changed in hfsprogs:
importance: Undecided → Medium
status: New → Confirmed
status: Confirmed → Fix Released
status: New → Confirmed
importance: Undecided → Medium
Laurent Bigonville (bigon) wrote :

The last -4 debian revision of the package fix this issue the diff between -1 and -4 are minimal and I think that fake syncing the -4 revision in hardy maybe a good idea

Laurent Bigonville (bigon) wrote :
Laurent Bigonville (bigon) wrote :
Changed in hfsprogs:
assignee: nobody → bigon

Surely you can narrow it down more than that. It'd be much better to only
make the change needed to fix the problem.

Changed in hfsprogs:
status: Unknown → New
Laurent Bigonville (bigon) wrote :

Most of the patch is related to the fix of this bug

The only other things are the lintian override, the Standards-Version and only building the needed tools instead of all, I will make a smaller page tonight if you prefere

Scott Kitterman (kitterman) wrote :

Please. For SRU should be the minimal fix.

Laurent Bigonville (bigon) wrote :

here a minimal debdiff against current hardy version that fix this issue

Jonathan Riddell (jr) wrote :

I've rejected the current upload which had the excessivly long debdiff. Waiting on ScottK to give feedback on the one in comment 11.

Scott Kitterman (kitterman) wrote :

Ack from motu-sru. Please go ahead and upload to hardy-proposed.

Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in hfsprogs:
status: Confirmed → Fix Committed
Changed in hfsprogs:
status: New → Fix Released
Martin Pitt (pitti) wrote :

Lars, anyone else, any testing feedback? Thanks!

lars (lars-umich) wrote :

You're great!

It looks like fsck.hfsplus functions on Lenny-Beta2 on AMD64.

Martin Pitt (pitti) wrote :

Right, but could anyone confirm that the version in hardy-proposed works now?

Ok. (My workload varies.) I now have a machine with Hardy Heron.

As far as I can tell, fsck.hfsplus works there as well. Below is my
method of testing:

$ apt-get install -t hardy-proposed hfsplus hfsutils hfsprogs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
Suggested packages:
The following NEW packages will be installed:
  hfsplus hfsprogs hfsutils libhfsp0
0 upgraded, 4 newly installed, 0 to remove and 31 not upgraded.
Need to get 284kB of archives.
After this operation, 930kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://fi.archive.ubuntu.com hardy/main libhfsp0 1.0.4-12build1
Get:2 http://archive.ubuntu.com hardy-proposed/universe hfsprogs
332.14-1ubuntu0.1 [123kB]
Get:3 http://fi.archive.ubuntu.com hardy/main hfsplus 1.0.4-12build1
Get:4 http://fi.archive.ubuntu.com hardy/main hfsutils 3.2.6-11build1
Fetched 284kB in 0s (296kB/s)
Selecting previously deselected package libhfsp0.
(Reading database ... 103773 files and directories currently installed.)
Unpacking libhfsp0 (from .../libhfsp0_1.0.4-12build1_i386.deb) ...
Selecting previously deselected package hfsplus.
Unpacking hfsplus (from .../hfsplus_1.0.4-12build1_i386.deb) ...
Selecting previously deselected package hfsprogs.
Unpacking hfsprogs (from .../hfsprogs_332.14-1ubuntu0.1_i386.deb) ...
Selecting previously deselected package hfsutils.
Unpacking hfsutils (from .../hfsutils_3.2.6-11build1_i386.deb) ...
Setting up libhfsp0 (1.0.4-12build1) ...

Setting up hfsplus (1.0.4-12build1) ...
Setting up hfsprogs (332.14-1ubuntu0.1) ...
Setting up hfsutils (3.2.6-11build1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place

$ dd if=/dev/zero bs=512 count=2048 of=/tmp/foo
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB) copied, 0.0131632 s, 79.7 MB/s

$ mkfs -t hfsplus /tmp/foo
Initialized /tmp/foo as a 1024 KB HFS Plus volume

$ mkfs -t hfsplus /tmp/foo
$ fsck /tmp/foo
fsck 1.40.8 (13-Mar-2008)
** /tmp/foo
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking volume bitmap.
** Checking volume information.
** The volume untitled appears to be OK.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hfsprogs - 332.14-1ubuntu0.1

hfsprogs (332.14-1ubuntu0.1) hardy-proposed; urgency=low

  * SRU: Fix fsck crash on amd64 (LP: #234516)
  * Modify Maintainer value to match the DebianMaintainerField

 -- Laurent Bigonville <email address hidden> Tue, 24 Jun 2008 00:58:06 +0200

Changed in hfsprogs:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.