10.1 KVM guest can't startx (EE) Illegal instruction at address 0x4a40f0

I'm trying to get X running on a 10.1 system running as a KVM guest. This is a brand new installation, though I did freebsd-update & pkg upgrade / pkg update to try to resolve.

For KVM guest, is there a device I should use in lieu of vesa? With vesa I see:

Code:
[  43.904] (II) VESA(0): VESA VBE OEM Product Rev: Rev. 1
[  43.905] (II) VESA(0): virtual address = 0x804600000,
  physical address = 0xfd000000, size = 16777216
[  43.906] (EE) Illegal instruction at address 0x4a40f0
[  43.906] (EE)
Fatal server error:
[  43.906] (EE) Caught signal 4 (Illegal instruction). Server aborting

I used X -configure and in the xorg.conf played with settings that looked "in the ball park", no luck.

I've installed xorg via pkg, not building from ports.

Full /var/log/Xorg.0.log is at http://pastebin.com/Fei6UHbF

Thanks for any clue
 
How are you starting your guest? You can try other options for the graphics adapter KVM uses e.g. -vga vmware, -vga std, or -vga cirrus.
 
The problem can be traced back to the xf86SlowBcopy() function in the libvgahw.so library (x11-servers/xorg-server):
Code:
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 803806400 (LWP 100500/Xorg)]
0x00000000004a5d90 in xf86SlowBcopy ()
(gdb) bt
#0  0x00000000004a5d90 in xf86SlowBcopy ()
#1  0x000000080407e0e5 in vgaHWSaveFonts ()
  from /usr/local/lib/xorg/modules/libvgahw.so
#2  0x0000000803e7221f in VMWAREPreInit ()
  from /usr/local/lib/xorg/modules/drivers/vmware_drv.so
#3  0x000000000047f4cf in InitOutput ()
#4  0x0000000000429e06 in _start ()
#5  0x0000000000429aff in _start ()
#6  0x0000000800816000 in ?? ()
#7  0x0000000000000000 in ?? ()
Compiling the xorg-server from ports with gcc instead of clang results in a working library and everything seems to be working fine.
 
  • Thanks
Reactions: EW1
Thanks, Daniel. You have saved me many hours of frustration tracking that down.

Let me add that on a fresh install of 10.1 in an RHEL7 KVM host with most of the packages being binary installs, that the gcc48 compiler (gcc48, v. 4.8.5) seemed to behave the best and produced no circular dependencies.

After finding this little make.conf fragment from Roland Smith (addressing another Clang vs. GCC port build issue):

Code:
.if ${.CURDIR:M*/www/chromium}
USE_GCC?=yes
.endif

I was able to run portmaster -t x11-xservers/xorg-server with only two interruptions to install binary packages of perl modules that didn't want to play nice. ("www/chromium" above needs to be changed to "x11-xservers/xorg-server".)

I also had installed some of the x11-drivers packages, thinking that might solve the original problem of the "illegal instruction" error, but when invoking the X server after recompiling with GCC, it complained of a version mismatch between the server and its modules. After a quick rummage in my bag of hammers, I pulled this one out:
Code:
pkg info x86\* | rev | cut -d"-" -f2 | rev |
while read port
do
find /usr/ports/x11-drivers -type d -a -name ${port} -exec portmaster -R "{}" \;
done
which may not be pretty, but it is effective.

Thanks again!
 
Thanks for the solution!
Editing /etc/make.conf
Code:
.if ${.CURDIR:M*/x11-servers/xorg-server}
USE_GCC?=yes
.endif
with postrebuilds
portmaster -t x11-servers/xorg-server
works for me too. :)
 
Back
Top