Bug 134519 - 32bit apprication doesn't run on IA32EL.
32bit apprication doesn't run on IA32EL.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
4.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
: 134616 (view as bug list)
Depends On: 134751
Blocks: 135876
  Show dependency treegraph
 
Reported: 2004-10-04 07:48 EDT by L3support
Modified: 2007-11-30 17:07 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-25 18:31:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description L3support 2004-10-04 07:48:19 EDT
Description of problem:
We install ia32el-1.1-2 on RHEL4 beta1 for Itanium and execute a 32bit
application on IA32EL but it ends abnormally.

Version-Release number of selected component (if applicable):
ia32el-1.1-2

How reproducible:
always

Steps to Reproduce:
1. # rpm -ivh ia32el-1.1-2.ia64.rpm
2. # /etc/init.d/ia32el start
3. # strace -f /usr/lib/ia32el/is_ia32el
  
Actual results:
# strace -f /usr/lib/ia32el/is_ia32el
execve("/usr/lib/ia32el/is_ia32el", ["/usr/lib/ia32el/is_ia32el"], [/*
23 vars */]) = 0
futex(0x1, FUTEX_WAKE, 1)               = -1 EINVAL (Invalid argument)
brk(0)                                  = 0x6000000000020000
.
.
.
readlink("/proc/self/fd/3", "/usr/lib/ia32el/is_ia32el", 4096) = 25
pread(3, "/lib/ld-linux.so.2\0", 19, 276) = 19
open("/lib/ld-linux.so.2", O_RDONLY)    = 4
pread(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0002\0\1\0\0\0\220-\0"...,
52, 0) = 52
close(4)                                = 0
close(3)                                = 0
exit(-8)                                = ?

Expected results:
32bit application run on IA32EL properly.

Additional info:
Comment 1 Jay Turner 2004-10-04 10:55:47 EDT
Can you confirm which version of ia32el you're using?  1.1-2 (least
the one we have) conflicts with the glibc which is in Beta1, so not
sure how you're getting it installed.  Either way, I'm able to
reproduce your failures with 1.1-3.
Comment 2 Yoav Zach 2004-10-05 03:48:36 EDT
the problem is with the dynamic loader - you can see by the results
of pread that the system opens the ia64 library instead of the ia32 
library, as it is supposed to do for processes with personality 
PER_LINUX32. the bug report omits this line in the trace, but 
libia32x.so changes the personality of the process to PER_LINUX32 
before opening ld-linux.so.2.
something in the system does not work as expected - the kernel should 
be looking for the 32 bit version of ld-linux.so.2 in the emul 
directory before falling back to the 64 bit version. apparently this 
is not done, and it should be fixed.

thanks,
yoav. 

Comment 3 Jakub Jelinek 2004-10-05 05:01:24 EDT
*** Bug 134616 has been marked as a duplicate of this bug. ***
Comment 4 Jakub Jelinek 2004-10-05 05:34:41 EDT
There seem to be multiple problems.
The first is that for some reason there is
/lib/ld-linux.so.2 -> ld-2.3.3.so
symlink, not owned by any package.
I don't think it is glibc that puts it there, also if I remove it and
rerun ldconfig it is not recreated.
So the question is what package created it there.

When I remove this bogus symlink:
ls -l /lib/ld-linux.so.2 /emul/ia32-linux/lib/ld-linux.so.2
ls: /lib/ld-linux.so.2: No such file or directory
lrwxrwxrwx  1 root root 11 Oct  1 17:18 /emul/ia32-linux/lib/ld-linux.so.2 -> ld-2.3.3.so
things don't work either:

personality(PER_LINUX32)                = 0
stat("/tmp/echo", {st_mode=S_IFREG|0755, st_size=12252, ...}) = 0
open("/tmp/echo", O_RDONLY)             = 3
pread(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\240\211"..., 52, 0) = 52
pread(3, "\6\0\0\0004\0\0\0004\200\4\0104\200\4\10\340\0\0\0\340"..., 224, 52) = 224
readlink("/proc/self/fd/3", "/tmp/echo", 4096) = 9
pread(3, "/lib/ld-linux.so.2\0", 19, 276) = 19
open("/lib/ld-linux.so.2", O_RDONLY)    = -1 ENOENT (No such file or directory)

That looks like the /emul/ia32-linux/ ugly hack in the kernel doesn't
work.
Comment 5 Arjan van de Ven 2004-10-05 05:36:56 EDT
ia32el not the kernel is supposed to take care of all of this.
Comment 6 Jakub Jelinek 2004-10-05 05:56:49 EDT
BTW, kernel has:
# CONFIG_IA32_SUPPORT is not set
# CONFIG_COMPAT is not set
which means /emul/ia32-linux hack is not present in the kernel
and ia32el is always needed to run 32-bit apps.

So, following things need to change:
1) ia32el needs to be changed so that it handles the /emul/ia32-linux
   hack itself in its open/stat/lstat/whatever else wrappers
2) we need to figure out where the bogus /lib/ld-linux.so.2 symlink came from
3) we need to figure out how to install 32-bit rpms on IA-64 at all,
   given that ia32el is on LACD, not in the base OS, and all .i386.rpm's
   require ia32el to be even installed (and ia32el requires glibc-2*.i686.rpm)
Comment 8 Tim Burke 2004-10-22 21:29:24 EDT
In order to enable -EL, there is a new upstream syscall added in
2.6.10 which got accepted after we took the RHEL4 B2 snapshot of
2.6.9.  We need to backport that change from 2.6.10 after we open up
the RHEL4 RC baselevel.
Comment 9 Tim Burke 2004-10-22 21:31:51 EDT
Ah, the syscall from above comment is represented in bug #134751.
Comment 11 Jakub Jelinek 2004-11-04 01:45:57 EST
Well, I wouldn't talk about kernel bug here but kernel enhancement request instead.
Certainly, setaltroot syscall got removed again from upstream kernel and I
haven't seen setaltroot patches without the security hole in it so far.

So, for the time being ia32el as is (i.e. with userland /emul/ia32-linux
handling) is all we have.
Comment 12 Jay Turner 2004-11-11 08:31:21 EST
This is now working correctly with -9 ia32el, pending that the
/lib/ld-linux.so.2 -> /emul/ia32-linux/lib/ld-linux.so.2 symlink is present
(which is the topic of bug 133822)  I'm closing out this bug for now.
Comment 13 Vaibhav Khanduja 2005-07-21 08:53:26 EDT
As it has been mentioned here that 

"BTW, kernel has:
# CONFIG_IA32_SUPPORT is not set
# CONFIG_COMPAT is not set
which means /emul/ia32-linux hack is not present in the kernel
and ia32el is always needed to run 32-bit apps."

so we would be able to run our 32 bit apps without ia32el service. I have a 
problem with this. My 32 application makes use of dce rpc communication, which 
is based on freedce http://sourceforge.net/projects/freedce/ what I see here 
when I run my 32 application with this service on the dce/rpc communication 
fails. 
We have been shipping our 32 bit application on ia64 without this service on 
till RHEL 3.0 and no problem is seen till yet.
I would like to know if Redhat has released any kernel patch which would make 
my 32bit application run without ia32el service. Please let me know as this is 
very urgent.
I know this bug has been closed but I still request you to get back to me on my 
issue. 
Comment 14 Arjan van de Ven 2005-07-21 08:58:07 EDT
you need ia32el service period. The in hardware emulation is both slow and
optional to the cpu (and there have been public statements that it is going
away/has gone away in latest cpus).

The OS comes with ia32el included, both in rhel3 and rhel4 however.

So we have not and will not release a patch that runs 32 bit sw without ia32el 
Comment 15 Yoav Zach 2005-07-24 05:08:08 EDT
Can you please open a bugzilla for the problem you have with IA32EL and include 
a test case to demonstrate it ?
Thanks,
Yoav.
Comment 16 Ulrich Drepper 2005-07-25 18:31:38 EDT
I think the bug is reopened due to the new comment.  Closing it again.

Note You need to log in before you can comment on or make changes to this bug.