All of lore.kernel.org
 help / color / mirror / Atom feed
* x86_64: 32bit emulation problems
@ 2005-02-28 20:54 Bernd Schubert
  2005-02-28 21:00 ` Bernd Schubert
  2005-03-01 20:24 ` Andi Kleen
  0 siblings, 2 replies; 36+ messages in thread
From: Bernd Schubert @ 2005-02-28 20:54 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Andi Kleen; +Cc: nfs, bernd-schubert

Hi,

I'm just looking into a very strange problem. Some of our systems have 
athlon64 CPUs. Due to our diskless nfs environment we currently still prefer 
a 32bit userspace environment, but would like to be able to use a 64-bit 
chroot environment.

Well, currently there seems to be a stat64()  NFS problem when a x86_64 kernel 
is booted and stat64() comes from a 32bit libc.

Here's just an example:

hitchcock:/home/bernd/src/tests# ./test_stat64 /mnt/test/yp
stat() works fine.


hitchcock:/home/bernd/src/tests# ./test_stat32 /mnt/test/yp
stat for /mnt/test/yp failed 


The test program looks rather simple:

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>


int main(int argc, char **argv)
{
        char *dir;
        struct stat buf;

        dir = argv[1];

        if (stat (dir, &buf) == -1)
                fprintf(stderr, "stat for %s failed \n", dir);
        else
                fprintf(stderr, "stat() works fine.\n");
        return (0);
}


Here are the strace outputs:
=====================

32bit:
------
hitchcock:/home/bernd/src/tests# strace32 ./test_stat32 /mnt/test/yp
execve("./test_stat32", ["./test_stat32", "/mnt/test/yp"], [/* 39 vars */]) = 
0
uname({sys="Linux", node="hitchcock", ...}) = 0
brk(0)                                  = 0x80ad000
brk(0x80ce000)                          = 0x80ce000
stat64("/mnt/test/yp", {st_mode=S_IFDIR|0755, st_size=2704, ...}) = 0
write(2, "stat for /mnt/test/yp failed \n", 30stat for /mnt/test/yp failed 
) = 30
exit_group(0)                           = ?

64bit:
-------
hitchcock:/home/bernd/src/tests# strace ./test_stat64 /mnt/test/yp
execve("./test_stat64", ["./test_stat64", "/mnt/test/yp"], [/* 39 vars */]) = 
0
uname({sys="Linux", node="hitchcock", ...}) = 0
brk(0)                                  = 0x572000
brk(0x593000)                           = 0x593000
stat("/mnt/test/yp", {st_mode=S_IFDIR|0755, st_size=2704, ...}) = 0
write(2, "stat() works fine.\n", 19stat() works fine.
)    = 19
_exit(0)                                = ?



Anyone having an idea whats going on? The ethereal capture also looks pretty 
normal. The kernel of this system is 2.6.9, but it also happens on another 
system with 2.6.11-rc5.
As usual we are using unfs3 for /etc and /var, but for me that looks like a 
client problem. I'm even not sure if this is limited to NFS at all.


Thanks in advance,
 Bernd

^ permalink raw reply	[flat|nested] 36+ messages in thread
* x86_64: 32bit emulation problems
@ 2005-02-28 21:08 Bernd Schubert
  2005-02-28 22:26 ` Trond Myklebust
  2005-03-01  0:47 ` Dan Stromberg
  0 siblings, 2 replies; 36+ messages in thread
From: Bernd Schubert @ 2005-02-28 21:08 UTC (permalink / raw)
  To: nfs

Sorry, I'm sending it here again, since my first mail, in which I CCed LKML 
and  Andi Kleen was refused by the listserver.


Hi,

I'm just looking into a very strange problem. Some of our systems have 
athlon64 CPUs. Due to our diskless nfs environment we currently still prefer 
a 32bit userspace environment, but would like to be able to use a 64-bit 
chroot environment.

Well, currently there seems to be a stat64()  NFS problem when a x86_64 kernel 
is booted and stat64() comes from a 32bit libc.

Here's just an example:

hitchcock:/home/bernd/src/tests# ./test_stat64 /mnt/test/yp
stat() works fine.


hitchcock:/home/bernd/src/tests# ./test_stat32 /mnt/test/yp
stat for /mnt/test/yp failed 


The test program looks rather simple:

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>


int main(int argc, char **argv)
{
        char *dir;
        struct stat buf;

        dir = argv[1];

        if (stat (dir, &buf) == -1)
                fprintf(stderr, "stat for %s failed \n", dir);
        else
                fprintf(stderr, "stat() works fine.\n");
        return (0);
}


Here are the strace outputs:
=====================

32bit:
------
hitchcock:/home/bernd/src/tests# strace32 ./test_stat32 /mnt/test/yp
execve("./test_stat32", ["./test_stat32", "/mnt/test/yp"], [/* 39 vars */]) = 
0
uname({sys="Linux", node="hitchcock", ...}) = 0
brk(0)                                  = 0x80ad000
brk(0x80ce000)                          = 0x80ce000
stat64("/mnt/test/yp", {st_mode=S_IFDIR|0755, st_size=2704, ...}) = 0
write(2, "stat for /mnt/test/yp failed \n", 30stat for /mnt/test/yp failed 
) = 30
exit_group(0)                           = ?

64bit:
-------
hitchcock:/home/bernd/src/tests# strace ./test_stat64 /mnt/test/yp
execve("./test_stat64", ["./test_stat64", "/mnt/test/yp"], [/* 39 vars */]) = 
0
uname({sys="Linux", node="hitchcock", ...}) = 0
brk(0)                                  = 0x572000
brk(0x593000)                           = 0x593000
stat("/mnt/test/yp", {st_mode=S_IFDIR|0755, st_size=2704, ...}) = 0
write(2, "stat() works fine.\n", 19stat() works fine.
)    = 19
_exit(0)                                = ?



Anyone having an idea whats going on? The ethereal capture also looks pretty 
normal. The kernel of this system is 2.6.9, but it also happens on another 
system with 2.6.11-rc5.
As usual we are using unfs3 for /etc and /var, but for me that looks like a 
client problem. I'm now also pretty sure that its not a problem for a local 
mount point (so a local disk).


Thanks in advance,
 Bernd


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2005-03-03 22:28 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-28 20:54 x86_64: 32bit emulation problems Bernd Schubert
2005-02-28 21:00 ` Bernd Schubert
2005-03-01 20:24 ` Andi Kleen
2005-03-01 21:07   ` Bernd Schubert
2005-03-01 21:07     ` Bernd Schubert
2005-03-01 21:48     ` Andi Kleen
2005-03-01 22:30       ` Bernd Schubert
2005-03-01 22:30         ` Bernd Schubert
2005-03-01 23:07         ` Andi Kleen
2005-03-01 22:10     ` Andreas Schwab
2005-03-01 22:10       ` Andreas Schwab
2005-03-01 22:19       ` Andi Kleen
2005-03-01 23:22         ` Andreas Schwab
2005-03-01 23:22           ` Andreas Schwab
2005-03-01 23:19       ` Bernd Schubert
2005-03-01 23:39         ` Andreas Schwab
2005-03-01 23:39           ` Andreas Schwab
2005-03-01 23:46         ` Andreas Schwab
2005-03-01 23:46           ` Andreas Schwab
2005-03-02  8:18           ` Andi Kleen
2005-03-02  9:13             ` Trond Myklebust
2005-03-02 11:33               ` Bernd Schubert
2005-03-02 16:53                 ` Trond Myklebust
2005-03-02 18:14                   ` Bernd Schubert
2005-03-03  9:19                   ` Andi Kleen
2005-03-03 21:16                     ` Bernd Schubert
2005-03-03 21:32                       ` Andi Kleen
2005-03-03 21:37                     ` Trond Myklebust
2005-03-03 21:46                       ` Andi Kleen
2005-03-03 22:21                         ` Trond Myklebust
2005-03-03  9:12               ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2005-02-28 21:08 Bernd Schubert
2005-02-28 22:26 ` Trond Myklebust
2005-02-28 23:14   ` Bernd Schubert
2005-02-28 23:43   ` Bernd Schubert
2005-03-01  0:47 ` Dan Stromberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.