Bug 1251 - Pseudo segfaults on CentOS 5.5
Summary: Pseudo segfaults on CentOS 5.5
Status: VERIFIED FIXED
Alias: None
Product: Pseudo
Classification: Yocto Project Subprojects
Component: pseudo (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High normal
Target Milestone: 1.1
Assignee: Mark Hatle
QA Contact:
URL:
Whiteboard:
: 1177 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-15 16:59 UTC by Joshua Lock - Disabled
Modified: 2011-07-25 08:27 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock - Disabled 2011-07-15 16:59:32 UTC
A user on #poky traced it to the following commit:

http://git.yoctoproject.org/cgit/cgit.cgi/pseudo/commit/?id=c2f7c5ad8ef0f9c94a2a8382c109c8c6e16c8b18

We need to gather some debug info:
* Check the glibc on the CentOS machine and find the symbol and versions for all of the realpath functions that might help figure out whats going wrong. objdump should be useful (-x is likely good enough)
Comment 1 Joshua Lock - Disabled 2011-07-19 10:05:16 UTC
objdump -T does the trick nicely, purely for example my F15 box lists:

joshual@scimitar:/lib
$ objdump -T libc.so.6 | grep realpath
416c3f00 g    DF .text	00000041 (GLIBC_2.0)  realpath
415e60e0 g    DF .text	00000478  GLIBC_2.3   realpath
4169a330 g    DF .text	00000037  GLIBC_2.4   __realpath_ch
Comment 2 Matthew McClintock 2011-07-19 10:45:47 UTC
From CentOS 5.6

[mattsm@busy poky (master)]$ cat /etc/issue
CentOS release 5.6 (Final)
Kernel \r on an \m

[mattsm@busy poky (master)]$ objdump -T /lib/libc.so.6  | grep realpath
009cca90 g    DF .text	0000003f (GLIBC_2.0)  realpath
008f75c0 g    DF .text	000004c1  GLIBC_2.3   realpath
009a8030 g    DF .text	00000038  GLIBC_2.4   __realpath_chk
Comment 3 Matthew McClintock 2011-07-19 10:53:44 UTC
And not /lib64/libc.so.6

[mattsm@busy poky (master)]$ objdump -T /lib64/libc.so.6  | grep realpath
0000003e08d09bf0 g    DF .text	000000000000001b (GLIBC_2.2.5) realpath
0000003e08c3c8e0 g    DF .text	00000000000004ab  GLIBC_2.3   realpath
0000003e08ce8670 g    DF .text	000000000000001b  GLIBC_2.4   __realpath_chk
Comment 4 Mark Hatle 2011-07-19 11:55:47 UTC
Backtrace from IRC:


program received signal SIGSEGV, Segmentation fault.
0x00007fffffffe260 in ?? ()
(gdb) bt
#0  0x00007fffffffe260 in ?? ()
#1  0x00002aaaaaac78a7 in open (path=0x48c08e "/dev/tty", flags=2050) at pseudo_wrapfuncs.c:7490
#2  0x0000000000423c15 in check_dev_tty ()
#3  0x000000000041a0ed in main ()
(gdb)
Comment 5 Mark Hatle 2011-07-19 12:05:52 UTC
Possible fix:

in the realpath_fix.patch...  line 68:

 int (*f)(void);

change that to:

int (*f)(void) = (int (*)(void)) NULL;
Comment 6 Matthew McClintock 2011-07-19 12:13:59 UTC
*** Bug 1177 has been marked as a duplicate of this bug. ***
Comment 7 Matthew McClintock 2011-07-19 12:26:29 UTC
Confirm fixed on my CentOS 5.5 box
Comment 8 Seebs 2011-07-19 14:09:58 UTC
Fixed in pseudo 1.1.2, which is now available on the github page.

I was surprised that gcc didn't warn about that.
Comment 9 Joshua Lock - Disabled 2011-07-20 08:41:58 UTC
A patch from upstream has been merged into oe-core:
http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=5fdc8ab37e11781112e74f93f6c420ecb303fa88
Comment 10 Joshua Lock - Disabled 2011-07-25 08:27:11 UTC
Verify fixed