HFS+ unable to access random files after a while

Bug #1332950 reported by Luc Pi
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I have a dual boot OSX+Ubuntu on a Macbook.
The drive is a SSD.
I use a partition to share files between both.
The partition is HFS+ Non journalized Case sensitive.

It has been some weeks (months?) now that accessing some files fails.
It's only some files, not others. I see no obvious reason why these ones and not others.
Usually unmounting and remounting may give access back, but not always.
After a while again some files start to be unaccessible. Not especially the same files as earlier.
Checking the filesystem either on OSX or Ubuntu sometimes gives errors, but not always.

The type of error I get is like:
$ ls -l .
total 0
drwxr-xr-x 1 me me 14 Jun 20 13:09 originals
$ ls foo/
ls: reading directory foo/: Invalid argument
$ touch foo/bar
touch: setting times of ‘foo/bar’: Invalid argument

Or in nautilus, I get errors like
Sorry, could not display all the contents of “foo”: Error when getting information for file '/media/share/foo/baz': Invalid argument

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.13.0-29-generic 3.13.0-29.53
ProcVersionSignature: Ubuntu 3.13.0-29.53-generic 3.13.11.2
Uname: Linux 3.13.0-29-generic i686
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: luc 1833 F.... pulseaudio
CurrentDesktop: GNOME
CurrentDmesg: Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
Date: Sun Jun 22 14:16:35 2014
InstallationDate: Installed on 2014-06-17 (5 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140417)
MachineType: Apple Inc. MacBook2,1
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-29-generic root=UUID=e1b6b6c0-1e2f-4166-bb03-6fa39d8af4de ro quiet splash vt.handoff=7
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
WifiSyslog:

dmi.bios.date: 06/27/07
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MB21.88Z.00A5.B07.0706270922
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Mac-F4208CA9
dmi.board.vendor: Apple Inc.
dmi.board.version: PVT
dmi.chassis.asset.tag: Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F4208CA9
dmi.modalias: dmi:bvnAppleInc.:bvrMB21.88Z.00A5.B07.0706270922:bd06/27/07:svnAppleInc.:pnMacBook2,1:pvr1.0:rvnAppleInc.:rnMac-F4208CA9:rvrPVT:cvnAppleInc.:ct10:cvrMac-F4208CA9:
dmi.product.name: MacBook2,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.
---
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: luc 1833 F.... pulseaudio
CurrentDesktop: GNOME
CurrentDmesg:
 Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
 dmesg: write failed: Broken pipe
DistroRelease: Ubuntu 14.04
InstallationDate: Installed on 2014-06-17 (5 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140417)
MachineType: Apple Inc. MacBook2,1
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-29-generic root=UUID=e1b6b6c0-1e2f-4166-bb03-6fa39d8af4de ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.13.0-29.53-generic 3.13.11.2
Tags: trusty
Uname: Linux 3.13.0-29-generic i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: sudo
WifiSyslog:

_MarkForUpload: True
dmi.bios.date: 06/27/07
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MB21.88Z.00A5.B07.0706270922
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Mac-F4208CA9
dmi.board.vendor: Apple Inc.
dmi.board.version: PVT
dmi.chassis.asset.tag: Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F4208CA9
dmi.modalias: dmi:bvnAppleInc.:bvrMB21.88Z.00A5.B07.0706270922:bd06/27/07:svnAppleInc.:pnMacBook2,1:pvr1.0:rvnAppleInc.:rnMac-F4208CA9:rvrPVT:cvnAppleInc.:ct10:cvrMac-F4208CA9:
dmi.product.name: MacBook2,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.
---
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: luc 1833 F.... pulseaudio
DistroRelease: Ubuntu 14.04
HibernationDevice: RESUME=UUID=6acb1767-b7dc-469f-ae3b-0492bcac3029
InstallationDate: Installed on 2014-06-17 (5 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140417)
MachineType: Apple Inc. MacBook2,1
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-29-generic root=UUID=e1b6b6c0-1e2f-4166-bb03-6fa39d8af4de ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.13.0-29.53-generic 3.13.11.2
PulseList:
 Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not accessible: Permission denied
 No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-29-generic N/A
 linux-backports-modules-3.13.0-29-generic N/A
 linux-firmware 1.127.2
Tags: trusty
Uname: Linux 3.13.0-29-generic i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

_MarkForUpload: True
dmi.bios.date: 06/27/07
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MB21.88Z.00A5.B07.0706270922
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Mac-F4208CA9
dmi.board.vendor: Apple Inc.
dmi.board.version: PVT
dmi.chassis.asset.tag: Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F4208CA9
dmi.modalias: dmi:bvnAppleInc.:bvrMB21.88Z.00A5.B07.0706270922:bd06/27/07:svnAppleInc.:pnMacBook2,1:pvr1.0:rvnAppleInc.:rnMac-F4208CA9:rvrPVT:cvnAppleInc.:ct10:cvrMac-F4208CA9:
dmi.product.name: MacBook2,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
Luc Pi (oluc) wrote :
Revision history for this message
Luc Pi (oluc) wrote :

some other times I can list the parent directory and some files appear with no attributes, like this:

$ ll /media/share/foo/abc/
ls: cannot access /media/share/foo/abc/maps: Invalid argument
ls: cannot access /media/share/foo/abc/rewire.jpg: Invalid argument
d????????? ? ? ? ? ? maps
-????????? ? ? ? ? ? rewire.jpg

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1332950

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Luc Pi (oluc) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Luc Pi (oluc) wrote : CRDA.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : HookError_source_linux.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : IwConfig.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : Lspci.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : Lsusb.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcEnviron.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcModules.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : PulseList.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : RfKill.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : UdevDb.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : UdevLog.txt

apport information

description: updated
Revision history for this message
Luc Pi (oluc) wrote : AlsaInfo.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : BootDmesg.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : CRDA.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : IwConfig.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : Lspci.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : Lsusb.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcEnviron.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : ProcModules.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : RfKill.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : UdevDb.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : UdevLog.txt

apport information

Revision history for this message
Luc Pi (oluc) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Luc Pi (oluc) wrote :

Another type of error with nautilus:

I just opened a file "more.html" and could see it's content.

Then I wanted to delete it, and I got this error:

“more.html” can't be put in the trash. Do you want to delete it immediately?
v Show more details
Error trashing file: Cannot allocate memory
[Cancel] [Skip] [Delete]

(and I cannot open the file anymore)

Revision history for this message
Luc Pi (oluc) wrote :

reported also to kernel.org to get more insight:

https://bugzilla.kernel.org/show_bug.cgi?id=78761

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.16 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-rc1-utopic/

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Luc Pi (oluc) wrote :

v3.16-rc1-utopic does not boot at all

just after loading the kernel and ramfs, it displays:

tsc: Fast TSC calibration failed
i8042: No controller found

and nothing moves after that.

Revision history for this message
Luc Pi (oluc) wrote :

Launchpad questions:
- How do I add a tag?
- How do I mark the bug "Confirmed"?

Revision history for this message
Luc Pi (oluc) wrote :

3.16.0-031600rc4-generic [1] boot and has the same problem (HFS+ corruption)

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-rc4-utopic/

tags: added: kernel-bug-exists-upstream
Revision history for this message
Luc Pi (oluc) wrote :

it still exists in 4.1.0

as far as I can tell it appeared between 3.12 and 3.13

Revision history for this message
Luc Pi (oluc) wrote :

There is a PATCH proposed on kernel/fs mailing list [1]

It has been 'merged' by Andrew Morton [2]

[1] http://marc.info/?l=linux-fsdevel&m=143545558620113&w=2
[2] http://marc.info/?l=linux-fsdevel&m=143630760319982&w=2

Any idea when this will reached mainline kernels and be compiled for ubuntu?

Could it be backported to official ubuntu kernels?

Revision history for this message
Luc Pi (oluc) wrote :

any news on this side?

Revision history for this message
Luc Pi (oluc) wrote :
Revision history for this message
Richard J Uschold (gilliganu1) wrote :

I noticed a similar problem after I installed Ubuntu 20.04 on two laptop machines. I have a Mini Mac that I share files via an USB flash drive formatted with hfs+ from the laptops with Ubuntu installed. I had no issues with Ubuntu Mate 18.10. I noticed the very large files, typicality larger than 100 MB, would have read errors or sometimes have a zero file size. I bought a new USB flash drive, but have the same failures on that.
I have an identical flash drive formatted with ext4 which has no issues. I'm currently booting to Ubuntu Mate 18.10 to write the hfs+ USB flash drive.

Revision history for this message
Luc Pi (oluc) wrote :

that was solved long ago with the kernel patch mantioned above.

closing here.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.