Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1401220

Summary: swapon fails for swapfile 4G or bigger
Product: [Fedora] Fedora Reporter: Stuart D Gathman <stuart>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: dan, jonathan, kzak, than
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-21 13:57:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880    

Description Stuart D Gathman 2016-12-03 16:14:01 UTC
Description of problem:
swapon: /var/cache/swap/swap.dat: swapon failed: Invalid argument

Version-Release number of selected component (if applicable):
util-linux-2.28.2-1.fc25.ppc64
kernel-core-4.8.6-300.fc25.ppc64

How reproducible:
Always

Steps to Reproduce:
1. dd if=/dev/zero of=swap.dat bs=1024  count=4194316
2. mkswap swap.dat
3. sync # long standing bug requires swap header on disk before kernel sees it
4. swapon swap.dat

Actual results:
swapon: /var/cache/swap/swap.dat: swapon failed: Invalid argument

Expected results:
Successful completion

Additional info:
A swapfile 1K shorter than 4G works.  As a workaround, swapspace can be increased beyond 4G by using multiple swapfiles.

Comment 1 Dan Horák 2016-12-09 17:15:37 UTC
I can't reproduce this issue within the same environment (kernel, util-linux) on a physical machine. AFAIK Stuart was using a KVM guest.

Comment 2 Stuart D Gathman 2016-12-09 20:13:00 UTC
(In reply to Dan Horák from comment #1)
> I can't reproduce this issue within the same environment (kernel,
> util-linux) on a physical machine. AFAIK Stuart was using a KVM guest.

Yes, I was using a KVM guest to debug an issue with cjdns building for ppc64.  Let me test on x86_64 KVM guest...

Comment 3 Stuart D Gathman 2016-12-09 21:43:47 UTC
Works in a F25 KVM on X86_64.  I'll ask to borrow a ppc64 vm again to see if it is still broken there.  Or are you already doing that?

Comment 4 Than Ngo 2016-12-14 10:47:41 UTC
i have tested on F25 KVM on ppc64, it works fine for me.

following packages is installed in kvm ppc64:
kernel-4.8.4-301.fc25.ppc64
util-linux-2.28.2-1.fc25.ppc64

i'm testing it again with new kernel-4.8.10-300.fc25.ppc64, will post the result soon

Comment 5 Karel Zak 2017-02-21 13:57:47 UTC
I guess, we can close this issue. 

[Please, reopen if able to reproduce with the new updates]