FS#11014 - Uvesafb stopped working in 2.6.26 because of v86_klibc segfault
Attached to Project:
Arch Linux
Opened by Xavier (shining) - Sunday, 27 July 2008, 09:39 GMT
Last edited by Roman Kyrylych (Romashka) - Monday, 26 January 2009, 11:14 GMT
Opened by Xavier (shining) - Sunday, 27 July 2008, 09:39 GMT
Last edited by Roman Kyrylych (Romashka) - Monday, 26 January 2009, 11:14 GMT
|
Details
Description:
The uvesafb module fails to initialize at boot because v86_kblic fails to start. It always segfault. $ /sbin/v86d_klibc $ dmesg | grep v86d v86d_klibc[4236]: segfault at 8049ffc ip 08049a04 sp bfa5c800 error 7 in v86d_klibc[8048000+2000] Package versions : v86d 0.1.5.2-1 kernel26 2.6.26-2 klibc 1.5-6 I also tried the latest v86d 0.1.6, but it did not help. Steps to reproduce: 1) Upgrade to testing packages 2) Follow the instructions to enable uvesafb/v86d : http://wiki.archlinux.org/index.php/Uvesafb#V86d Workaround and questions : The v86d package provides 2 binaries : a v86d one using shared lib, and a static v86d_klibc. Only v86d_klibc segfaults, v86d works fine. But the /lib/initcpio/install/v86d file specifies both : add_binary "/sbin/v86d_klibc" "/sbin/v86d" I removed the klibc one : add_binary "/sbin/v86d" And regenerated the initcpio image, and now, everything works perfectly, I can't notice any drawbacks. So what is the point of that v86d_klibc static bin? |
This task depends upon
I've replaced add_binary "/sbin/v86d_klibc" "/sbin/v86d" with add_binary "/sbin/v86d" and it works fine now.
v86d_klibc segfaults.
But upgrading is not enough, you _must_ also generate a new initramfs image (mkinitcpio -p kernel26) after the update. Unfortunately, pacman will update v86d after kernel26 has been updated, so this is not done automatically during update. The old version of v86d_klibc (<0.1.5.2) will segfault, however the new version will not segfault.
Again, adding v86d instead of v86d_klibc is a bad idea and will give you a much bigger initramfs image.
To be exact, what I've done:
pacman -S v86d
mkinitcpio -p kernel26
reboot
... v86d segfault
after this reboot
replaced add_binary "/sbin/v86d_klibc" "/sbin/v86d" with add_binary "/sbin/v86d"
mkinitcpio -p kernel26
reboot
... v86d doesn't segfault.
I thought add_binary "/sbin/v86d_klibc" "/sbin/v86d" added both v86d_klibc and v86d, while in fact it installs v86d_klibc as v86d.
When the real v86d bin is added, it also has to pull libc and some other libs which indeed cause a huge size (from 0.5M to 1.3M)
It didn't make sense to install both anyway... But that should explain my confusion in the bug report, sorry for that.
Anyway, there is apparently a problem with v86d and klibc on 686.
Package versions :
v86d 0.1.5.2-1
kernel26 2.6.26-3
klibc 1.5-6
http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-05/msg00136.html
"Looked at this a bit more..
v86d emulator seems to be hardcoding
mem_bios as 0x0a0000 - 0x10ffef
And mmaping the whole address and may be doing read write in that range
during the emulation.
But, as per e820 0x100000 onwards is usable memory and may be getting
used by kernel. So, surely there is some conflict here.
I am not sure whether it is the BIOS that is giving wrong E820 info or
is it the v86d emulator making assumption about this address wrongly.
One workaround is to make upto 0x10ffef as reserved and make kernel not
use it. But, we should really know why this problem is happening in the
first place, before going the workaround route.
Thanks,
Venki"
sudo /sbin/v86d
Segmentation fault
2) the latest v86d from extra fixes another weird segfault bug, should work better now.