Bug 279 - [Qemux86-64] v86d segfault in libc-2.10.1.so
Summary: [Qemux86-64] v86d segfault in libc-2.10.1.so
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: Medium normal
Target Milestone: 0.9 M4
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-09-06 19:51 UTC by Jiajun Xu
Modified: 2010-12-21 06:07 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiajun Xu 2010-09-06 19:51:45 UTC
Testing Env:    
Host: Ubuntu 10.04.1 LTS
Kernel: Linux vt-dp4 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Linux
Poky gitinfo(used to build qemu-native):
01fa22f80acae33b5da63d50ebe4dcaf0ec876a9 (ssh://git@git.pokylinux.org/poky-contrib.git:remotes/origin/builds/milestone)
All images file from http://autobuilder.pokylinux.org/milestone/20100905-1/.

Booting up qemux86-64 images, there will be v86d segfault error in dmesg. 

###
root@qemux86-64:~# dmesg | grep -i error
v86d[44]: segfault at 7fff39b7e000 ip 00007fd448283cdb sp 00007fff39b794c8 error 4 in libc-2.10.1.so[7fd448207000+151000]
v86d[205]: segfault at 7fff23ffa000 ip 00007fb5063b8cdb sp 00007fff23ff53a8 error 4 in libc-2.10.1.so[7fb50633c000+151000]
v86d[601]: segfault at 7fff633bc000 ip 00007fc9d4ce9cdb sp 00007fff633b7a18 error 4 in libc-2.10.1.so[7fc9d4c6d000+151000]
v86d[608]: segfault at 7fff4ee2e000 ip 00007f44fdd0acdb sp 00007fff4ee287a8 error 4 in libc-2.10.1.so[7f44fdc8e000+151000]
v86d[615]: segfault at 7fffcab23000 ip 00007ff0844edcdb sp 00007fffcab1de38 error 4 in libc-2.10.1.so[7ff084471000+151000]
v86d[666]: segfault at 7fffa546f000 ip 00007f29bd77acdb sp 00007fffa5469008 error 4 in libc-2.10.1.so[7f29bd6fe000+151000]
v86d[678]: segfault at 7fff8cf90000 ip 00007fd870508cdb sp 00007fff8cf8aa18 error 4 in libc-2.10.1.so[7fd87048c000+151000]
###

Reproduce Steps:
1. Download qemux86-64 image
2. start the image and check error with command dmesg
Comment 1 Edwin Zhai 2010-09-20 02:38:23 UTC
The segfault comes from a memcpy, where the sending buffer of uvesafb is copied to receiving buffer of v86d. The root cause of the segfault is that these 2 buffers has different size: uvesafb is 65536, but v86d is 16384.

The different size is because that we use linux-wrs kernels(decides the uvesafb buffer size), and linux-libc-headers(2.6.33, decides the v86d's). Although this dismatch, the heads should be same as they are seldom changed. But recently the buffer size is enlarged from 16384 to 65536 on wrs kernel (701c502be984c38e242beca0e8e69903d9ead6b4), which cause this problem.
Comment 2 Joshua Lock - Disabled 2010-09-30 08:10:00 UTC
Bruce is working on changes to the linux-libc-headers such that we should have the correct connector size in the headers for qemux86-64 following his next patch queue submission.
Comment 3 Edwin Zhai 2010-09-30 10:53:47 UTC
(In reply to comment #2)
> Bruce is working on changes to the linux-libc-headers such that we should have
> the correct connector size in the headers for qemux86-64 following his next
> patch queue submission.

Josh,
Do you mean changing the linux-libc-headers-wrs? I have sent out pull request of syncing the linux-libc-headers with wrs kernels, just enlarge the size as same as wrs kernels.

Thanks,
edwin
Comment 4 Bruce Ashfield 2010-09-30 11:17:01 UTC
See my comments on the mailing list. Once I'm done refactoring
the kernel recipe, the headers recipe will have its checkout
fixed and that patch will always be present. So we shouldn't need
to patch the kernel headers at all.
Comment 6 Jiajun Xu 2010-10-08 01:15:44 UTC
Checked with 20101007 build, the bug is fixed.