Subject: Re: kern/32161: m68k a.out emulation broken
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-bugs
Date: 11/27/2005 22:29:02
The following reply was made to PR kern/32161; it has been noted by GNATS.

From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: Martin Husemann <martin@duskware.de>
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>,
	gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org,
	gnats-admin@NetBSD.org
Subject: Re: kern/32161: m68k a.out emulation broken
Date: Sun, 27 Nov 2005 23:26:02 +0100

 At 9:15 Uhr +0100 25.11.2005, Martin Husemann wrote:
 >Pleace ktrace the emulated binary and append results to the PR.
 
 [hauke@mara] ~ > cd /var/tmp
 [hauke@mara] /var/tmp > uname -a
 NetBSD mara 3.99.10 NetBSD 3.99.10 (TESTER) #6: Fri Nov  4 21:12:55 CET
 2005  hauke@mara:/usr/src/sys/arch/mac68k/compile/TESTER mac68k
 [hauke@mara] /var/tmp > file ls
 ls: a.out NetBSD/m68k demand paged executable
 [hauke@mara] /var/tmp > ktrace -di ./ls -la
 [hauke@mara] /var/tmp > kdump > ls-ktrace.list
 kdump: Emulation `aoutm68k' unknown
 [hauke@mara] /var/tmp >
 
 
    733 ktrace   EMUL  "netbsd"
    733 ktrace   CALL  execve(0xffffb87b,0xffffb758,0xffffb764)
    733 ktrace   NAMI  "./ls"
    733 ls       EMUL  "aoutm68k"
    733 ls       RET   execve JUSTRETURN
    733 ls       CALL  issetugid
    733 ls       RET   issetugid 0
    733 ls       CALL  ioctl(1,TIOCGETA,0xffffb714)
    733 ls       GIO   fd 1 read 44 bytes
        "\0\0\^C\0\0\0\0\a\0\0[\0 \0\^E\M-K\^D\M^?\M^?\b\^W\^U\^R\0\^C\^\\^Z\^Y\
 	\^Q\^S\^V\^O\^A\0\^T\0\0\0\M^V\0\0\0\M^V\0"
    733 ls       RET   ioctl 0, 6
    733 ls       CALL  ioctl(1,TIOCGWINSZ,0xffffb768)
    733 ls       GIO   fd 1 read 8 bytes
        "\0\^X\0P\^A\M-s\^A<"
    733 ls       RET   ioctl 0, -245/0xffffff0b
    733 ls       CALL  getuid
    733 ls       RET   getuid 100/0x64, 1
    733 ls       CALL  __sysctl(0xffffb654,2,0xffffb64c,0xffffb650,0,0)
    733 ls       RET   __sysctl 0, 2
    733 ls       CALL  readlink(0x2c4b0,0xffffb690,0x3f)
    733 ls       NAMI  "/etc/malloc.conf"
    733 ls       RET   readlink -1 errno 2 No such file or directory
    733 ls       CALL  mmap(0,0x1000,3,0x1002,0xffffffff,0,0,0)
    733 ls       RET   mmap 67350528/0x403b000, -255/0xffffff01
    733 ls       CALL  break(0x3f69c)
    733 ls       RET   break 0, -255/0xffffff01
    733 ls       CALL  break(0x3f69c)
    733 ls       RET   break 0, 2048/0x800
    733 ls       CALL  break(0x41000)
    733 ls       RET   break 0, -4096/0xfffff000
    733 ls       CALL  break(0x41000)
    733 ls       RET   break 0, 2048/0x800
    733 ls       CALL  break(0x42000)
    733 ls       RET   break 0, -4096/0xfffff000
    733 ls       CALL  break(0x42000)
    733 ls       RET   break 0, 2048/0x800
    733 ls       CALL  break(0x43000)
    733 ls       RET   break 0, -4096/0xfffff000
    733 ls       CALL  break(0x43000)
    733 ls       RET   break 0, 2048/0x800
    733 ls       CALL  break(0x44000)
    733 ls       RET   break 0, -4096/0xfffff000
    733 ls       CALL  compat_30___lstat13(0x43140,0x43144)
    733 ls       NAMI  "."
    733 ls       RET   compat_30___lstat13 0, -18824/0xffffb678
    733 ls       CALL  open(0x859c,0,0)
    733 ls       NAMI  "."
    733 ls       RET   open 3, 275012/0x43244
    733 ls       CALL  fchdir(3)
    733 ls       RET   fchdir 0, 14/0xe
    733 ls       CALL  open(0x859c,0,0)
    733 ls       NAMI  "."
    733 ls       RET   open 4, 1
    733 ls       CALL  open(0x42000,4,4)
    733 ls       NAMI  "."
    733 ls       RET   open 5, 1
    733 ls       CALL  compat_30___fstat13(5,0xffffb63c)
    733 ls       RET   compat_30___fstat13 0, 1
    733 ls       CALL  fcntl(5,2,1)
    733 ls       RET   fcntl 0, 1
    733 ls       CALL  __sysctl(0xffffb4fc,2,0x3e94c,0xffffb4f8,0,0)
    733 ls       RET   __sysctl 0, 2
    733 ls       CALL  compat_20_fstatfs(5,0xffffb53c)
    733 ls       RET   compat_20_fstatfs 0, -1/0xffffffff
    733 ls       CALL  break(0x44000)
    733 ls       RET   break 0, 2048/0x800
    733 ls       CALL  break(0x45000)
    733 ls       RET   break 0, -4096/0xfffff000
    733 ls       CALL  compat_30___fstat13(5,0xffffb634)
    733 ls       RET   compat_30___fstat13 0, 24/0x18
    733 ls       CALL  fchdir(5)
    733 ls       RET   fchdir 0, 1024/0x400
    733 ls       CALL  lseek(5,0,0,0,1,0xffffb6a0)
    733 ls       RET   lseek 0
    733 ls       CALL  compat_30_getdents(5,0x44000,0x1000)
    733 ls       GIO   fd 5 read 216 bytes
        "\0\0\0\0\0\0\M-y[\0\^P\0\^A\^D.\0\0\0\0\0\0\0\0\M-y\^Y\0\^P\0\^B\^D..\
 	\0\0\0\0\0\0\0\M-~\0\0\^X\0
 	\^Dvi.recover\0\0\0\0\0\0\0\M-y\r\0(\0\^S\^Dmac68k-3-2005-09-30\0\0\0\
 	\0\0\0\0\0\0\0\0\0\0\0\M-z\M-8\0\^X\0
 	\btester.out\0\0\0\0\0\0\0\M-~K\0\^P\0\^B\bls\0\0\0\0\0\0\0\M-~>\0\^X\
 	\0
 	\bktrace.out\0\0\0\0\0\0\0\M-~\a\0 \0\^O\binstall-sets.sh\0\0\0\0\0\0\
 	\0\0\0\^AN\M-U\0\^X\0\^F\^Drescue\0\0\0\0\0"
    733 ls       RET   compat_30_getdents 216/0xd8
    733 ls       CALL  lseek(5,0,0,0,1,0xffffb6a0)
    733 ls       RET   lseek 0, 512/0x200
    733 ls       CALL  compat_30_getdents(5,0x44000,0x1000)
    733 ls       GIO   fd 5 read 0 bytes
        ""
    733 ls       RET   compat_30_getdents 0, 512/0x200
    733 ls       CALL  lseek(5,0,0,0,0,0xffffb674)
    733 ls       RET   lseek 0
    733 ls       CALL  close(5)
    733 ls       RET   close 0, 63/0x3f
    733 ls       CALL  fchdir(3)
    733 ls       RET   fchdir 0, 1
    733 ls       CALL  fchdir(4)
    733 ls       RET   fchdir 0, 3
    733 ls       CALL  close(4)
    733 ls       RET   close 0, 3
    733 ls       CALL  open(0x42000,4,0)
    733 ls       NAMI  "."
    733 ls       RET   open 4
    733 ls       CALL  compat_30___fstat13(4,0xffffb638)
    733 ls       RET   compat_30___fstat13 0
    733 ls       CALL  fcntl(4,2,1)
    733 ls       RET   fcntl 0
    733 ls       CALL  compat_20_fstatfs(4,0xffffb538)
    733 ls       RET   compat_20_fstatfs 0, 2
    733 ls       CALL  compat_30___fstat13(4,0xffffb630)
    733 ls       RET   compat_30___fstat13 0, 24/0x18
    733 ls       CALL  fchdir(4)
    733 ls       RET   fchdir 0, 1024/0x400
    733 ls       CALL  lseek(4,0,0,0,1,0xffffb69c)
    733 ls       RET   lseek 0
    733 ls       CALL  compat_30_getdents(4,0x44000,0x1000)
    733 ls       GIO   fd 4 read 216 bytes
        "\0\0\0\0\0\0\M-y[\0\^P\0\^A\^D.\0\0\0\0\0\0\0\0\M-y\^Y\0\^P\0\^B\^D..\
 	\0\0\0\0\0\0\0\M-~\0\0\^X\0
 	\^Dvi.recover\0\0\0\0\0\0\0\M-y\r\0(\0\^S\^Dmac68k-3-2005-09-30\0\0\0\
 	\0\0\0\0\0\0\0\0\0\0\0\M-z\M-8\0\^X\0
 	\btester.out\0\0\0\0\0\0\0\M-~K\0\^P\0\^B\bls\0\0\0\0\0\0\0\M-~>\0\^X\
 	\0
 	\bktrace.out\0\0\0\0\0\0\0\M-~\a\0 \0\^O\binstall-sets.sh\0\0\0\0\0\0\
 	\0\0\0\^AN\M-U\0\^X\0\^F\^Drescue\0\0\0\0\0"
    733 ls       RET   compat_30_getdents 216/0xd8
    733 ls       CALL  lseek(4,0,0,0,1,0xffffb69c)
    733 ls       RET   lseek 0, 512/0x200
    733 ls       CALL  compat_30_getdents(4,0x44000,0x1000)
    733 ls       GIO   fd 4 read 0 bytes
        ""
    733 ls       RET   compat_30_getdents 0, 512/0x200
    733 ls       CALL  lseek(4,0,0,0,0,0xffffb670)
    733 ls       RET   lseek 0
    733 ls       CALL  close(4)
    733 ls       RET   close 0, 63/0x3f
    733 ls       CALL  fchdir(3)
    733 ls       RET   fchdir 0, 1
    733 ls       CALL  exit(0)
 
 
 --
 "It's never straight up and down"     (DEVO)