Opened 17 years ago

Closed 15 years ago

Last modified 14 years ago

#458 closed defect (duplicate)

FreeBSD 6.2 sigreturn

Reported by: Kronuz Owned by:
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 (46)

comment:1 by Kronuz, 17 years ago

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 by Neelance, 17 years ago

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

comment:3 by bouleetbil, 17 years ago

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

If i use sudo that work fine.

in reply to:  description comment:4 by Martin, 17 years ago

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 by techie, 17 years ago

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 by sbeh, 17 years ago

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

comment:7 by sbeh, 17 years ago

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

comment:8 by Dmitriy Kropivnitskiy, 16 years ago

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 by gildedgod, 16 years ago

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 by Konstantin, 16 years ago

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 by skibrianski, 16 years ago

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

comment:12 by skibrianski, 16 years ago

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 by DALDON, 16 years ago

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 by DALDON, 16 years ago

eflags = 0x80286


comment:15 by DALDON, 16 years ago

Sorru - VB: 1.5.6

comment:16 by fezzz, 16 years ago

...unfortunately still open in virtualbox 1.6

Host : Vista 32 Guest: freeBSD 7.0

is there any workaround?

comment:17 by Jay Buhrt, 16 years ago

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 by concord, 16 years ago

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 by B-Con, 16 years ago

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 by Frank Mehnert, 16 years ago

Guest type: otherBSD

comment:21 by Martin, 16 years ago

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 by DALDON, 16 years ago

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

comment:23 by radious, 16 years ago

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

comment:24 by aduitsis, 16 years ago

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

comment:25 by Johnny, 16 years ago

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 by Johnny, 16 years ago

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

comment:27 by saddy, 16 years ago

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

comment:28 by Frank Mehnert, 16 years ago

Component: otherVMM
Version: VirtualBox 1.4.0VirtualBox 2.0.2

#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 by Michael Dale, 16 years ago

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.

in reply to:  29 comment:30 by Michael Dale, 16 years ago

I am running version 2.0.2 of virtualbox also.


comment:31 by andrew, 16 years ago

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 by Dan Nelson, 15 years ago

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 by Jeff Jennings, 15 years ago

Still exists in version 2.0.4.

comment:34 by DALDON, 15 years ago

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 by Dan Nelson, 15 years ago

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 by Jelle Geerts, 15 years ago

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 by Sander van Leeuwen, 15 years ago

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

comment:38 by J, 15 years ago

Windows xp as host and FREEBSD 6.4 as guest

sigreturn: eflags = 0x802xxx

whats going on????? vbox 2.1.0

comment:39 by DALDON, 15 years ago

Please fix this bug!

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

sigreturn: eflags .... Random compiling time.

comment:40 by Dan Nelson, 15 years ago

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 by J, 15 years ago

nelson, with or without your patch above ?

comment:42 by Dan Nelson, 15 years ago

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 by J, 15 years ago

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

comment:44 by jepace, 15 years ago

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 by Jens, 15 years ago

Resolution: duplicate
Status: newclosed

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

comment:46 by Shieghtun, 14 years ago

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.

© 2023 Oracle
ContactPrivacy policyTerms of Use