Bug 197313 - BTRFS: Transaction aborted (error -95) btrfs-endio-write 0xc00000000034ffb0 on ppc64
Summary: BTRFS: Transaction aborted (error -95) btrfs-endio-write 0xc00000000034ffb0 o...
Status: RESOLVED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-18 14:27 UTC by Erhard F.
Modified: 2019-05-10 21:51 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.13.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Creash log from dmesg output (4.12 KB, text/plain)
2017-10-26 12:29 UTC, Géza Búza
Details

Description Erhard F. 2017-10-18 14:27:55 UTC
This crash happened on a freshly converted ext4 filesystem, while logging out of the MATE 1.18 desktop on my PowerMac G5 (ppc64), after compiling some stuff.

Mount options used:
/dev/sda7 on / type btrfs (rw,noatime,compress=lzo,space_cache,subvolid=5,subvol=/)

After converting from ext4 to btrfs the volume was defragged (btrfs filesystem defrag -r -f -t 32 /) and balanced (btrfs balance start --full-balance /mnt/).


[ 9518.215655] BTRFS: Transaction aborted (error -95)
[ 9518.215673] ------------[ cut here ]------------
[ 9518.215679] WARNING: CPU: 0 PID: 13195 at 0xc00000000031cc6c
[ 9518.215681] Modules linked in: fuse rpcsec_gss_krb5 auth_rpcgss oid_registry nfsv4 dns_resolver nfs lockd sunrpc grace af_packet joydev evdev hid_generic usbhid hid windfarm_cpufreq_clamp windfarm_smu_sensors windfarm_smu_controls windfarm_pm112 windfarm_pid snd_aoa_fabric_layout radeon nouveau i2c_algo_bit hwmon tg3 ptp ttm firewire_ohci firewire_core drm_kms_helper pps_core ohci_pci ohci_hcd crc_itu_t ehci_pci sr_mod ehci_hcd sysimgblt syscopyarea sysfillrect fb_sys_fops drm libphy cdrom usbcore windfarm_smu_sat usb_common snd_aoa_codec_onyx uninorth_agp windfarm_max6690_sensor windfarm_lm75_sensor shpchp agpgart windfarm_core snd_aoa zram snd_aoa_i2sbus snd_pcm zsmalloc snd_aoa_soundbus snd_timer snd soundcore i2c_powermac cpc925_edac
[ 9518.215759] CPU: 0 PID: 13195 Comm: kworker/u4:0 Not tainted 4.13.7-gentoo #1
[ 9518.215762] Workqueue: btrfs-endio-write 0xc00000000034ffb0
[ 9518.215765] task: c00000045b7ac380 task.stack: c00000039b820000
[ 9518.215767] NIP: c00000000031cc6c LR: c00000000031cc68 CTR: 0000000000000000
[ 9518.215769] REGS: c00000039b8237c0 TRAP: 0700   Not tainted  (4.13.7-gentoo)
[ 9518.215770] MSR: 900000000202b032 <SF,HV,VEC,EE,FP,ME,IR,DR,RI>
[ 9518.215780]   CR: 22002422  XER: 20000000
[ 9518.215781] SOFTE: 1 
               GPR00: c00000000031cc68 c00000039b823a40 c0000000008c0f00 0000000000000026 
               GPR04: c00000045de04ef0 c00000045de0ba90 c00000000090a8cc 000000000000ca0c 
               GPR08: 0000000000000007 c0000000007e1914 000000045d62a000 0000000000000030 
               GPR12: 0000000022002444 c00000000ffff000 c000000000082410 c00000042296c700 
               GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
               GPR20: c00000039a202240 c00000039b823ac0 ffffffffffffffa1 0000000000000000 
               GPR24: c00000045b30b000 c00000039a202280 c00000045b8e3800 0000000000001000 
               GPR28: c00000045a19fac8 0000000000000001 c00000039a202438 c000000319d6a000 
[ 9518.215817] Call Trace:
[ 9518.215819] [c00000039b823a40] [c00000000031cc68] 0xc00000000031cc68 (unreliable)
[ 9518.215823] [c00000039b823b40] [c00000000034ff10] 0xc00000000034ff10
[ 9518.215825] [c00000039b823bf0] [c00000000007aa5c] 0xc00000000007aa5c
[ 9518.215827] [c00000039b823c90] [c00000000007acd8] 0xc00000000007acd8
[ 9518.215830] [c00000039b823d70] [c000000000082564] 0xc000000000082564
[ 9518.215832] [c00000039b823e30] [c00000000000a560] 0xc00000000000a560
[ 9518.215834] Instruction dump:
[ 9518.215836] 38a00bd1 7f83e378 388400a8 2e360000 4bfb8461 60000000 4bfffd1c 3c62ffe6 
[ 9518.215843] 7ec4b378 38634a30 4bd947c1 60000000 <0fe00000> 4bffffc4 7c641b78 3c62ffe6 
[ 9518.215851] ---[ end trace d4b5bfe17c338556 ]---
[ 9518.215855] BTRFS: error (device sda7) in btrfs_finish_ordered_io:3025: errno=-95 unknown
[ 9518.215858] BTRFS info (device sda7): forced readonly
[ 9518.216141] BTRFS error (device sda7): pending csums is 389120
Comment 1 Géza Búza 2017-10-26 12:29:24 UTC
Created attachment 260407 [details]
Creash log from dmesg output

I experienced the same error with kernel 4.13.8. Furthermore this or a related bug corrupted the filesystem, making my files read-only. Fortunately the command "btrfsck --repair <partition>" fixed the damage. (Although btrfsck stuck in an infinite loop as I saw the same block ID printed on the screen over and over again.)

The partition is mounted with options: 
rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag


Kernel is compiled with these configuration settings:
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not set
Comment 2 Géza Búza 2017-11-08 11:34:43 UTC
My problem is different than what's originally reported in this issue.
Turned out that btrfs run out of disk space due to chunk fragmentation.

The command below indicated that almost all space is used:
sudo btrfs filesystem show

However df -h / showed about 25% free space.

First I had to make free space by deleting data (I deleted old snapshots, but attaching a new device to the filesystem could have helped too.). After that I run the balance command multiple times to relocate and squash chunks, in order to free up disk space.
btrfs balance start -dusage=0 /
btrfs balance start -dusage=5 /
btrfs balance start -dusage=10 /
btrfs balance start -dusage=25 /
btrfs balance start -dusage=50 /

Since then I haven't seen any error.
Comment 3 Erhard F. 2017-12-03 22:14:35 UTC
As of kernel 4.14.x and btrfs-progs 4.14 I converted again an ext4 partition to btrfs on my ppc64-machine. I've been runnig it since then from the btrfs partition without problems.

Thus I'll mark this bug as obsolete. If it reappears somehow I'll file a new one.
Comment 4 Artyom Vetrov 2019-05-10 21:35:20 UTC
Just got this bug on Debian 9.9 (kernel 4.9.0-9-amd64) in the same case - converted ext4 to btrfs.
Comment 5 Erhard F. 2019-05-10 21:51:56 UTC
I guess this is fixed in recent 4.9.x or 4.14.x stable series. Have not seen this in a long time.

Note You need to log in before you can comment on or make changes to this bug.