Subject: segmentation fault during mount_mfs
To: None <current-users@NetBSD.org>
From: Klaus Heinz <k.heinz.mai.vier@onlinehome.de>
List: current-users
Date: 05/25/2004 19:32:31
Hi

on a fresh NetBSD/amiga 2.0_BETA from 2004-05-21, running the GENERIC kernel:

  # mount -t mfs -o rw,-s=64633k swap /tmp
  [ some seconds delay, disk activity ]
  mount: /tmp: Segmentation fault


  # mount -t mfs -o rw,-s=64632k swap /tmp
  [ returns almost instantly ]
  #

/etc/dmesg.boot:

  total memory = 120 MB
  avail memory = 114 MB
  memory segment 0 at 08000000 size 06800000
  memory segment 1 at 07000000 size 01000000
  memory segment 2 at 00000000 size 00200000

Size of swap partition:
  # swapctl -l
  Device      1K-blocks     Used    Avail Capacity  Priority
  /dev/sd1b      103532        0   103532     0%    0

Can anyone tell me why the mmap shows ENOMEM? Is there a system limit I run
into?

   361 mount    emul(netbsd)
   361 mount    fork                               = 0
   361 mount_mfs emul(netbsd)
   361 mount_mfs execve("/sbin/mount_mfs", 0xe000, 0xdfff850) JUSTRETURN
   364 mount    __vfork14()                        = 361
   361 mount_mfs mmap(0, 0x8000, 0x3, 0x1002, 0xffffffff, 0, 0, 0) = 0x801c000
   361 mount_mfs open("/etc/ld.so.conf", 0, 0)     Err#2 ENOENT
   361 mount_mfs open("/lib/libutil.so.7", 0, 0x29fe) = 4, -1
   361 mount_mfs __fstat13(0x4, 0xdfff428)         = 0, -1
   361 mount_mfs mmap(0, 0x2000, 0x1, 0x1, 0x4, 0, 0, 0) = 0x8024000
   361 mount_mfs munmap(0x8024000, 0x2000)         = 0, 42624
   361 mount_mfs mmap(0, 0xc000, 0x5, 0x2, 0x4, 0, 0, 0) = 0x8024000
   361 mount_mfs mmap(0x802e000, 0x2000, 0x3, 0x12, 0x4, 0, 0, 0x8000)
   = 0x802e000
   361 mount_mfs mmap(0x8030000, 0, 0x3, 0x1012, 0xffffffff, 0, 0, 0)
   = 0x8030000
   361 mount_mfs close(0x4)                        = 0, 41240
   361 mount_mfs open("/lib/libc.so.12", 0, 0x2b63) = 4, -1
   361 mount_mfs __fstat13(0x4, 0xdfff428)         = 0, -1
   361 mount_mfs mmap(0, 0x2000, 0x1, 0x1, 0x4, 0, 0, 0) = 0x8030000
   361 mount_mfs munmap(0x8030000, 0x2000)         = 0, 631036
   361 mount_mfs mmap(0, 0xa8000, 0x5, 0x2, 0x4, 0, 0, 0) = 0x8030000
   361 mount_mfs mmap(0x80c2000, 0xa000, 0x3, 0x12, 0x4, 0, 0, 0x90000)
   = 0x80c2000
   361 mount_mfs mmap(0x80cc000, 0xc000, 0x3, 0x1012, 0xffffffff, 0, 0, 0)
   = 0x80cc000
   361 mount_mfs close(0x4)                        = 0, 620840
   361 mount_mfs __sysctl(0xdfff2f4, 0x2, 0xdfff2d4, 0xdfff2d8, 0, 0) = 0
   361 mount_mfs readlink("/etc/malloc.conf", 0xdfff340, 0x3f) Err#2 ENOENT
   361 mount_mfs mmap(0, 0x2000, 0x3, 0x1002, 0xffffffff, 0, 0, 0) = 0x80d8000
   361 mount_mfs break(0x2ffa0)                    = 0, 135102464
   361 mount_mfs break(0x31fa0)                    = 0, 13
   361 mount_mfs break(0x32000)                    = 0, 96
   361 mount_mfs break(0x34000)                    = 0, 13
   361 mount_mfs break(0x36000)                    = 0, 13
   361 mount_mfs gettimeofday(0xdfff3c4, 0)        = 0, 8
   361 mount_mfs break(0x36000)                    = 0, 8
   361 mount_mfs getrlimit(0x2, 0xdffeb24)         = 0, 8
   361 mount_mfs setrlimit(0x2, 0xdffeb24)         = 0, 8
   361 mount_mfs __sysctl(0xdffeb1c, 0x2, 0x80d67fc, 0xdffeb18, 0, 0) = 0
   361 mount_mfs mmap(0, 0x3f2a000, 0x3, 0x1002, 0xffffffff, 0, 0, 0)
   Err#12 ENOMEM
   361 mount_mfs mmap(0, 0x800, 0x3, 0x1002, 0xffffffff, 0, 0, 0) = 0x80da000
   361 mount_mfs gettimeofday(0xdffea8c, 0)        = 0, 135088260
   361 mount_mfs open("/dev/urandom", 0, 0xdffea8c) = 4, 135088260
   361 mount_mfs read(0x4, 0xdffea94, 0x78)        = 120, 135088260
   361 mount_mfs close(0x4)                        = 0, 135088260
   361 mount_mfs mmap(0, 0x8000, 0x3, 0x1002, 0xffffffff, 0, 0, 0) = 0x80dc000
   361 mount_mfs SIGSEGV SIG_DFL
   361 mount_mfs stop kernel
   361 mount_mfs resume kernel
   361 mount_mfs stop kernel
   361 mount_mfs resume kernel
   364 mount    wait4(0x169, 0xdffe670, 0, 0)      = 361, 15


ciao
     Klaus