Subject: Re: "unable to open current directory: bad address"
To: Amitai Schlair <schmonz@schmonz.com>
From: rudolf <netbsd@eq.cz>
List: netbsd-users
Date: 06/11/2005 19:17:52
Amitai Schlair wrote:
> rudolf wrote:
> 
> 
>>./install
>>install: fatal: unable to open current directory: bad address
> 
> 
> Can you edit the Makefile to run the installer under ktrace, then
> post the kdump output?
 > How did you install and/or upgrade these two systems?
 > Does anyone else recognize the "bad address" error message?
 >
 > - Amitai

Hi,

I found out that the problem is only with the amd64 machine. I don't 
know how I was testing the i386 before, today it was ok. Dumb from me, 
sorry.

# diff -u Makefile~ Makefile
--- Makefile~   2005-06-11 18:28:57.000000000 +0200
+++ Makefile    2005-06-11 18:28:52.000000000 +0200
@@ -1744,7 +1744,7 @@

  setup: \
  it man
-       ./install
+       ktruss -o ktruss.out ./install

  sgetopt.o: \
  compile sgetopt.c substdio.h subfd.h substdio.h sgetopt.h subgetopt.h \
# make setup

[...]

ktruss -o ktruss.out ./install
install: fatal: unable to open current directory: bad address
*** Error code 111

Stop.
make: stopped in /usr/local/src/test/netqmail-1.05/TMP/qmail-1.03
# kdump ktruss.out
   3198 ktruss   EMUL  "netbsd"
   3198 ktruss   CALL  execve(0x7f7ffffff815,0x7f7ffffff670,0x7f7ffffff680)
   3198 ktruss   NAMI  "./install"
   3198 ktruss   NAMI  "/usr/libexec/ld.elf_so"
   3198 install  EMUL  "netbsd"
   3198 install  RET   execve JUSTRETURN
   3198 install  CALL  mmap(0,0x8000,3,0x1002,0xffffffff,0,0)
   3198 install  RET   mmap 1079009280/0x40506000
   3198 install  CALL  open(0x406099f4,0,0x406099f4)
   3198 install  NAMI  "/etc/ld.so.conf"
   3198 install  RET   open -1 errno 2 No such file or directory
   3198 install  CALL  open(0x405070c0,0,0x40508000)
   3198 install  NAMI  "/usr/lib/libc.so.12"
   3198 install  RET   open 3
   3198 install  CALL  __fstat13(3,0x7f7ffffff208)
   3198 install  RET   __fstat13 0
   3198 install  CALL  mmap(0,0x1000,1,1,3,0x7f7f00000000,0)
   3198 install  RET   mmap 1079042048/0x4050e000
   3198 install  CALL  munmap(0x4050e000,0x1000)
   3198 install  RET   munmap 0
   3198 install  CALL  mmap(0,0x1d1000,5,0x14000002,3,0x7f7f00000000,0)
   3198 install  RET   mmap 1082130432/0x40800000
   3198 install  CALL 
mmap(0x409a9000,0x19000,3,0x12,3,0x7f7f00000000,0xa9000)
   3198 install  RET   mmap 1083871232/0x409a9000
   3198 install  CALL 
mmap(0x409c2000,0xf000,3,0x1012,0xffffffff,0x7f7f00000000,0)
   3198 install  RET   mmap 1083973632/0x409c2000
   3198 install  CALL  mprotect(0x408a9000,0x100000,0)
   3198 install  RET   mprotect 0
   3198 install  CALL  close(3)
   3198 install  RET   close 0
   3198 install  CALL  mprotect(0x40800000,0xa9000,7)
   3198 install  RET   mprotect 0
   3198 install  CALL  mprotect(0x40800000,0xa9000,5)
   3198 install  RET   mprotect 0
   3198 install  CALL  open(5,0x404e8c,4)
   3198 install  RET   open -1 errno 14 Bad address
   3198 install  CALL  write(2,0x50ac40,0x3e)
   3198 install  GIO   fd 2 wrote 62 bytes
        "install: fatal: unable to open current directory: bad address
        "
   3198 install  RET   write 62/0x3e
   3198 install  CALL  exit(0x6f)
#

It is a NetBSD 2.0 installation (from cd) with updates to 2.0_STABLE 
with the help of 'build.sh' script.

r.