Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualBox AHCI #274

Closed
Neurodrive opened this issue Aug 19, 2014 · 15 comments
Closed

VirtualBox AHCI #274

Neurodrive opened this issue Aug 19, 2014 · 15 comments
Labels

Comments

@Neurodrive
Copy link

@Neurodrive Neurodrive commented Aug 19, 2014

There is a bug with the SATA AHCI driver that seems to fail under high I/O like when for example the bitcoin client is running, and freezes the computer constantly during its process and then crashing the virtual machine. I recommend switching to the driver on the workstation (the only one under high load) to SAS or IDE. No problem detected using the SAS driver, workstation on for 19+ hours.

This is the bug and there doesn't seem to be a better a fix from VirtualBox
!!Assertion Failed!!
Expression: !ASMAtomicReadU32(&pAhciPort->cTasksActive) || (pAhciReqExcept && ASMAtomicReadU32(&pAhciPort->cTasksActive) == 1)
Location : /home/vbox/vbox-4.3.14/src/VBox/Devices/Storage/DevAHCI.cpp(5689) bool ahciCancelActiveTasks(PAHCIPort, PAHCIREQ)

@adrelanos
Copy link
Member

@adrelanos adrelanos commented Aug 19, 2014

Something needs to be done. Considering options...

Would IDE introduce any issues?

Would SAS introduce any issues? How compatible is it with other guest operating systems such as Windows? That would be interesting for Whonix-Custom-Workstation (an empty disk VM, where the user just needs to install its operating system as per https://www.whonix.org/wiki/Other_Operating_Systems).

@adrelanos
Copy link
Member

@adrelanos adrelanos commented Aug 19, 2014

Upstream bug report:
https://www.virtualbox.org/ticket/10031
They haven't fixed it in 3 years.
Several workarounds (besides using IDE / SAS) are described in that bug report.

@Neurodrive
Copy link
Author

@Neurodrive Neurodrive commented Aug 19, 2014

That is the point, SATA AHCI used to crash after few hours and lagging constantly my hardware, after changing to SAS i had no issue, its been working 19+ hours. With AHCI i used to find on the VirtualBox console the status of the workstation as "Aborted", you know, you leave the bitcoin client working at night, you wake up and instead of a finished blockchain you have a crashed virtual machine.
I didn't tested yet with IDE i heard there might be a little performance drawback, but as i said that is only a speculation, i tested with SAS and the performance and overall stability is way better than SATA AHCI.

@adrelanos
Copy link
Member

@adrelanos adrelanos commented Aug 25, 2014

Quotes from VBox manual (https://www.virtualbox.org/manual/ch05.html):

In general, you should avoid IDE unless it is the only controller supported by your guest.

So let's not use IDE.

Whether you use SATA, SCSI or SAS does not make any real difference. The variety of controllers is only supplied for VirtualBox for compatibility with existing hardware and other hypervisors.

What could be of concern for Whonix-Custom-Workstation (an empty VM one can import and manually install a operating system oneself) is this notice about compatibility.

As with SATA, the SAS controller will only be seen by operating systems with device support for it. In particular, there is no support for SAS in Windows before Windows Vista, so Windows XP (even SP3) will not see such disks unless you install additional drivers.

Since Windows XP is deprecated anyway, those wanting to use it, we can tell them to continue using manual VM creation steps as per:

@adrelanos adrelanos added this to the Whonix 9 milestone Aug 25, 2014
@adrelanos adrelanos added bug labels Aug 25, 2014
@adrelanos
Copy link
Member

@adrelanos adrelanos commented Aug 25, 2014

Unless there are good arguments, we'll be using SAS for Whonix 9.

@adrelanos adrelanos closed this in b951b63 Aug 25, 2014
@Neurodrive
Copy link
Author

@Neurodrive Neurodrive commented Aug 31, 2014

As for windows SAS support, windows server 2003 has native support for Lsi Logic chipsets, and Windows Server 2K3 was running around the same time as XP, and if somebody wants to add SAS support to XP they can always add the drivers to the installation through a custom windows ISO. The problem i had was with linux whonix VM's and what i basically did, was removing the virtual SATA controller, and add a SAS controller, and the import the virtual disk, that was being used before as SATA. Easy workaround, 0 headaches.

@adrelanos
Copy link
Member

@adrelanos adrelanos commented Sep 12, 2014

Looks like we need to revert this. Switching to SAS created a new issue.

Experiences this myself in 8.6.6.7:

Sep 12 12:43:23 host kernel: [   64.864119] mptscsih: ioc0: attempting task abort! (sc=ef5c5e00)
Sep 12 12:43:23 host kernel: [   64.866166] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 1c 00 00 04 00 00
Sep 12 12:43:23 host kernel: [   64.976064] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5e00)
Sep 12 12:43:23 host kernel: [   64.979498] mptscsih: ioc0: attempting task abort! (sc=ef5c5d40)
Sep 12 12:43:23 host kernel: [   64.980546] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 20 00 00 04 00 00
Sep 12 12:43:23 host kernel: [   65.092156] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5d40)
Sep 12 12:43:23 host kernel: [   65.097879] mptscsih: ioc0: attempting task abort! (sc=ef5c5140)
Sep 12 12:43:23 host kernel: [   65.099755] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 24 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   65.212041] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5140)
Sep 12 12:43:24 host kernel: [   65.213901] mptscsih: ioc0: attempting task abort! (sc=ef5c58c0)
Sep 12 12:43:24 host kernel: [   65.214735] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 28 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   65.324125] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c58c0)
Sep 12 12:43:24 host kernel: [   65.329758] mptscsih: ioc0: attempting task abort! (sc=ef5c5680)
Sep 12 12:43:24 host kernel: [   65.331052] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 2c 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   65.440073] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5680)
Sep 12 12:43:24 host kernel: [   65.441819] mptscsih: ioc0: attempting task abort! (sc=ef5c5200)
Sep 12 12:43:24 host kernel: [   65.442522] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 3e 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   65.552098] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5200)
Sep 12 12:43:24 host kernel: [   65.554573] mptscsih: ioc0: attempting task abort! (sc=ef5c5ec0)
Sep 12 12:43:24 host kernel: [   65.558250] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 42 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   65.668087] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5ec0)
Sep 12 12:43:24 host kernel: [   65.670541] mptscsih: ioc0: attempting task abort! (sc=ef5c5740)
Sep 12 12:43:24 host kernel: [   65.671560] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 4a 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   65.784083] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5740)
Sep 12 12:43:24 host kernel: [   65.786540] mptscsih: ioc0: attempting task abort! (sc=ef5c5080)
Sep 12 12:43:24 host kernel: [   65.787318] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 4e 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   65.896107] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5080)
Sep 12 12:43:24 host kernel: [   65.900268] mptscsih: ioc0: attempting task abort! (sc=ef5c5500)
Sep 12 12:43:24 host kernel: [   65.902051] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 56 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   66.016098] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ef5c5500)
Sep 12 12:43:24 host kernel: [   66.018619] mptscsih: ioc0: attempting target reset! (sc=ef5c5e00)
Sep 12 12:43:24 host kernel: [   66.019624] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 17 1c 00 00 04 00 00
Sep 12 12:43:24 host kernel: [   66.132091] mptscsih: ioc0: target reset: SUCCESS (sc=ef5c5e00)

It's a long standing issue:
https://forums.virtualbox.org/viewtopic.php?f=3&t=25568&start=15#p151470

Any other suggestions about controllers that actually do work?

@adrelanos adrelanos reopened this Sep 12, 2014
@adrelanos
Copy link
Member

@adrelanos adrelanos commented Sep 13, 2014

Happened just one for me when I was starting Whonix-Gateway 8.6.6.7 for the first time while at the same time importing Whonix-Workstation 8.6.6.7. So this happened while the host hdd was under high load. Since it was only those kernel messages, no other ill effects, and very few bug reports about this on the web, I guess we can keep this for Whonix 9.

@adrelanos adrelanos removed this from the Whonix 9 milestone Sep 13, 2014
@Neurodrive
Copy link
Author

@Neurodrive Neurodrive commented Sep 14, 2014

I have another suggestion if this happens again, disable I/0 APIC. VirtualBox says that it might decrease performance if its turned on, by default the VM uses 1 core, and its a 32 bit guest operative, system, I/O APIC is good on multi-processor setups and 64 bit guests OS, WHONIX is a 32 bit guest OS, and i don't use more than 1 core for it, at least in my case. I don't know what is the main use when people use WHONIX, but anonymity, doesn't require 4 or 8 cores, WHONIX its limited because its a 32 bit OS so there shouldn't be much of a issue.

@adrelanos
Copy link
Member

@adrelanos adrelanos commented Sep 17, 2014

Disabling I/0 APIC didn't help. Same issue.

@Neurodrive
Copy link
Author

@Neurodrive Neurodrive commented Sep 23, 2014

What hard drives are you using on the host system ? This looks like an I/O overflow to me. And it might not be the emulation system, but the host system hardware failure. Could be anything some weird firmware causing this or who knows.

@adrelanos
Copy link
Member

@adrelanos adrelanos commented Dec 6, 2014

Got a ssd drive on the host. No issues on the host otherwise.

@JasonJAyalaP
Copy link
Member

@JasonJAyalaP JasonJAyalaP commented Jan 12, 2015

Closed until we get more info/things to try.

@adrelanos
Copy link
Member

@adrelanos adrelanos commented Mar 22, 2020

Any update?

@CatsDans
Copy link

@CatsDans CatsDans commented Mar 28, 2020

I have very similar problem - https://www.virtualbox.org/ticket/19429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants