Author Topic: VirtualBox problems  (Read 57995 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1324
  • Karma: +26/-0
    • View Profile
Re: VirtualBox problems
« Reply #45 on: April 03, 2018, 04:46:34 am »
Hi Mark!

...I will try what you suggested above. After migrating to libcx 0.6.2-1 I have not had a successful start of either VM, but that may be because of the current configuration...

The key here is to include the 'SET LIBCX_HIGHMEM=2' in either your CONFIG.SYS or in the vbox.cmd file (like the one I attached to my previous post) which you use to start virtualbox with. That will allow you to run vbox with the new experimental libcx. If you do not have the variable set it is a known fact that virtualbox will not run, at least that's with the standard OS2 or AOS kernels, the result may be different with OS4 kernels.

...I was curious about one other thing.

Is VirtualBox and your VM's installed on the same partition?...

Here is the configuration I have:

1) 'G:\' is my boot drive
2) VBox is installed on G:\
3) virtual machine definitions are stored on G:\, but in a different directly as defined by 'SET VBOX_USER_HOME=G:\HOME\VirtualBox'
4) the VM disk images are stored on another HD (and another parittion), idea there being to avoid disk contention if the main boot drive is being accessed by the program while at the same time the vm is trying to access it's virtual disk (basically a poor man's HD load-balancing if you will, same idea as yours)

I will give the version Valery is talking about a try next as that appears to be a slightly upgraded (newer) version, so if I'm going to experiment why not work with the one that is being actively worked on?

David Graser

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +87/-0
    • View Profile
Re: VirtualBox problems
« Reply #46 on: April 03, 2018, 06:14:16 am »
What file system do you use on the other hard drive for the disk images?

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: VirtualBox problems
« Reply #47 on: April 03, 2018, 06:49:13 am »
Hi All!

After spending a couple of hours this afternoon, and an hour before turning in, I think I've found a consistent way to start the VM's without the 1018 error, under VirtualBox v5.0.51 (at least with LIBCX 0.6.0-1 installed),

1) Start VirtualBox
2) When the Virtualbox window comes up, wait 15 seconds, then start a VM. The VM should start normally.
3) If you get the 1018 error, click ABORT on the "unknown error window", then OKAY on the "Failed to open a session window", wait 15 seconds then start a VM session again. It should open normally.

I was able to open the VM that way 15 times in a row with success, including after closing VirtualBox completely, and starting the whole program again a few times. Waiting 10 seconds didn't do it, at least here, but everything worked at 15 seconds delay.

I back leveled from the experimental LIBCX 0.6.2-1 earlier in the evening, and as its late, so no testing there, I'm not planning to try it tonight but maybe tomorrow.

If anyone else cares to try and report back, with either version of LIBCX installed, feel free. Maybe we have a workaround, if it can be reproduced, Guys!

Best of the evening to you (from here at least).

Mark



Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: VirtualBox problems
« Reply #48 on: April 03, 2018, 09:52:32 am »
What I get on the first try is
Quote
Failed to open a session for the virtual machine mint.

The virtual machine 'mint' has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {f30138d4-e5ea-4b3a-8858-a059de4c93fd}


This means that either you have some required DLL's missing, or incorrect version, or having high memory problems. This is not a problem with VirtusalBox itself. Did you tried LIBCX_HIGHMEM=2 before starting VBox? I don't need this on my machine, I only need this to start VBoxSDL successfully, otherwise SDL crashes. Yes, some high memory related problems, not VBox-related.

Waiting a bit after this allows the virtual machine to start.
The log seems to use a different charset,

Quote
Log created: 2018-04-03T00:38:20.588000000Z
Executable: K:\VPC\VIRTUALBOX.EXE
K:\VPC\VirtualBox.exe kLIBC á--comment ámint á--startvm á43cabf9e-2003-43ea-a9e0-db4fa1156a6c á--no-startvm-errormsgbox

Yes, there are some signs (probably, quotes, probably, in unicode) in command lines which VBox uses to start its processes. That's the way it works.

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: VirtualBox problems
« Reply #49 on: April 03, 2018, 10:09:02 am »
2Mark Szkolnicki:

> Result Code: NS_ERROR_FAILURE (0x80004005)
> Component: MachineWrap
> Interface: IMachine {f30138d4-e5ea-4b3a-8858-a059de4c93fd}

As I said above to Dave, you either have shared memory problems, or have some required DLL's missing. As you said that you sometimes started the VM sucvcessfully, I suspect that you have (shared) memory errors.

Quote
The log generated at the time in the VirtualBox \BIN directory is as Dave also describes (mine was slightly different, as sent to you previously):

Log created: 2018-04-03T00:38:20.588000000Z
Executable: K:\VPC\VIRTUALBOX.EXE
K:\VPC\VirtualBox.exe kLIBC á--comment ámint á--startvm á43cabf9e-2003-43ea-a9e0-db4fa1156a6c á--no-startvm-errormsgbox

This log is not relevant. I asked about the VM log.

> At least for me, I can get the VM's to start up more consistently with LIBCX 0.6.0 installed than under the experimental LIBCX 0.6.2, but that may just be my experience, not others.

Yes, so use libcx 0.6.0, or, better, add LIBCX_HIGHMEM=2 to your environment, if you use libcx 0.6.2

> In regards to your other question, when the Windows XP VM has opened, when the AMD-V was enabled, rendering of the desktop was exceptionally slow (sometimes minutes for the desktop icons to appear) and clicking on folders to open also took sometimes minutes. After disabling that feature, the desktop seemed to open normally, and opening folders or other icons seemed to be a lot faster (seconds not minutes).

This has nothing to do with performance. You should just disable AMD-V/VT-x on your machine.

> Just an observation and first impression, Sir. If we can get some way to consistently start VM sessions, I will try boots with the setting enabled and then disabled, to see if what I am observing is correct or not.

As I said above, fix the (shared) memory problems on your machine. Boot with which setting disabled/enabled? Did I asked you to disable/enable any options?

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: VirtualBox problems
« Reply #50 on: April 03, 2018, 10:20:59 am »
@Mark Szkolnicki:

> error 1018

%define VERR_INVALID_CPU_ID    (-1018)

Are you sure it is 1018, not -1018?

This means that current CPU ID is invalid. Unfortunately, there is no reliable way to determine the current CPU ID for ring0 on IBM's kernels. Currently, LAPIC ID's are used to emulate getting the CPU ID, but they are not guaranteed to be consecutive, which is assumed. If your current CPU number gets into the "hole" between valid CPU numbers, this happens. So, you're unlucky. The only way to avoid this error is currently to use OS/4 kernel. Unlike IBM kernels, it has a consistent way of getting CPU ID's which are guaranteed to be consecutive (which is assumed in VBox). So, you can try using the OS/4 kernel (if you're experienced enough)

2Dave Yeo: Do you have SET NSPR_OS2_NO_HIRES_TIMER=1 in your config.sys? If so, could you repeat the test with it disabled (just set it to an empty line in OS/2 window before running the test)?
« Last Edit: April 03, 2018, 10:54:53 am by Valery Sedletski »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4805
  • Karma: +99/-1
    • View Profile
Re: VirtualBox problems
« Reply #51 on: April 03, 2018, 04:39:44 pm »
@Valery, considering the virtual machine will usually start up on the second or third try, I doubt it is a missing DLL, though it could be a too new DLL. Same with shared memory, as even on a newly booted system it works the same.
I do have to have LIBCX_HIGHMEM=2 in my environment to get it working.
I did forget to unset SET NSPR_OS2_NO_HIRES_TIMER, here's the log, it's still broken.

Silvan Scherrer

  • Full Member
  • ***
  • Posts: 200
  • Karma: +1/-0
    • View Profile
Re: VirtualBox problems
« Reply #52 on: April 03, 2018, 05:03:20 pm »
@Valery, considering the virtual machine will usually start up on the second or third try, I doubt it is a missing DLL, though it could be a too new DLL. Same with shared memory, as even on a newly booted system it works the same.
I do have to have LIBCX_HIGHMEM=2 in my environment to get it working.
I did forget to unset SET NSPR_OS2_NO_HIRES_TIMER, here's the log, it's still broken.
Unfortunately we know it's broken, but ArcaNoae says all is ok. We can't do more beside adding a ticket at there mantis, which we did long ago.
kind regards
Silvan
CTO bww bitwise works GmbH

Please help us with donations, so we can further work on OS/2 based projects. Our Shop is at https://www.bitwiseworks.com/shop/index.php

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: VirtualBox problems
« Reply #53 on: April 03, 2018, 07:26:30 pm »
2Dave Yeo:

Thanks for the log! So, it works with SET LIBCX_HIGHMEM=2 for you? That's what I talked about. Leave it permanently in your config.sys then (or only in VBox environment). Unfortunately, it works fine on my machine, so I don't experience this, so I cannot play with it and see potential workarounds. VirtualBox.exe starts fine on my machine without SET LIBCX_HIGHMEM=1. Only VBoxSDL.exe crashes without it. So, I'd recommend for now to leave SET LIBCX_HIGHMEM=2 in CONFIG.SYS permanently.

Also, there can be problems with insufficient address space on your machine. How large is VIRTUALADDRESSLIMIT on your machine? Did you tried to load VBox DLL's high? There is highmem.cmd for that purpose (you need to have highmem.exe on PATH).

PS Unfortunantely, these problems are likely to happen on each memory-hungry program like VBox, Mozilla, Qt or OpenOffice. OS/2 is a 32-bit OS. Additionally, it has special address space layout with Private/Shared/High Private/High Shared arenas, limiting each other. So, you can easily run out of address space, so no wonder.
« Last Edit: April 03, 2018, 07:31:24 pm by Valery Sedletski »

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: VirtualBox problems
« Reply #54 on: April 03, 2018, 07:59:41 pm »
Good Morning Valery!


PS Unfortunantely, these problems are likely to happen on each memory-hungry program like VBox, Mozilla, Qt or OpenOffice. OS/2 is a 32-bit OS. Additionally, it has special address space layout with Private/Shared/High Private/High Shared arenas, limiting each other. So, you can easily run out of address space, so no wonder.


I would agree the problems opening seem to be related to shared or conflicting memory use.

As mentioned last night, I was able to get a VBOX VM to open consistently after a 15 second delay after the program initially opens, or after closing the 1018 error windows. However, trying it this morning, I was having the same difficulties, even after a 15 second delay, until I realized I had Seamonkey already open in the background (Seamonkey 2.35).

After closing it, I was able to start a VM, and, keeping VBOX running, to download some Windows XP update files, and then reopen and use Seamonkey normally.

However, closing Seamonkey and restarting a second time with VBOX running and reopen Seamonkey it (Seamonkey) would not open until i shut down VBOX

Its a work day so I cannot do a lot of testing but just empirical limited observation to add to the data being gathered

Mark
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: VirtualBox problems
« Reply #55 on: April 03, 2018, 08:17:34 pm »
2 Mark Szkolnicki:

Quote
As mentioned last night, I was able to get a VBOX VM to open consistently after a 15 second delay after the program initially opens, or after closing the 1018 error windows. However, trying it this morning, I was having the same difficulties, even after a 15 second delay, until I realized I had Seamonkey already open in the background (Seamonkey 2.35).

After closing it, I was able to start a VM, and, keeping VBOX running, to download some Windows XP update files, and then reopen and use Seamonkey normally.

However, closing Seamonkey and restarting a second time with VBOX running and reopen Seamonkey it (Seamonkey) would not open until i shut down VBOX

So yes, these are some memory-related problems. Could you, please, show me your config.sys? Also, how many physical RAM is available to OS/2 on your machine? What does XCenter "sentinel memory monitor" show?

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: VirtualBox problems
« Reply #56 on: April 04, 2018, 03:47:54 am »
2Dariusz

Good Evening, Sir!

Hi Mark!

...I will try what you suggested above. After migrating to libcx 0.6.2-1 I have not had a successful start of either VM, but that may be because of the current configuration...

The key here is to include the 'SET LIBCX_HIGHMEM=2' in either your CONFIG.SYS or in the vbox.cmd file (like the one I attached to my previous post) which you use to start virtualbox with. That will allow you to run vbox with the new experimental libcx. If you do not have the variable set it is a known fact that virtualbox will not run, at least that's with the standard OS2 or AOS kernels, the result may be different with OS4 kernels.

...I was curious about one other thing.

Is VirtualBox and your VM's installed on the same partition?...

Here is the configuration I have:

1) 'G:\' is my boot drive
2) VBox is installed on G:\
3) virtual machine definitions are stored on G:\, but in a different directly as defined by 'SET VBOX_USER_HOME=G:\HOME\VirtualBox'
4) the VM disk images are stored on another HD (and another parittion), idea there being to avoid disk contention if the main boot drive is being accessed by the program while at the same time the vm is trying to access it's virtual disk (basically a poor man's HD load-balancing if you will, same idea as yours)

I will give the version Valery is talking about a try next as that appears to be a slightly upgraded (newer) version, so if I'm going to experiment why not work with the one that is being actively worked on?

Thanks for all the information - looking at your CONFIG.SYS it was very well organized, annotated and easy to follow. I assume you do a lot of changes regularly, probably for development and testing.

I was interested in seeing most specifically if all your files (VBOX, VM's, etc.) were all on the same partition, or scattered across partitions like mine, as I thought that might be part of the problem, getting the VM's to start.

But I think I found a workaround last night, using VBOX 5.0.51 that allows for consistent start-up of the VM's, which I have used successfully multiple times today. It has also been tested with both LIBCX 0.6.0-1 and LIBCX 0.6.2-1 (with SET LIBCX_HIGHMEM=2 set in config.sys).

1) Startup the VirtualBox window.
2) Wait 15 seconds, then click on the VM you want to open or press the start button. The VM you requested should start up normally.
3) If you get the 1018 error box, press the "Abort" button, then when the second window appears, the "Okay" button. Wait 15 seconds, then again start the VM, and it should start up normally
4) If neither works, and you have a program open that takes up a lot of memory (in my case Seamonkey 2.35), shut that down first, then attempt 1) to 3) above. You should get a normal VM start.

I tried the above waiting 10 seconds, which did not work for me, but waiting 15 seconds seemed to do it.

With limited testing I believe, as Valery has mentioned, that the problem is related to a shared memory or memory conflict problem. Once the Windows XP VM I've been using for test purposes started I was able to then start Seamonkey 2.35 again and use both successfully at the same time. However, at one point I had to shutdown Seamonkey, while I was still running VBOX, and attempting to restart SeaMonkey, it would not start a second time, with VBOX open

That did not occur again but i suspect YMMV based on how much memory was being used at any specific time

Anyway now at least here I plan to focus on the testing mostly on the VBOX program as opposed to getting the VM to start

You might want to try the above Dariusz or others and see if the same workaround works for you and Best

Mark

Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: VirtualBox problems
« Reply #57 on: April 04, 2018, 09:52:32 pm »
2Valery

Good Afternoon Valery!

2 Mark Szkolnicki:

Quote
As mentioned last night, I was able to get a VBOX VM to open consistently after a 15 second delay after the program initially opens, or after closing the 1018 error windows. However, trying it this morning, I was having the same difficulties, even after a 15 second delay, until I realized I had Seamonkey already open in the background (Seamonkey 2.35).

After closing it, I was able to start a VM, and, keeping VBOX running, to download some Windows XP update files, and then reopen and use Seamonkey normally.

However, closing Seamonkey and restarting a second time with VBOX running and reopen Seamonkey it (Seamonkey) would not open until i shut down VBOX

So yes, these are some memory-related problems. Could you, please, show me your config.sys? Also, how many physical RAM is available to OS/2 on your machine? What does XCenter "sentinel memory monitor" show?

First in regard to one of your previous questions the 1018 error could be "-1018" (See attached JPG). When I saw a "dash" after "Unknown error", I normally assume in english it was a pause between two phrases, not a "minus" mark.

I have attached my ArcaOS 5.0.1 CONFIG.SYS below. The following statements are in it that we have discussed previously:

VIRTUALADDRESSLIMIT=2560
SET LIBCX_HIGHMEM=2 (I currently have LIBCX 0.6.2-1 installed)

I have also set VBOX USER HOME as follows:

SET VBOX_USER_HOME=O:\VBOX\VMs

If you require an explanation of any of the other statements let me know.

I could not find a "sentinel memory monitor" as I don't use XCenter, but I have the utilities "System Load" and "SysInfo v0.9.0" installed on the system. I don't know how accurate their memory display features are, from a programmer or developer standpoint, but they show 3062 Mb of installed memory.

I don't know if this will be of any use to you but I did some memory tests using both utilities when there was:

1) No Load (neither Seamonkey nor VirtualBox with a VM was running)
2) When only SeaMonkey 2.35 was running
3) When only a VirtualBox v5.0.51 VM was running
4) When both programs were running

To get a VirtualBox VM started I again had to shutdown Seamonkey first, but once the VM was running, I was able to start Seamonkey, and run both programs at the same time.

I have attached JPGs of the screenshots of what System Load and SysInfo were both showing related to memory for situations 1) to 4) above  - don't know if its of any value to you, or others Valery, but, as a tester, I like to be thorough.

BTW, I also noted a number of files in the VBOX USER HOME subdirectory as follows

selectorwindow.log
VBoxSVC,log
VirtualBox.xml
VirtualBox.xml-prev

The logs were from yesterday (April 3). Would they be of any use to you?

Mark
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1324
  • Karma: +26/-0
    • View Profile
Re: VirtualBox problems
« Reply #58 on: April 04, 2018, 10:22:40 pm »
Mark,

I use a handly little utility called 'shmemmon' to show me the size of available shared memory. I took a quick look on Hobbes for this, but did not find it. I've attached to the post for your use, or if you reluctant to run this search for the shmemmon.zip out there.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1324
  • Karma: +26/-0
    • View Profile
Re: VirtualBox problems
« Reply #59 on: April 04, 2018, 10:23:22 pm »
Dave,
What file system do you use on the other hard drive for the disk images?

...HPFS386...