swapoff -a followed by swapon -a doesn't give your swap back
I did swapoff -a taking all my swap away. I think I got an error message about an interrupted syscall from the program at the end of it. If you're trying to reproduce you should probably have swap space in use.
I then did swapon -a. It doesn't complain, and I can't remember if swap is shown as existing, but if it is the swap is not used.
A few hours later the kernel killed a process and in the sys logs there was a warning saying no swap space. None was used, it's that there wasn't any available at all, used or unused.
This has been a bug for a while; I remember it for 1-2 years at least.
$ uname -a
DragonFly zotac.akihabara.co.uk 4.5-DEVELOPMENT DragonFly v126.96.36.1991.g2e03c8-DEVELOPMENT #2: Sun Mar 20 21:54:05 JST 2016 email@example.com:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64