[Fwd: [gfarm-discuss:03663] Re: 32bit application segmentation fault on 64bit]
Somsak Sriprayoonsakul <[email protected]> Thu, 24 Aug 2006 12:19:28 +0700
| Newsgroups | gmane.linux.redhat.amd64 |
|---|---|
| Organization | Thai National Grid Center |
| Message-ID | <[email protected]> |
--===============0021963270==
Content-Type: text/html; charset=TIS-620
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content=3D"text/html;charset=3DTIS-620" http-equiv=3D"Content-Typ=
e">
</head>
<body bgcolor=3D"#ffffff" text=3D"#000000">
<div class=3D"moz-text-html" lang=3D"x-western">
<div class=3D"moz-text-html" lang=3D"x-western">Hello,<br>
<br>
=A0=A0=A0 I'm trying to LD_PRELOAD an user-level file system library for
32bit application on x86_64 machine (CentOS 4.3/RHEL4). Somehow the
application segfault everytime. I've install both 32bit and 64bit
libraries, and the test application is just a simple "ls" command (the
real one will be an proprietary animation rendering program so I can't
recompile it to 64bit). Below and attach file are all logs.<br>
<br>
=A0=A0=A0 My question is, is it possible to do this on x86_64? LD_PRELOAD
either 32bit or 64bit application, while providing all necessary
library for the applicaion. The answer from google seems to be yes, but
what've I done wrong?<br>
<br>
-------- Original Message --------
<table class=3D"moz-email-headers-table" border=3D"0" cellpadding=3D"0"
cellspacing=3D"0">
<tbody>
<tr>
<th align=3D"right" nowrap=3D"nowrap" valign=3D"baseline">Subject: =
</th>
<td>[gfarm-discuss:03663] Re: 32bit application segmentation
fault on 64bit</td>
</tr>
<tr>
<th align=3D"right" nowrap=3D"nowrap" valign=3D"baseline">Date: </t=
h>
<td>Fri, 18 Aug 2006 16:33:44 +0700</td>
</tr>
<tr>
<th align=3D"right" nowrap=3D"nowrap" valign=3D"baseline">From: </t=
h>
<td>Somsak Sriprayoonsakul <a class=3D"moz-txt-link-rfc2396E"
href=3D"mailto:[email protected]"><[email protected]>=
;</a></td>
</tr>
<tr>
<th align=3D"right" nowrap=3D"nowrap" valign=3D"baseline">Reply-To:=
</th>
<td><a class=3D"moz-txt-link-abbreviated"
href=3D"mailto:[email protected]">[email protected]</a></t=
d>
</tr>
<tr>
<th align=3D"right" nowrap=3D"nowrap" valign=3D"baseline">Organizat=
ion:
</th>
<td>Thai National Grid Center</td>
</tr>
<tr>
<th align=3D"right" nowrap=3D"nowrap" valign=3D"baseline">To: </th>
<td><a class=3D"moz-txt-link-abbreviated"
href=3D"mailto:[email protected]">[email protected]</a></t=
d>
</tr>
<tr>
<th align=3D"right" nowrap=3D"nowrap" valign=3D"baseline">Reference=
s: </th>
<td><a class=3D"moz-txt-link-rfc2396E"
href=3D"mailto:[email protected]">&l=
t;[email protected]></a>
<a class=3D"moz-txt-link-rfc2396E"
href=3D"mailto:[email protected]"><44E2A2A1.3030804@tha=
igrid.or.th></a>
<a class=3D"moz-txt-link-rfc2396E"
href=3D"mailto:[email protected]"><17635.26=
[email protected]></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>The problem is less serious now since we successfully using gfarm-fu=
se=20
with the application. Anyways I've done strace log and here it is
1. Normal case
[somsak_sr@anatta ~]$ LD_PRELOAD=3D"/usr/lib64/gfarm/libc-not-hidden.so"=20
/bin/ls
bash clusterscores-1.0b0 globus-4.0.2-1.src.rpm =20
magi src
benchmark clusterscores-1.0b0.tar.gz globus_povray_stub =20
rocksmountdirty.sh tmp
bin clusterscores_result log =20
rpm usr
clusterscores gfarm-1.3.1-0.src.rpm ls =20
software work
[somsak_sr@anatta ~]$ LD_PRELOAD=3D"/usr/lib/gfarm/libc-not-hidden.so"=20
$PWD/ls =20
Segmentation fault
[somsak_sr@anatta ~]$ file $PWD/ls
/home/somsak_sr/ls: ELF 32-bit LSB executable, Intel 80386, version 1=20
(SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), strip=
ped
[somsak_sr@anatta ~]$
2. Invoke through 32bit bash
[somsak_sr@anatta ~]$ file ./bash
./bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for=20
GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
[somsak_sr@anatta ~]$ file ./ls
./ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for=20
GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
[somsak_sr@anatta ~]$ export LD_PRELOAD=3D""
[somsak_sr@anatta ~]$ /bin/bash -c=20
"LD_PRELOAD=3D'/usr/lib64/gfarm/libc-not-hidden.so' /bin/ls" =20
bash clusterscores-1.0b0 globus-4.0.2-1.src.rpm =20
magi src
benchmark clusterscores-1.0b0.tar.gz globus_povray_stub =20
rocksmountdirty.sh tmp
bin clusterscores_result log =20
rpm usr
clusterscores gfarm-1.3.1-0.src.rpm ls =20
software work
[somsak_sr@anatta ~]$ /bin/bash -c=20
"LD_PRELOAD=3D'/usr/lib/gfarm/libc-not-hidden.so' $PWD/ls" =20
Segmentation fault
[somsak_sr@anatta ~]$
3. strace log - strace log is attached wit this e-mail (it's too long).=20
Note that, I'm using 32bit strace.
You'll see that I only set single file, libc-not-hidden, no gfarm-libs,=20
and it still segfault. I think this is not problem regarding gfarm anymor=
e.
SODA Noriyuki wrote:
>>>>>> On Wed, 16 Aug 2006 11:44:17 +0700,
>>>>>> =20
> Somsak Sriprayoonsakul <a class=3D"moz-txt-link-rfc2396E"
href=3D"mailto:[email protected]"><[email protected]>=
;</a> said:
>
> =20
>>> Maybe it's worthwhile to check out Gfarm-Fuse system. In our=
experience,
>>> the Gfarm-Fuse is much more stable in supporting preexisting
>>> applications.
>>> =20
>
> =20
>> Yes. Actually we already tested that and gfarm-fuse work great i=
n term=20
>> of performance. Somehow gfarm-fuse only accept single user per m=
ounted=20
>> file system, also it does not support lseek system call, which i=
s=20
>> required by some application. That's why we're trying to use use=
r-level=20
>> instead.
>> =20
>
> Hmm? What is the problem about lseek?
> As far as I know, lseek just does work with GfarmFS-FUSE.
> Thus, if you could allow your users to mount gfarm filesystem via
> GfarmFS-FUSE, certainly it could be an option as Wilfred said.
>
> If your problem with lseek was a data coherency problem, please try
> "-unbuf" option of GfarmFS-FUSE.
> =20
--=20
-------------------------------------------------------------------------=
----------
Somsak Sriprayoonsakul
Thai National Grid Center
Software Industry Promotion Agency
Ministry of ICT, Thailand
<a class=3D"moz-txt-link-abbreviated"
href=3D"mailto:[email protected]">[email protected]</a>
-------------------------------------------------------------------------=
----------</pre>
</div>
</div>
</body>
</html>
--===============0021963270==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline