Ticket #458 (closed defect: duplicate)

Opened 10 years ago

Last modified 7 years ago

FreeBSD 6.2 sigreturn

Reported by: Kronuz Owned by:
Priority: major Component: VMM
Version: VirtualBox 2.0.2 Keywords: sigreturn eflags freebsd
Cc: Guest type: BSD
Host type: other


I'm receiving the following message when certain commands are run in FreeBSD 6.2 and VirtualBox 1.4.0:

sigreturn: eflags 0x80247

For instance, after a clean minimal installation from the network, if I try:

portsnap fetch extract

or later if I try to build the /usr/ports/shells/bash port I get the message at some point and it freezes the console. I'm guessing it's a VirtualBox issue since it seems to happen only under VirtualBox.

Change History

comment:1 Changed 10 years ago by Kronuz

Yep, confirmed, I tried it again and I get:

  sigreturn: eflags = 0x80247

Just after the 'portsnap fetch extract' call, after the tree has been extracted (which I may add, takes a very long time, and presumibly lots of memory) and just after the "done." word is written in the "Building new INDEX files... done." message by portsnap and before returning to the shell (effectively locking the console too). It seems the eflags get somehow corrupted during the process for some reason.

Later, in a second console, if I try to shutdown and reboot, I get the following messages back in the first (locked or frozen) console:

  sigreturn: eflags = 0x80287

  sigreturn: eflags = 0x80293
  sigreturn: eflags = 0x80207

Just for the record, I'm using Windows Vista x86 as the Host system, FreeBSD 6.2 x86 and VirtualBox 1.4.0.

comment:2 Changed 10 years ago by Neelance

Same problem here. FreeBSD as the guest and Ubuntu as the host system.

comment:3 Changed 10 years ago by bouleetbil

hello, I've the same problem with gentoo and Host system, Gentoo/FreeBSD

If i use sudo that work fine.

comment:4 in reply to: ↑ description Changed 10 years ago by martin

I can confirm the same issue with:
VirtualBox 1.5
Host: Windows Vista
Guest: FreeBSD 6.2

Happens at random during large compilations (make / gcc). In one single case I also had a filesystem hang in the guest system. (this may or may not be related)

Notable is, that in my case the make will cause high CPU usage. Thus it could be a timing issue, where the VM does not react fast enough?

sigreturn: eflags = 0x80282
sigsigreturn: eflags = 0x80286
sigreturn: eflags = 0x80213
return: eflags = 0x80286
sigreturn: eflags = 0x80247

comment:5 Changed 10 years ago by techie

Several of these when making world in VirtualBox 1.5.0 First comes sigreturn: eflags = 0x80247

and then

sigreturn: eflags = 0x80282

After last one system seems to hang with 100% CPU usage.

comment:6 Changed 10 years ago by sbeh

Re-Enabling ACPI in the VM's settings fixes this.

comment:7 Changed 10 years ago by sbeh

Nope, that was incorrect, but it seems to help running longer.

comment:8 Changed 10 years ago by mitechka

Confirmed on VirtualBox 1.5.2 installed from RPM (1.5.2_25433_fedora7) on Fedora 8 host and FreeBSD 6.2 guest. Doesn't seem to hang the VM, but the 0x80287 message keeps popping up and I think it causes some guest processes to misbehave (SSH daemon froze solid once so far).

comment:9 Changed 10 years ago by gildedgod

I can confirm the same issue with:

VirtualBox 1.5.2 Host: Windows Vista Business Guest: FreeBSD 6.2


sigreturn: eflags = 0x80282 sigreturn: eflags = 0x80247 & etc....

While compiling php5 with extensions I've had this error 12 times already... WTF?

comment:10 Changed 10 years ago by modjo

I can confirm. VB: 1.5.2 Host OS: Windows Vista Ultimate Guest OS: FreeBSD 6.2

At portsnap fetch there is a mistake: sigreturn: eflags = 0x80247. After any time there is a mistake: sigreturn: eflags = 0x80282. The console any more does not work.

First time was possible to unpack ports (portsnap fetch extract), but at assembly/usr/ports/misc/mc there is a mistake sigreturn: eflags = 0x80282

comment:11 Changed 10 years ago by skibrianski

I'm getting this as well, with FreeBSD 4.11 guest. Running 1.5.4-27034_Ubuntu_gutsy on amd64.

comment:12 Changed 10 years ago by skibrianski

PS - I just now got the problem for the first time on my FreeBSD 6.2 VM, but the problem happens *much* more frequently with FreeBSD 4.11.

comment:13 Changed 10 years ago by DALDON

VB: 1.5.7 Host OS: Ubuntu Linux 7.04 Guest OS: FreeBSD 6.2; 6.3; 7.0

bsd-gate# cd /usr/src/ bsd-gate# make buildkernel KERNCONF=MYKERNEL

eflags = 0x80282


comment:14 Changed 10 years ago by DALDON

eflags = 0x80286


comment:15 Changed 10 years ago by DALDON

Sorru - VB: 1.5.6

comment:16 Changed 10 years ago by fezzz

...unfortunately still open in virtualbox 1.6

Host : Vista 32 Guest: freeBSD 7.0

is there any workaround?

comment:17 Changed 10 years ago by jbuhrt

I am running Virtual Box 1.6.0, now maintained by Sun Microsystems. I am running

HOST: Windows x86 Vista Home Premium: Service Pack 1 GUEST: FreeBSD7-RELEASE

I have ran into the same issues. I just did a fresh install and ran into this problem, just as soon as I started to install nmap from ports: /usr/ports/security/nmap

As I was installing nmap a few programs were needed such as: gmake and gettext. As soon as gettext started to extract after being downloaded I ran into the problem: sigreturn: eflags = 0x80282

Here is some output:

cd /usr/ports/security/nmap make install && make clean

=> Attempting to fetch from gettext-0.16.1.tar.gz 100% of 8339 kB 77 kBps 00m00s ===> Extracting for gettext-0.16.1_3 => MD5 Checksum OK for gettext-0.16.1.tar.gz. => SHA256 Checksum OK for gettext-0.16.1.tar.gz. sigreturn: eflags = 0x80282

I see this problem resides in FreeBSD6.2-RELEASE, and is also present in FreeBSD7-RELEASE. Any ideas? Thanks.

comment:18 Changed 10 years ago by concord437

Same issue,

HOST: Windows x86 Vista Ultimate SP1. GUEST: FreeBSD x86 7x-RELEASE

sigreturn: eflags = <address>

Seems to only do it under load. Forced to go back to vmware :(

comment:19 Changed 10 years ago by B-Con

Same problem. Trying to do a make buildkernel on FreeBSD 5.4 in VBox 1.5.6_OSE on Arch Linux.

sigreturn: eflags = 0x80282 sigreturn: eflags = 0x80203

comment:20 Changed 9 years ago by frank

  • Guest type changed from other to BSD

comment:21 Changed 9 years ago by martin

Update: see for a workaround (tested with FBSD 7.0 under windows(vista) host.

To the VBOX team, maybe it helps tracking why VT-x doesn't work on startup ?

With regards to the SigReturn issue, it appears more frequent the lower kern.hz it set (in boot/loader.conf) => 50 will trigger it awful often; 1000 will triger it very rarely (for me), but slow down everything) With VT-x, the sig-return is no longer an issue

comment:22 Changed 9 years ago by DALDON

What is shit..? : Vbox 1.6.4 FreeBSD 7.0 compiling kernel - sigreturn: eflags = 0x80282 sigreturn: eflags = 0x80203

comment:23 Changed 9 years ago by radious

Unfortunately same in VBox 1.6.4 hosted on Linux with FreeBSD7.0 (both RELEASE and STABLE) as guest.

comment:24 Changed 9 years ago by aduitsis

Same here. Linux host with FreeBSD 7 as guest, virtualbox 1.6.4.

comment:25 Changed 9 years ago by balboah

Same issue in FreeBSD 6.2 with virtualbox 2.0 Happens when I do portsnap extract or randomly when trying to build packages from ports with alot of cpu/disk activity

Also tried the workaround mentioned in this thread but with no luck

comment:26 Changed 9 years ago by balboah

Oh and this was with Mac OSX as host, with VT-x and acpi enabled in the guest

comment:27 Changed 9 years ago by saddy

Same issue on freeBSD 7 (guest) + WinXP (host). trying to make kde4 from ports.. One more error with disk (subdisk detached...)

comment:28 Changed 9 years ago by frank

  • Version changed from VirtualBox 1.4.0 to VirtualBox 2.0.2
  • Component changed from other to VMM

#1771 was marked as duplicate of this one. To all: Please check if something changes if you enabled VT-x / AMD-V for that VM. Please check the session information dialog (HostKey + N) if these processor extensions are actually used. Otherwise check your BIOS settings.

comment:29 follow-up: ↓ 30 Changed 9 years ago by mwdmeyer

I'm having the same problem here on an intel iMac.

FreeBSD 7.0 (guest OS) MacOS 10.5.5 (host OS) VT-x and acpi enabled (have also tried with acpi disabled).

Unfortunately I will have to use another product as I don't have time to wait for a fix.

comment:30 in reply to: ↑ 29 Changed 9 years ago by mwdmeyer

I am running version 2.0.2 of virtualbox also.


comment:31 Changed 9 years ago by stargrave

I've hit the same problem when installing a ruby package in a FreeBSD 7.0 guest. My host is opensolaris and I'm running vbox 2.0.2. I don't have any hardware acceleration as I'm running on an old machine (thinkpad t40). Any ideas as to what might be causing this yet? Are you able to reproduce the problem or do you need more info? I'm not a developer, but what can I do to help you make this better?

comment:32 Changed 9 years ago by dnelson

A little more information, if this helps to track down the cause:

The bit in eflags that sigreturn is complaining about is 0x8000 (bit 19 - VIF - virtual interrupt flag). Could it be that VirtualBox is setting that bit (or failing to clear it), maybe during interrupt processing or switching modes?

comment:33 Changed 9 years ago by jdjennings

Still exists in version 2.0.4.

comment:34 Changed 9 years ago by DALDON

Yes, it`s shit... I sad. Host OS Ubuntu 8.04.1 guest OS is FreeBSD 7.0 - , FreeBSD 7.0 is not started install..

VB 2.0.4

Sorry, it`s my bad English.

comment:35 Changed 9 years ago by dnelson

Here's a FreeBSD kernel patch that will work around the problem.

Index: machdep.c
RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
diff -u -p machdep.c
--- machdep.c   1 Aug 2008 20:17:21 -0000
+++ machdep.c   24 Nov 2008 18:20:49 -0000
@@ -1016,10 +1016,22 @@ sigreturn(td, uap)
                 * corrupted by the signal handler without us knowing.
                 * Corruption of the PSL_RF bit at worst causes one more or
                 * one less debugger trap, so allowing it is fairly harmless.
+                * Virtualbox occasionally sets PSL_VIF on its own, so clear 
+                * it if we see it and it's the only invalid flag.
+#define PSL_FLAGS "\x10\26ID\25VIP\24VIF\23AC\22VM\21RF\17NT\16IOPL2\15IOPL1\14V\13D\12I\11T\10N\7Z\5AF\2PF\1C"
                if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) {
-                       printf("sigreturn: eflags = 0x%x\n", eflags);
-                       return (EINVAL);
+                       int invalid = ((eflags & ~PSL_RF)^(regs->tf_eflags & ~PSL_RF))
+                           & ~PSL_USERCHANGE;
+                       printf("sigreturn: eflags = 0x%b, tf_eflags = 0x%b; invalid: 0x%b\n",
+                           eflags, PSL_FLAGS, regs->tf_eflags, PSL_FLAGS,
+                           invalid, PSL_FLAGS);
+                       if (invalid == PSL_VIF) {
+                               printf("Clearing invalid PSL_VIF from eflags and continuing\n");
+                               eflags &= ~PSL_VIF;
+                       } else
+                               return (EINVAL);

comment:36 Changed 9 years ago by bughunter2

But the real problem seems to be that VirtualBox is setting PSL_VIF "randomnly". I say "randomnly" because I have not investigated the case further enough to judge it.

This bug occurs for me too with FreeBSD 7.0 after installing GNOME using "pkg_add -r -v gnome2". It all succeeds and says that GNOME was successfully installed, and just after that message I get "sigreturn: eflags = 0x80203".

comment:37 Changed 9 years ago by sandervl73

I've seen the patch, but haven't had time to look into it yet.

comment:38 Changed 9 years ago by gd

Windows xp as host and FREEBSD 6.4 as guest

sigreturn: eflags = 0x802xxx

whats going on????? vbox 2.1.0

comment:39 Changed 9 years ago by DALDON

Please fix this bug!

Host OS Ubuntu 8.04 and FreeBSD 7.0 as guest...

sigreturn: eflags .... Random compiling time.

comment:40 Changed 9 years ago by dnelson

At least on my machine, booting with VT-x enabled seems to make the sigreturn messages disappear completely. Make sure you're running Virtualbox 2.1.0 or later, which fixed bug #2213.

comment:41 Changed 9 years ago by gd

nelson, with or without your patch above ?

comment:42 Changed 9 years ago by dnelson

Without. All my patch does is recover when sigreturn sees the invalid flag; it doesn't prevent it from occurring. So if you can enable VT-x, do it. If you can't, apply the patch :)

comment:43 Changed 9 years ago by gd

I cant :(((. Applied patch though it is above my understanding what is happening and what the bug does to the system...

comment:44 Changed 9 years ago by jepace

With VirtualBox 2.1.0 running on host Windows XP, with guest FreeBSD 7.1 (release candidate), with VT-x enabled, I still get the error message, but it doesn't stop the make that is in progress anymore.

comment:45 Changed 9 years ago by attoparsec

  • Status changed from new to closed
  • Resolution set to duplicate

This appears to be the same issue as handled in #2341 "FreeBSD 7.0-RELEASE sigreturn eflags"

comment:46 Changed 7 years ago by Shieghtun

Hi! Get the same problem while building FreeBSD kernel on Virtual Box Solve it by adding " kern.hz="2000" " into /boot/defaults/loader.conf

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use