VirtualBox

Ticket #15581 (new defect)

Opened 6 years ago

Last modified 6 years ago

VirtualBox v5.0 fails on Linux v4.6 kernel host with floppy drive attached

Reported by: dinosaur0 Owned by:
Component: host support Version: VirtualBox 5.0.24
Keywords: floppy drive linux kernel v4.6 Cc:
Guest type: Windows Host type: Linux

Description

When I start VirtualBox (currently v5.0.24) on a Linux v4.6 system running on a computer with a floppy drive fitted (yes, I know, it's becoming rare, but I need floppy for file exchanges with my old computers), VirtualBox fails to start Windows guests if the floppy drive is empty or contains a write-protected floppy disk.

Here are VirtualBox's reports:

1.- No floppy disk in drive:

The floppy controller cannot attach to the floppy drive (VERR_DEV_IO_ERROR).

Code d'erreur : 
NS_ERROR_FAILURE (0x80004005)
Composant : 
ConsoleWrap
Interface : 
IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

and in /var/log/messages:

Jul  7 14:42:58 localhost klogd: blk_update_request: I/O error, dev fd0, sector 0
Jul  7 14:42:58 localhost klogd: floppy: error -5 while reading block 0
Jul  7 14:42:58 localhost klogd: blk_update_request: I/O error, dev fd0, sector 0
Jul  7 14:42:58 localhost klogd: floppy: error -5 while reading block 0
Jul  7 14:42:58 localhost klogd: vboxdrv: ffffffffa0dbe020 VMMR0.r0
Jul  7 14:42:58 localhost klogd: vboxdrv: ffffffffa0071020 VBoxDDR0.r0
Jul  7 14:42:58 localhost klogd: vboxdrv: ffffffffa0002020 VBoxDD2R0.r0
Jul  7 14:42:58 localhost klogd: blk_update_request: I/O error, dev fd0, sector 0
Jul  7 14:42:58 localhost klogd: floppy: error -5 while reading block 0
Jul  7 14:42:58 localhost klogd: blk_update_request: I/O error, dev fd0, sector 0
Jul  7 14:42:58 localhost klogd: floppy: error -5 while reading block 0

2.- Write-protected floppy disk in drive:

The floppy controller cannot attach to the floppy drive (VERR_WRITE_PROTECT).

Code d'erreur : 
NS_ERROR_FAILURE (0x80004005)
Composant : 
ConsoleWrap
Interface : 
IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

I'm also attaching the log for a failed start of a Windows 7 guest session, with no floppy disk in drive.

This issue doesn't happen with older kernels (OK at least up to Linux kernel v4.1).

Attachments

VBox.log Download (45.6 KB) - added by dinosaur0 6 years ago.
patch-floppy-4.6.5.diff Download (5.1 KB) - added by dinosaur0 6 years ago.
Patch to the Linux kernel to restore proper floppy compatibility with Vbox 5.0
patch-floppy-4.7.2.diff Download (4.4 KB) - added by dinosaur0 6 years ago.
Patch for Linux kernel v4.7.2

Change History

Changed 6 years ago by dinosaur0

comment:1 Changed 6 years ago by dinosaur0

Same bug seen with VirtualBox v5.1 and host Linux kernel v4.6.4

comment:2 Changed 6 years ago by dinosaur0

Problem still happens with VirtualBox v5.1.2 and Linux kernel v4.7

Changed 6 years ago by dinosaur0

Patch to the Linux kernel to restore proper floppy compatibility with Vbox 5.0

comment:3 Changed 6 years ago by dinosaur0

I just attached a patch (to apply to Linux kernel v4.6 or newer) that allows to restore the compatibility of the Linux host floppy drive with VirtualBox v5. That patch reverts the floppy.c driver in the kernel to its v4.1 version (with the exception of a change to a callback that went into newer kernels and needs to be kept). It is of course probably not the right way to fix this issue (the right way would be to fix VirtualBox itself), but it might help you to spot what is going wrong.

Changed 6 years ago by dinosaur0

Patch for Linux kernel v4.7.2

comment:4 Changed 6 years ago by dinosaur0

The problem still exist with VirtualBox v5.1.4 and Linux kernel v4.7.2. The latter got a fix to the floppy driver "floppy: fix open(O_ACCMODE) for ioctl-only open", however it does not cure the issue.

I just attached a patch file which applies to Linux kernel v4.7.2 and allows VirtualBox to work again on floppy-fitted systems.

Also, if some VirtualBox developer could at the very least acknowledge this bug report, it would avoid me getting the frustrating impression that I'm posting to /dev/null, here... Thank you in advance.

comment:5 Changed 6 years ago by aeichner

We've seen the report but as you already stated yourself floppy drives are quite rare nowadays. I doubt any of our developers has a system capable of running VirtualBox with a floppy drive so we can try to reproduce it. This also looks more like a kernel bug at the moment because the kernel upgrade breaks the floppy drive support.

comment:6 Changed 6 years ago by dinosaur0

Thanks for your reply.

I submitted a bug report for the Linux kernel:  https://bugzilla.kernel.org/show_bug.cgi?id=153981

comment:7 Changed 6 years ago by dinosaur0

Kernel v4.7.3 reverted the commit that went into v4.7.2. It doesn't change anything to the fact the bug still happens, but as a result, my first submitted patch (the one for v4.6.5) is the patch to apply to kernel v4.7.3.

Note that the only thing I'm hearing on the kernel bugzilla are chirping crickets, and I got the annoying impression to post to /dev/null over there; so if you guys are in contact with kernel developers, I'd suggest you give them a poke on your side and point them to my bug report. Many thanks in advance.

comment:8 Changed 6 years ago by dinosaur0

Good news !

Linux kernel v4.7.4 finally reverted the culprit code (commit a15f1d0d13bee12b54e198286b91a83752f45b07): Revert "floppy: refactor open() flags handling"

This bug is now fixed.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use