HFS+ driver unstable, causes data loss

Bug #680606 reported by Dan Smith
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linux
New
Undecided
Unassigned
hfsprogs (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: hfsprogs

My setup: MacBook Pro dual-booting in Snow Leopard (10.6.5) and Maverick (10.10). hfsprogs is version 332.25-8.

I've created a partition to share files between OS X and Ubuntu, formatted as HFS+. As I've started to use this partition, I've noticed a variety of troubling problems. I've been able to reproduce the following:

1) Deleting a directory causes a segfault, system freeze, and irreparable partition

- Format the partition with the OS X Disk Utility (HFS+, no journaling)
- Restore a particular large directory from a Time Machine backup to the partition
- Restart in Ubuntu
- Invoke "rm -r" targeting the directory
- segfault occurs
- Various applications freeze, and it's impossible to cleanly shut down
- OS X Disk Utility reports that the disk can't be repaired

2) Deleting a file causes fsck errors

- Format the partition with the OS X Disk Utility (HFS+, no journaling)
- Copy a 20 KB text file (abcd.txt, attached) to the partition
- Restart in Ubuntu
- Invoke fsck on the partition: no errors
- Invoke "rm" targeting the file
- Invoke fsck on the partition: errors ("Invalid volume file count", "Invalid volume free block count")

3) Writing a directory causes Disk Utility errors

- Format the partition with the OS X Disk Utility (HFS+, no journaling)
- Restart in Ubuntu
- Copy ("cp -R") a certain large directory to the partition
- Invoke fsck on the partition: no errors
- Restart in OS X
- Run OS X Disk Utility's verification on the partition: error ("Unused node is not erased")
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: dan 1621 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xc1d00000 irq 45'
   Mixer name : 'Cirrus Logic CS4206'
   Components : 'HDA:10134206,106b0b00,00100301'
   Controls : 19
   Simple ctrls : 12
Card1.Amixer.info:
 Card hw:1 'NVidia'/'HDA NVidia at 0xc1080000 irq 16'
   Mixer name : 'Nvidia GT220 HDMI'
   Components : 'HDA:10de000a,10de0101,00100100'
   Controls : 16
   Simple ctrls : 4
DistroRelease: Ubuntu 10.10
HibernationDevice: RESUME=UUID=466c98b4-b21e-441c-bbdb-5bd91b4d29f4
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
MachineType: Apple Inc. MacBookPro6,2
NonfreeKernelModules: nvidia wl
Package: linux (not installed)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-22-generic root=UUID=c78cc8a4-036a-48f7-a86b-218c04e82030 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=C
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Regression: No
RelatedPackageVersions: linux-firmware 1.38
Reproducible: Yes
RfKill:

Tags: maverick kernel-fs needs-upstream-testing
Uname: Linux 2.6.35-22-generic x86_64
UserGroups: adm admin cdrom dialout dip fax floppy fuse lpadmin netdev plugdev sambashare tape video
dmi.bios.date: 07/26/10
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP61.88Z.0057.B0C.1007261552
dmi.board.asset.tag: Base Board Asset Tag#
dmi.board.name: Mac-F22586C8
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro6,2
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F22586C8
dmi.modalias: dmi:bvnAppleInc.:bvrMBP61.88Z.0057.B0C.1007261552:bd07/26/10:svnAppleInc.:pnMacBookPro6,2:pvr1.0:rvnAppleInc.:rnMac-F22586C8:rvrMacBookPro6,2:cvnAppleInc.:ct10:cvrMac-F22586C8:
dmi.product.name: MacBookPro6,2
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
Dan Smith (dlsmith) wrote :
Revision history for this message
Dan Smith (dlsmith) wrote :

I thought hfsplus was provided entirely by hfsprogs, but I guess it's part of the kernel. I'll run apport-collect to gather my system info.

Revision history for this message
Dan Smith (dlsmith) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Dan Smith (dlsmith) wrote : AlsaDevices.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : AplayDevices.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : ArecordDevices.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : BootDmesg.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Card1.Amixer.values.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Card1.Codecs.codec.0.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Card1.Codecs.codec.1.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Card1.Codecs.codec.2.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Card1.Codecs.codec.3.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : IwConfig.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Lspci.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : Lsusb.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : PciMultimedia.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : ProcModules.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : UdevDb.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : UdevLog.txt

apport information

Revision history for this message
Dan Smith (dlsmith) wrote : WifiSyslog.txt

apport information

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hfsprogs (Ubuntu):
status: New → Confirmed
Revision history for this message
Mike (mike32767) wrote :

I can confirm the buggy behaviour of this driver in a different situation.

1. Connect new USB disk, previously partitioned with GUID partition map on OS X but otherwise unused.
2. "mkfs.hfsplus -v Media /dev/sdi2"
3. "mount -t hfsplus /dev/sdi2 /mnt"
4. Copy a number of large files to /mnt, between a few MB and about 4GB
5. "umount /mnt"
6. "fsck.hfsplus /dev/sdi2"

The results are, surprisingly, non-determinstic: running fsck multiple times in succession will give different results, sometimes it finds no errors, usually it finds some unrecoverable error and exits, but every run is different.

Either way when I plug this drive into a machine running OS X the drive may or may not mount without errors, but although the directory structure appears intact none of the files can be read successfully.

The above steps were tried twice, on two different disks.

This driver isn't even close to fit for purpose and data loss is virtually guaranteed. The driver should be pulled from the kernel, or AT THE VERY LEAST a sizeable warning should be displayed on install, or on mounting a partition read/write.

Linux kernel is standard ubuntu 3.13.0-46-generic, and hfsprogs version is 332.25-11

Revision history for this message
Mike (mike32767) wrote :

Sorry, scratch the above comment - I have a faulty drove caddy.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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