F2FS: Hang or deadlock when operating crafted image and then unmounting

From: Anatoly Trosinenko
Date: Sat Jul 14 2018 - 16:07:16 EST


How to reproduce:
1) Compile jaegeuk/f2fs.git/dev-test (23fd5bd3e) or v4.18-rc4 with the
attached config
2) Unpack the attached F2FS image (128 Mb)
3) Execute:

echo Mounting...
mount /dev/sda /mnt -t f2fs
echo "=== touch"
touch /mnt/abc
echo "=== umount &; sleep 1"
umount /mnt &
sleep 1
echo "=== stack"
cat /proc/$(pidof umount)/stack

What happens:
Mounting...
[ 4.741979] F2FS-fs (sda): Found nat_bits in checkpoint
[ 4.764336] F2FS-fs (sda): Mounted with checkpoint version = 1c8a6001
[ 4.765047] exe (1007) used greatest stack depth: 13856 bytes left
=== touch
[ 4.771440] WARNING: CPU: 0 PID: 1012 at fs/f2fs/inode.c:654
f2fs_evict_inode+0x342/0x350
[ 4.771610] Modules linked in:
[ 4.771931] CPU: 0 PID: 1012 Comm: init Not tainted 4.18.0-rc3+ #1
[ 4.772023] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS 1.10.2-1ubuntu1 04/01/2014
[ 4.772188] RIP: 0010:f2fs_evict_inode+0x342/0x350
[ 4.772263] Code: be 03 00 00 00 e8 8e 92 d8 ff e9 66 fd ff ff 48
89 df e8 51 b4 00 00 e9 df fd ff ff 0f 0b 3e 41 80 4c 24 48 04 e9 30
fd ff ff <0f> 0b 3e 41 80 4c 24 48 04 e9 c3 fd ff ff 55 53 48 89 fb 48
83 ec
[ 4.772635] RSP: 0018:ffffb6208098fae0 EFLAGS: 00000202
[ 4.772717] RAX: 000000000c100d02 RBX: ffff9a69c47accf0 RCX: ffff9a69c47ac540
[ 4.772805] RDX: 0000000000008000 RSI: 0000000000000001 RDI: ffff9a69c47accf0
[ 4.772892] RBP: ffff9a69c47ace00 R08: ffff9a69c4360858 R09: ffff9a69c7922000
[ 4.772978] R10: 0000000000000040 R11: 0000000000000000 R12: ffff9a69c7809800
[ 4.773065] R13: 0000000000000000 R14: 00000000fffffffb R15: ffffde23001e4880
[ 4.773184] FS: 00000000019538c0(0000) GS:ffff9a69c7400000(0000)
knlGS:0000000000000000
[ 4.773282] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4.773356] CR2: 00007ffe5ad48f70 CR3: 000000000786a000 CR4: 00000000000006f0
[ 4.773487] Call Trace:
[ 4.774005] evict+0xba/0x180
[ 4.774075] f2fs_iget+0x101/0xcf0
[ 4.774141] f2fs_lookup+0x18e/0x300
[ 4.774195] __lookup_slow+0x92/0x150
[ 4.774247] lookup_slow+0x30/0x50
[ 4.774294] walk_component+0x1bf/0x470
[ 4.774351] ? link_path_walk+0x45c/0x510
[ 4.774408] path_lookupat+0x7f/0x1f0
[ 4.774460] ? cpumask_any_but+0x1f/0x40
[ 4.774512] filename_lookup+0xb1/0x180
[ 4.774606] ? __alloc_pages_nodemask+0xfc/0x220
[ 4.774669] ? _cond_resched+0x10/0x40
[ 4.774719] ? kmem_cache_alloc+0x33/0x170
[ 4.774774] ? do_utimes+0x112/0x150
[ 4.774821] do_utimes+0x112/0x150
[ 4.774870] do_futimesat+0x9c/0xe0
[ 4.774921] ? __do_page_fault+0x25c/0x4b0
[ 4.774976] ? do_syscall_64+0x43/0xf0
[ 4.775024] ? __ia32_sys_futimesat+0x10/0x10
[ 4.775078] do_syscall_64+0x43/0xf0
[ 4.775127] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 4.775307] RIP: 0033:0x489777
[ 4.775350] Code: ff 2c 75 cf 42 0f b6 14 28 80 fa 3d 77 c5 49 0f
a3 d4 73 bf 48 83 c4 08 5b 5d 41 5c 41 5d c3 0f 1f 40 00 b8 eb 00 00
00 0f 05 <48> 3d 00 f0 ff ff 77 09 f3 c3 0f 1f 80 00 00 00 00 48 c7 c2
e0 ff
[ 4.775663] RSP: 002b:00007ffe5ad49558 EFLAGS: 00000246 ORIG_RAX:
00000000000000eb
[ 4.775758] RAX: ffffffffffffffda RBX: 0000000001956258 RCX: 0000000000489777
[ 4.775839] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000001956228
[ 4.775919] RBP: 0000000000489770 R08: 0000000000000000 R09: 0000000000000000
[ 4.775999] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 4.776083] R13: 0000000000000000 R14: 00000000ffffff2b R15: 0000000000000000
[ 4.776206] ---[ end trace d4aea6052b246e31 ]---
touch: /mnt/abc: Input/output error
[ 4.778834] init (1012) used greatest stack depth: 13216 bytes left
=== umount &; sleep 1
=== stack
[<0>] f2fs_write_checkpoint+0x122/0x1170
[<0>] kill_f2fs_super+0x89/0xb0
[<0>] deactivate_locked_super+0x35/0x60
[<0>] cleanup_mnt+0x36/0x70
[<0>] task_work_run+0x79/0xa0
[<0>] exit_to_usermode_loop+0x91/0xa0
[<0>] do_syscall_64+0xdb/0xf0
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<0>] 0xffffffffffffffff

Then QEMU starts consuming CPU -- maybe it is spinlock or this bug is
not deadlock but hang...


Thanks
Anatoly
q[ 0.000000] Linux version 4.18.0-rc3+ (trosinenko@trosinenko-pc) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #1 SMP Sat Jul 14 21:19:50 MSK 2018
[ 0.000000] Command line: console=ttyS0
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
[ 0.000000] last_pfn = 0x7fe0 max_arch_pfn = 0x400000000
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.000000] found SMP MP-table at [mem 0x000f6aa0-0x000f6aaf] mapped at [(____ptrval____)]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] RAMDISK: [mem 0x077f4000-0x07fdffff]
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000000F68C0 000014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 0x0000000007FE15FC 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 0x0000000007FE1458 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 0x0000000007FE0040 001418 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 0x0000000007FE0000 000040
[ 0.000000] ACPI: APIC 0x0000000007FE154C 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.000000] ACPI: HPET 0x0000000007FE15C4 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x0000000007fdffff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x077f0000-0x077f3fff]
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x0000000007fdffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x0000000007fdffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x0000000007fdffff]
[ 0.000000] Reserved but unavailable: 130 pages
[ 0.000000] ACPI: PM-Timer IO Port: 0x608
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.000000] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[ 0.000000] [mem 0x08000000-0xfffbffff] available for PCI devices
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.000000] random: get_random_bytes called from start_kernel+0x8b/0x49f with crng_init=0
[ 0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] percpu: Embedded 43 pages/cpu @(____ptrval____) s137944 r8192 d29992 u2097152
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32105
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: console=ttyS0
[ 0.000000] Memory: 91724K/130552K available (14348K kernel code, 1425K rwdata, 3272K rodata, 1276K init, 612K bss, 38828K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 4352, nr_irqs: 256, preallocated irqs: 16
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [ttyS0] enabled
[ 0.000000] ACPI: Core revision 20180531
[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[ 0.003000] APIC: Switch to symmetric I/O mode setup
[ 0.005000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.010000] tsc: Fast TSC calibration using PIT
[ 0.011000] tsc: Detected 2807.986 MHz processor
[ 0.012000] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2879b8bd7f7, max_idle_ns: 440795264856 ns
[ 0.013223] Calibrating delay loop (skipped), value calculated using timer frequency.. 5615.97 BogoMIPS (lpj=2807986)
[ 0.013424] pid_max: default: 32768 minimum: 301
[ 0.013899] Security Framework initialized
[ 0.014094] SELinux: Initializing.
[ 0.014915] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.015114] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.015321] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.015425] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.024364] mce: CPU supports 10 MCE banks
[ 0.025079] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.025156] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.025272] Spectre V2 : Spectre mitigation: LFENCE not serializing, switching to generic retpoline
[ 0.025388] Spectre V2 : Mitigation: Full generic retpoline
[ 0.025469] Spectre V2 : Spectre v2 mitigation: Filling RSB on context switch
[ 0.025575] Speculative Store Bypass: Vulnerable
[ 0.256179] random: fast init done
[ 0.330628] Freeing SMP alternatives memory: 44K
[ 0.338000] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3)
[ 0.341174] Performance Events: PMU not available due to virtualization, using software events only.
[ 0.342588] Hierarchical SRCU implementation.
[ 0.345204] Huh? What family is it: 0x6?!
[ 0.345542] smp: Bringing up secondary CPUs ...
[ 0.345657] smp: Brought up 1 node, 1 CPU
[ 0.345736] smpboot: Max logical packages: 1
[ 0.345833] smpboot: Total of 1 processors activated (5615.97 BogoMIPS)
[ 0.352581] devtmpfs: initialized
[ 0.357180] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 0.357417] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.358414] xor: measuring software checksum speed
[ 0.368030] prefetch64-sse: 1820.000 MB/sec
[ 0.378012] generic_sse: 1876.000 MB/sec
[ 0.378100] xor: using function: generic_sse (1876.000 MB/sec)
[ 0.383919] kworker/u2:0 (17) used greatest stack depth: 14624 bytes left
[ 0.385089] RTC time: 18:31:43, date: 07/14/18
[ 0.387720] NET: Registered protocol family 16
[ 0.389343] audit: initializing netlink subsys (disabled)
[ 0.394310] audit: type=2000 audit(1531593103.390:1): state=initialized audit_enabled=0 res=1
[ 0.394762] cpuidle: using governor menu
[ 0.395483] ACPI: bus type PCI registered
[ 0.396426] kworker/u2:1 (24) used greatest stack depth: 14144 bytes left
[ 0.399562] PCI: Using configuration type 1 for base access
[ 0.493489] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.511080] raid6: sse2x1 gen() 640 MB/s
[ 0.528032] raid6: sse2x1 xor() 361 MB/s
[ 0.545047] raid6: sse2x2 gen() 726 MB/s
[ 0.562075] raid6: sse2x2 xor() 433 MB/s
[ 0.579090] raid6: sse2x4 gen() 621 MB/s
[ 0.596046] raid6: sse2x4 xor() 427 MB/s
[ 0.596141] raid6: using algorithm sse2x2 gen() 726 MB/s
[ 0.596216] raid6: .... xor() 433 MB/s, rmw enabled
[ 0.596346] raid6: using intx1 recovery algorithm
[ 0.597798] ACPI: Added _OSI(Module Device)
[ 0.597884] ACPI: Added _OSI(Processor Device)
[ 0.597941] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.598042] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.598207] ACPI: Added _OSI(Linux-Dell-Video)
[ 0.608725] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 0.619205] ACPI: Interpreter enabled
[ 0.619830] ACPI: (supports S0 S3 S4 S5)
[ 0.619920] ACPI: Using IOAPIC for interrupt routing
[ 0.620473] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.621533] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 0.662605] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.662967] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[ 0.663411] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.663810] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[ 0.665855] PCI host bridge to bus 0000:00
[ 0.666074] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 0.666199] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 0.666298] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 0.666390] pci_bus 0000:00: root bus resource [mem 0x08000000-0xfebfffff window]
[ 0.666479] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
[ 0.666652] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.673036] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.673158] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.673262] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.673362] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.675064] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 0.675185] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 0.689125] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 0.689786] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 0.690390] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 0.690865] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 0.691321] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 0.695794] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[ 0.695953] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[ 0.696047] pci 0000:00:02.0: vgaarb: bridge control possible
[ 0.696185] vgaarb: loaded
[ 0.698046] SCSI subsystem initialized
[ 0.699930] ACPI: bus type USB registered
[ 0.700660] usbcore: registered new interface driver usbfs
[ 0.701150] usbcore: registered new interface driver hub
[ 0.701390] usbcore: registered new device driver usb
[ 0.702362] pps_core: LinuxPPS API ver. 1 registered
[ 0.702438] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@xxxxxxxx>
[ 0.702705] PTP clock support registered
[ 0.705347] EDAC MC: Ver: 3.0.0
[ 0.707923] Advanced Linux Sound Architecture Driver Initialized.
[ 0.708466] PCI: Using ACPI for IRQ routing
[ 0.715031] NetLabel: Initializing
[ 0.715099] NetLabel: domain hash size = 128
[ 0.715156] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.716485] NetLabel: unlabeled traffic allowed by default
[ 0.717743] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[ 0.718058] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[ 0.718187] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[ 0.722363] clocksource: Switched to clocksource tsc-early
[ 0.843689] VFS: Disk quotas dquot_6.6.0
[ 0.843940] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.845966] pnp: PnP ACPI init
[ 0.851534] pnp: PnP ACPI: found 6 devices
[ 0.889796] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.891246] NET: Registered protocol family 2
[ 0.894732] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes)
[ 0.894986] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.895182] TCP bind hash table entries: 1024 (order: 2, 16384 bytes)
[ 0.895332] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.896150] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.896350] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.897358] NET: Registered protocol family 1
[ 0.898656] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.898814] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.898963] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.900096] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 0.902583] Unpacking initramfs...
[ 0.946407] Freeing initrd memory: 8112K
[ 0.949288] Scanning for low memory corruption every 60 seconds
[ 0.956915] Initialise system trusted keyrings
[ 0.958635] workingset: timestamp_bits=56 max_order=15 bucket_order=0
[ 0.990624] SGI XFS with ACLs, security attributes, no debug enabled
[ 1.009974] Key type asymmetric registered
[ 1.010087] Asymmetric key parser 'x509' registered
[ 1.010360] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 1.010547] io scheduler noop registered
[ 1.010624] io scheduler deadline registered
[ 1.011051] io scheduler cfq registered (default)
[ 1.011144] io scheduler mq-deadline registered
[ 1.011205] io scheduler kyber registered
[ 1.014646] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[ 1.016152] ACPI: Power Button [PWRF]
[ 1.024283] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.046212] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 1.053898] Non-volatile memory driver v1.3
[ 1.054432] Linux agpgart interface v0.103
[ 1.074840] loop: module loaded
[ 1.085032] scsi host0: ata_piix
[ 1.086884] scsi host1: ata_piix
[ 1.087549] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc040 irq 14
[ 1.087669] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc048 irq 15
[ 1.091170] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
[ 1.091263] e100: Copyright(c) 1999-2006 Intel Corporation
[ 1.091519] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[ 1.091616] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 1.204987] PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 1.251980] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
[ 1.252129] ata1.00: 262144 sectors, multi 16: LBA48
[ 1.253342] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[ 1.267684] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 1.271683] sd 0:0:0:0: [sda] 262144 512-byte logical blocks: (134 MB/128 MiB)
[ 1.272244] sd 0:0:0:0: [sda] Write Protect is off
[ 1.272701] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.274253] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1.275892] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
[ 1.291779] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[ 1.291988] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 1.294722] sr 1:0:0:0: Attached scsi generic sg1 type 5
[ 1.303452] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.522363] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56
[ 1.522596] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[ 1.523164] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1.523247] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.523519] sky2: driver version 1.30
[ 1.525419] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.525535] ehci-pci: EHCI PCI platform driver
[ 1.525738] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.527593] ohci-pci: OHCI PCI platform driver
[ 1.527813] uhci_hcd: USB Universal Host Controller Interface driver
[ 1.528480] usbcore: registered new interface driver usblp
[ 1.528765] usbcore: registered new interface driver usb-storage
[ 1.529922] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 1.533247] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 1.533447] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 1.537524] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 1.540880] rtc_cmos 00:00: RTC can wake from S4
[ 1.545690] rtc_cmos 00:00: registered as rtc0
[ 1.546524] rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram, hpet irqs
[ 1.548594] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: dm-devel@xxxxxxxxxx
[ 1.549324] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.556678] usbcore: registered new interface driver usbhid
[ 1.556779] usbhid: USB HID core driver
[ 1.567548] Initializing XFRM netlink socket
[ 1.569422] NET: Registered protocol family 10
[ 1.574588] Segment Routing with IPv6
[ 1.576772] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.579155] NET: Registered protocol family 17
[ 1.579369] Key type dns_resolver registered
[ 1.580987] sched_clock: Marking stable (1580057686, 0)->(1672582634, -92524948)
[ 1.584019] registered taskstats version 1
[ 1.584159] Loading compiled-in X.509 certificates
[ 1.587784] Btrfs loaded, crc32c=crc32c-generic, assert=on
[ 1.588790] Unable to create integrity sysfs dir: -19
[ 1.591015] Magic number: 10:445:544
[ 1.601550] scsi_generic sg0: hash matches
[ 1.603383] console [netcon0] enabled
[ 1.603478] netconsole: network logging started
[ 1.611895] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.630618] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.631871] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.632144] cfg80211: failed to load regulatory.db
[ 1.633414] ALSA device list:
[ 1.633478] No soundcards found.
[ 1.644946] Freeing unused kernel memory: 1276K
[ 1.646724] Write protecting the kernel read-only data: 20480k
[ 1.648844] Freeing unused kernel memory: 2004K
[ 1.654439] Freeing unused kernel memory: 824K
[ 1.952542] tsc: Refined TSC clocksource calibration: 2808.018 MHz
[ 1.952977] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2879d723576, max_idle_ns: 440795342524 ns
[ 1.954168] clocksource: Switched to clocksource tsc
[ 2.171079] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3

Mounting...
[ 4.741979] F2FS-fs (sda): Found nat_bits in checkpoint
[ 4.764336] F2FS-fs (sda): Mounted with checkpoint version = 1c8a6001
[ 4.765047] exe (1007) used greatest stack depth: 13856 bytes left
=== touch
[ 4.771440] WARNING: CPU: 0 PID: 1012 at fs/f2fs/inode.c:654 f2fs_evict_inode+0x342/0x350
[ 4.771610] Modules linked in:
[ 4.771931] CPU: 0 PID: 1012 Comm: init Not tainted 4.18.0-rc3+ #1
[ 4.772023] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
[ 4.772188] RIP: 0010:f2fs_evict_inode+0x342/0x350
[ 4.772263] Code: be 03 00 00 00 e8 8e 92 d8 ff e9 66 fd ff ff 48 89 df e8 51 b4 00 00 e9 df fd ff ff 0f 0b 3e 41 80 4c 24 48 04 e9 30 fd ff ff <0f> 0b 3e 41 80 4c 24 48 04 e9 c3 fd ff ff 55 53 48 89 fb 48 83 ec
[ 4.772635] RSP: 0018:ffffb6208098fae0 EFLAGS: 00000202
[ 4.772717] RAX: 000000000c100d02 RBX: ffff9a69c47accf0 RCX: ffff9a69c47ac540
[ 4.772805] RDX: 0000000000008000 RSI: 0000000000000001 RDI: ffff9a69c47accf0
[ 4.772892] RBP: ffff9a69c47ace00 R08: ffff9a69c4360858 R09: ffff9a69c7922000
[ 4.772978] R10: 0000000000000040 R11: 0000000000000000 R12: ffff9a69c7809800
[ 4.773065] R13: 0000000000000000 R14: 00000000fffffffb R15: ffffde23001e4880
[ 4.773184] FS: 00000000019538c0(0000) GS:ffff9a69c7400000(0000) knlGS:0000000000000000
[ 4.773282] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4.773356] CR2: 00007ffe5ad48f70 CR3: 000000000786a000 CR4: 00000000000006f0
[ 4.773487] Call Trace:
[ 4.774005] evict+0xba/0x180
[ 4.774075] f2fs_iget+0x101/0xcf0
[ 4.774141] f2fs_lookup+0x18e/0x300
[ 4.774195] __lookup_slow+0x92/0x150
[ 4.774247] lookup_slow+0x30/0x50
[ 4.774294] walk_component+0x1bf/0x470
[ 4.774351] ? link_path_walk+0x45c/0x510
[ 4.774408] path_lookupat+0x7f/0x1f0
[ 4.774460] ? cpumask_any_but+0x1f/0x40
[ 4.774512] filename_lookup+0xb1/0x180
[ 4.774606] ? __alloc_pages_nodemask+0xfc/0x220
[ 4.774669] ? _cond_resched+0x10/0x40
[ 4.774719] ? kmem_cache_alloc+0x33/0x170
[ 4.774774] ? do_utimes+0x112/0x150
[ 4.774821] do_utimes+0x112/0x150
[ 4.774870] do_futimesat+0x9c/0xe0
[ 4.774921] ? __do_page_fault+0x25c/0x4b0
[ 4.774976] ? do_syscall_64+0x43/0xf0
[ 4.775024] ? __ia32_sys_futimesat+0x10/0x10
[ 4.775078] do_syscall_64+0x43/0xf0
[ 4.775127] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 4.775307] RIP: 0033:0x489777
[ 4.775350] Code: ff 2c 75 cf 42 0f b6 14 28 80 fa 3d 77 c5 49 0f a3 d4 73 bf 48 83 c4 08 5b 5d 41 5c 41 5d c3 0f 1f 40 00 b8 eb 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 09 f3 c3 0f 1f 80 00 00 00 00 48 c7 c2 e0 ff
[ 4.775663] RSP: 002b:00007ffe5ad49558 EFLAGS: 00000246 ORIG_RAX: 00000000000000eb
[ 4.775758] RAX: ffffffffffffffda RBX: 0000000001956258 RCX: 0000000000489777
[ 4.775839] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000001956228
[ 4.775919] RBP: 0000000000489770 R08: 0000000000000000 R09: 0000000000000000
[ 4.775999] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 4.776083] R13: 0000000000000000 R14: 00000000ffffff2b R15: 0000000000000000
[ 4.776206] ---[ end trace d4aea6052b246e31 ]---
touch: /mnt/abc: Input/output error
[ 4.778834] init (1012) used greatest stack depth: 13216 bytes left
=== umount &; sleep 1
=== stack
[<0>] f2fs_write_checkpoint+0x122/0x1170
[<0>] kill_f2fs_super+0x89/0xb0
[<0>] deactivate_locked_super+0x35/0x60
[<0>] cleanup_mnt+0x36/0x70
[<0>] task_work_run+0x79/0xa0
[<0>] exit_to_usermode_loop+0x91/0xa0
[<0>] do_syscall_64+0xdb/0xf0
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<0>] 0xffffffffffffffff


BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
/ # 

Attachment: config
Description: Binary data

Attachment: f2fs_128mb.img.bz2
Description: Binary data