VB and its background execution

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.
Post Reply
anonymous

VB and its background execution

Post by anonymous »

Hello,

I'm using the latest VB 7.12 on macOS Ventura 13.6. My guest OS is IBM OS/2 4.52 with Cron/2 tasks. I found that some tasks are not running on time. Here is the Cron log with 1 minute marks:

Code: Select all

Launching cronmark.cmd  on Thu 11.16.2023 @ 13:02...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:03...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:04...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:05...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:06...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:07...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:11...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:13...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:14...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:15...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:17...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:18...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:19...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:23...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:26...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:31...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:32...done!

You can see, there are missed Cron runs between 13:07 and 13:11, also 13:12 and 13:16 are missed, 13:19-13:23, 13-23:13-26 and so on.

It seems that in background mode (when VB is out of screen), Guess OS is going to power snap or something like that. During all that time I have worked with my laptop in other application, it did not sleep or napped.

My question: could it be possible to prevent somehow this "falling asleep" mode for Guest OS? I need it to run in background even with reduced CPU frequent (if we talk about the power saving ).

Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VB and its background execution

Post by scottgus1 »

VadymT wrote: 16. Nov 2023, 20:42 It seems that in background mode (when VB is out of screen), Guess OS is going to power snap or something like that.
Can you coordinate this for certain?

As in:
Started VM at 13:22:36
Saw every-minute cron jobs logging runs in VM with the VM window on the top of the host screen:

Code: Select all

Launching cronmark.cmd  on Thu 11.16.2023 @ 13:23...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:23...done!
...repeats every minute...
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:38...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:39...done!
At host time 13:39:27, brought another host window forward
At host time 13:46:12 brought the VM window forward again
The cron jobs log continued like this:

Code: Select all

...
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:38...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:39...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 13:47...done!
Can you put together some sort of report like this with the host time when the VM starts, and coordinating the host VM window de-focusing and refocusing times against the cron logs?

Also, provide a VM Log of the run where the coordinated report is provided, so we can see if the Virtualbox part of the VM is suspending:

Start the VM from full normal shutdown, not save-state. Note the host time when the VM starts. Run until you see the problem happen, then shut down the VM from within the VM's OS.

Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. In the "Logs" subfolder, zip the VM's "vbox.log", and post the zip file, using the forum's Attachments tab. (Configure your host OS to show all extensions so you can find the "vbox.log", not "vbox.log.1", etc.)

**********************
Also, be sure there are no power-saving functions enabled in the VM's OS. If that OS were installed in a real PC, the PC should never shut off or sleep or turn off the screen or run a screen saver, etc.
anonymous

Re: VB and its background execution

Post by anonymous »

Also, provide a VM Log of the run where the coordinated report is provided, so we can see if the Virtualbox part of the VM is suspending:
Thank you for reponding. Sure, let's test it again more carefully.

This is the log from CRON. Guest OS has been run for ~10 minutes. It was booted, then I put it on background at 20:07. Later, at 20:16 moved it to focus and shutdown the OS. That's it.

Code: Select all

── LAUNCH ───────────────────────────
Launching cronmark.cmd  on Thu 11.16.2023 @ 20:06...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 20:07...done!
Launching cronmark.cmd  on Thu 11.16.2023 @ 20:16...done!
Thu 11.16.2023 20:16
All that time Guest OS worked in background without single switch to focus. A log file is attached.

It would be nice if you did recommend something. I see a lot of errors in the log file, not sure why. If you like to see the configuration, or screenshots or another test - just let me know.

Thanks.
Attachments
VBox.zip
(37.82 KiB) Downloaded 241 times
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VB and its background execution

Post by fth0 »

In the VM configuration, you've disabled System > Acceleration > Nested Paging, which can slowdown the VM considerably. Why did you do that? I'd suggest to enable it, since this could very well be a part of your problem.

Out of curiosity: Why do you provide a TPM to OS/2?

The error messages regarding taking screenshots usually only occur for a few seconds and can be ignored. In your case, they additionally show the time-keeping problem with their varying delays. In the VirtualBox Manager, right-click on the Preview window to change the intended delay between the screenshots.
anonymous

Re: VB and its background execution

Post by anonymous »

In the VM configuration, you've disabled System > Acceleration > Nested Paging, which can slowdown the VM considerably. Why did you do that? I'd suggest to enable it, since this could very well be a part of your problem.
This is default value. If you suggest enabling it, please specify the exact parameter: there are a few in the dropdown.
Out of curiosity: Why do you provide a TPM to OS/2?
TPM does not support by IBM OS/2, therefore this parameter is not in use at all.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VB and its background execution

Post by fth0 »

I specified the exact parameter (more or less). If you follow the path I've given, there's only one checkbox with the text "Enable Nested Paging", and I'm pretty sure that it's enabled by default. If you don't believe me, please create a new VM (without installing the guest OS) and compare the settings.
VadymT wrote: 17. Nov 2023, 15:38 TPM does not support by IBM OS/2
Yes, I thought so. Why is it enabled in the configuration then?
klaus
Oracle Corporation
Posts: 1139
Joined: 10. May 2007, 14:57

Re: VB and its background execution

Post by klaus »

The VBox.log file shows that time is passing without the VM (or the host) being able to do something. The symptoms are the
TM: Giving up catch-up attempt at a X ns lag; new total: Y ns
and
VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received AA seconds ago
VMMDev: GuestHeartBeat: Guest is alive (gone BB ns)
Normally if macOS is sleeping it should notify VirtualBox (which will pause and resume the VM - it can't really prevent the OS from sleeping), so this is unexpected.
Post Reply