Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2007 15:50:17 -0500
From:      Miles Nordin <carton@Ivy.NET>
To:        freebsd-sparc64@freebsd.org
Subject:   trouble building emacs over NFS
Message-ID:  <oqve844kmu.fsf@castrovalva.Ivy.NET>

next in thread | raw e-mail | index | archive | help
--pgp-sign-Multipart_Wed_Nov_14_15:50:05_2007-1
Content-Type: text/plain; charset=US-ASCII

I'm trying to build emacs 22.1 from ports, and find that temacs has
trouble writing out emacs.  

The build is stuck dumping out emacs:
-----8<-----
# tail /usr/ports/mk.out
((56857 . 4779) (11613 . 0) (620 . 31) 77936 166440 (68 . 8) (18 . 12) (5578 . 1459))
Loading emacs-lisp/float-sup...
((56888 . 4748) (11617 . 0) (620 . 31) 78076 166440 (69 . 9) (18 . 12) (5581 . 1456))
Loading vc-hooks...
Loading ediff-hook...
Loading tooltip...
((58191 . 3445) (11759 . 0) (621 . 30) 79256 166491 (71 . 7) (18 . 12) (5651 . 1386))
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under names emacs and emacs-22.1.1
-----8<-----

temacs is runnable:

67855 root        1 132    0 97016K 29504K RUN    408:27 98.68% temacs

temacs is trying repeatedly to write the file 'emacs':

ktrace -p 67855
-----8<-----
# kdump
[...]
 67855 temacs   CALL  open(0xb6c668,0,0)
 67855 temacs   NAMI  "/usr/ports/editors/emacs/work/emacs-22.1/src/temacs"
 67855 temacs   RET   open 6
 67855 temacs   CALL  fcntl(0x6,0x3,0)
 67855 temacs   RET   fcntl 0
 67855 temacs   CALL  fcntl(0x6,0x4,0x4)
 67855 temacs   RET   fcntl 0
 67855 temacs   CALL  fstat(0x6,0x7fdffffd460)
 67855 temacs   RET   fstat 0
 67855 temacs   CALL  mmap(0,0x3b8d77,0x3,0x1002,0xffffffffffffffff,0,0)
 67855 temacs   RET   mmap 1153138688/0x44bb8000
 67855 temacs   CALL  read(0x6,0x44bb8000,0x3b8d77)
 67855 temacs   GIO   fd 6 read 8192 bytes
       0x0000 7f45 4c46 0202 0109 0000 0000 0000 0000  |.ELF............|
       0x0010 0002 002b 0000 0001 0000 0000 0010 b8e0  |...+............|
[...]
 67855 temacs   RET   read 3902839/0x3b8d77
 67855 temacs   CALL  break(0xba4000)
 67855 temacs   RET   break 0
 67855 temacs   CALL  open(0xb6c628,0x202,0x1b6)
 67855 temacs   NAMI  "/usr/ports/editors/emacs/work/emacs-22.1/src/emacs"
 67855 temacs   RET   open 7
 67855 temacs   CALL  fcntl(0x7,0x3,0)
 67855 temacs   RET   fcntl 2
 67855 temacs   CALL  fcntl(0x7,0x4,0x6)
 67855 temacs   RET   fcntl 0
 67855 temacs   CALL  ftruncate(0x7,0,0x9ec487)
 67855 temacs   RET   ftruncate 0
 67855 temacs   CALL  mmap(0,0x9ec487,0x3,0x1002,0xffffffffffffffff,0,0)
 67855 temacs   RET   mmap 1157046272/0x44f72000
 67855 temacs   CALL  write(0x7,0x44f72000,0x9ec487)
 67855 temacs   RET   write -1 errno 35 Resource temporarily unavailable
 67855 temacs   CALL  poll(0x5fb000,0x1,0)
 67855 temacs   RET   poll 1
 67855 temacs   CALL  write(0x7,0x44f72000,0x9ec487)
 67855 temacs   RET   write -1 errno 35 Resource temporarily unavailable
[...repeats forever...]
-----8<-----

-----8<-----
# fstat  /usr/ports/editors/emacs/work/emacs-22.1/src/emacs
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
root     temacs     67855    7 /        365041 -rw-r--r--  10404999 rw  /usr/ports/editors/emacs/work/emacs-22.1/src/emacs
# ls -l /usr/ports/editors/emacs/work/emacs-22.1/src/emacs
-rw-r--r--  1 root  wheel  10404999 Nov 14 20:02 /usr/ports/editors/emacs/work/emacs-22.1/src/emacs
-----8<-----

so, it reaches 10MB or so, then can't write anymore.

There isn't an output file size limit:
-----8<-----
# ulimit -a
cpu time               (seconds, -t)  unlimited
file size           (512-blocks, -f)  40960
data seg size           (kbytes, -d)  1048576
stack size              (kbytes, -s)  1048576
core file size      (512-blocks, -c)  unlimited
max memory size         (kbytes, -m)  unlimited
locked memory           (kbytes, -l)  unlimited
max user processes              (-u)  5547
open files                      (-n)  11095
virtual mem size        (kbytes, -v)  unlimited
sbsize                   (bytes, -b)  unlimited
-----8<-----

If I invoke 'LC_ALL=C ./temacs -batch -l loadup dump' from the prompt
instead of through the build system, I have the same problem---same
file size when it gets stuck, same ktrace---so the build system isn't
setting a file output size limit, either.

The '/' filesystem, which is the filesystem I'm building on, is
mounted over NFS from Solaris, and after the build hangs the mount is
mostly idle according to tcpdump, so the NFS server isn't repeatedly
refusing the operation.  Yet, if I do the build on an mdmfs, it
succeeds:

-----8<-----
# mdmfs -s 256m md /tmp0
# pax -rwpe emacs-22.1 /tmp0
# cd /tmp0/emacs-22.1/src
# LC_ALL=C ./temacs -batch -l loadup dump
Loading loadup.el (source)...
Using load-path (/usr/ports/editors/emacs/work/emacs-22.1/lisp)
Loading emacs-lisp/byte-run...
Loading emacs-lisp/backquote...
Loading subr...
[...]
Loading tooltip...
((58192 . 3529) (11759 . 0) (621 . 30) 79136 166491 (71 . 7) (18 . 12) (5651 . 1386))
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under names emacs and emacs-22.1.1
1798733 pure bytes used
# ls -l emacs
-rwxr-xr-x  2 root  wheel  10404999 Nov 14 20:30 emacs
-----8<-----

The 'emacs' written is a working one.

kdump of the successful mdmfs build:
-----8<-----
 69063 temacs   CALL  open(0xb6f5f0,0,0)
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/temacs"
 69063 temacs   RET   open 6
 69063 temacs   CALL  fcntl(0x6,0x3,0)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  fcntl(0x6,0x4,0x4)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  fstat(0x6,0x7fdffffd470)
 69063 temacs   RET   fstat 0
 69063 temacs   CALL  mmap(0,0x3b8d77,0x3,0x1002,0xffffffffffffffff,0,0)
 69063 temacs   RET   mmap 1153138688/0x44bb8000
 69063 temacs   CALL  read(0x6,0x44bb8000,0x3b8d77)
 69063 temacs   GIO   fd 6 read 8192 bytes
       0x0000 7f45 4c46 0202 0109 0000 0000 0000 0000  |.ELF............|
       0x0010 0002 002b 0000 0001 0000 0000 0010 b8e0  |...+............|
       0x0020 0000 0000 0000 0040 0000 0000 0037 1568  |.......@.....7.h|
       0x0030 0000 0002 0040 0038 0005 0040 0018 0015  |.....@.8...@....|
       0x0040 0000 0006 0000 0005 0000 0000 0000 0040  |...............@|
[...]
 69063 temacs   RET   read 3902839/0x3b8d77
 69063 temacs   CALL  break(0xba4000)
 69063 temacs   RET   break 0
 69063 temacs   CALL  open(0xb6f5c8,0x202,0x1b6)
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/emacs"
 69063 temacs   RET   open 7
 69063 temacs   CALL  fcntl(0x7,0x3,0)
 69063 temacs   RET   fcntl 2
 69063 temacs   CALL  fcntl(0x7,0x4,0x6)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  ftruncate(0x7,0,0x9ec487)
 69063 temacs   RET   ftruncate 0
 69063 temacs   CALL  mmap(0,0x9ec487,0x3,0x1002,0xffffffffffffffff,0,0)
 69063 temacs   RET   mmap 1157046272/0x44f72000
 69063 temacs   CALL  write(0x7,0x44f72000,0x9ec487)
 69063 temacs   GIO   fd 7 wrote 8192 bytes
       0x0000 7f45 4c46 0202 0109 0000 0000 0000 0000  |.ELF............|
       0x0010 0002 002b 0000 0001 0000 0000 0010 b8e0  |...+............|
       0x0020 0000 0000 0000 0040 0000 0000 009a 4c38  |.......@......L8|
       0x0030 0000 0002 0040 0038 0005 0040 0019 0016  |.....@.8...@....|
[^^^ this is the write that failed over NFS ]
[...]
 69063 temacs   RET   write 10404999/0x9ec487
 69063 temacs   CALL  munmap(0x44bb8000,0x3b8d77)
 69063 temacs   RET   munmap 0
 69063 temacs   CALL  munmap(0x44f72000,0x9ec487)
 69063 temacs   RET   munmap 0
 69063 temacs   CALL  fstat(0x6,0x7fdffffd1f0)
 69063 temacs   RET   fstat 0
 69063 temacs   CALL  fcntl(0x6,0x3,0)
 69063 temacs   RET   fcntl 4
 69063 temacs   CALL  fcntl(0x6,0x4,0)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  close(0x6)
 69063 temacs   RET   close 0
 69063 temacs   CALL  fstat(0x7,0x7fdffffd1f0)
 69063 temacs   RET   fstat 0
 69063 temacs   CALL  fcntl(0x7,0x3,0)
 69063 temacs   RET   fcntl 6
 69063 temacs   CALL  fcntl(0x7,0x4,0x2)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  close(0x7)
 69063 temacs   RET   close 0
 69063 temacs   CALL  stat(0xb6f5c8,0x7fdffffd470)
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/emacs"
 69063 temacs   RET   stat 0
 69063 temacs   CALL  umask(0x309)
 69063 temacs   RET   umask 18/0x12
 69063 temacs   CALL  umask(0x12)
 69063 temacs   RET   umask 777/0x309
 69063 temacs   CALL  chmod(0xb6f5c8,0x81ed)
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/emacs"
 69063 temacs   RET   chmod 0
 69063 temacs   CALL  write(0x2,0xb6f638,0x17)
 69063 temacs   GIO   fd 2 wrote 23 bytes
       "1798733 pure bytes used"
 69063 temacs   RET   write 23/0x17
 69063 temacs   CALL  write(0x2,0x434ca86f,0x1)
 69063 temacs   GIO   fd 2 wrote 1 byte
       "
       "
 69063 temacs   RET   write 1
 69063 temacs   CALL  stat(0xb6f6c8,0x7fdffffcde0)
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/emacs-22.1.2"
 69063 temacs   RET   stat -1 errno 2 No such file or directory
 69063 temacs   CALL  unlink(0xb6f6f8)
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/emacs-22.1.2"
 69063 temacs   RET   unlink -1 errno 2 No such file or directory
 69063 temacs   CALL  link(0xb6f728,0xb6f750)
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/emacs"
 69063 temacs   NAMI  "/tmp0/emacs-22.1/src/emacs-22.1.2"
 69063 temacs   RET   link 0
 69063 temacs   CALL  getpgrp
 69063 temacs   RET   getpgrp 69063/0x10dc7
 69063 temacs   CALL  ioctl(0,TIOCGPGRP,0x7fdffffd40c)
 69063 temacs   RET   ioctl 0
 69063 temacs   CALL  sigaction(0x17,0x7fdffffd2f0,0)
 69063 temacs   RET   sigaction 0
 69063 temacs   CALL  setitimer(0x2,0x7fdffffd3f0,0)
 69063 temacs   RET   setitimer 0
 69063 temacs   CALL  close(0x3)
 69063 temacs   RET   close 0
 69063 temacs   CALL  close(0x4)
 69063 temacs   RET   close 0
 69063 temacs   CALL  fcntl(0,0x3,0)
 69063 temacs   RET   fcntl 6
 69063 temacs   CALL  fcntl(0,0x4,0x2)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  fcntl(0x1,0x3,0)
 69063 temacs   RET   fcntl 2
 69063 temacs   CALL  fcntl(0x1,0x4,0x2)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  fcntl(0x2,0x3,0)
 69063 temacs   RET   fcntl 2
 69063 temacs   CALL  fcntl(0x2,0x4,0x2)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  fcntl(0x5,0x3,0)
 69063 temacs   RET   fcntl 4
 69063 temacs   CALL  fcntl(0x5,0x4,0)
 69063 temacs   RET   fcntl 0
 69063 temacs   CALL  exit(0)
-----8<-----


Any ideas?

-- 
READ CAREFULLY. By reading this fortune, you agree, on behalf of your employer,
to release me from all obligations and waivers arising from any and all
NON-NEGOTIATED  agreements, licenses, terms-of-service, shrinkwrap, clickwrap,
browsewrap, confidentiality, non-disclosure, non-compete and acceptable use
policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its
partners, licensors, agents and assigns, in perpetuity, without prejudice to my
ongoing rights and privileges. You further represent that you have the
authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

--pgp-sign-Multipart_Wed_Nov_14_15:50:05_2007-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iQCVAwUARztfiYnCBbTaW/4dAQJ7ZgP5AWkI9eBQOO0VXCmatE1QYXUbZr/PypUw
mC7FcDubCXrUqBMOiJ7lkm8mEmJ0bU5Zfc4gaLB7eNQ+2EFx4dsDuf/JvBb7o9AI
Gln0r9BAyeVILN8bZFmtByYSSqovyWJZwFnqLDtxKv9RHWuAraKmLPh5ZeF6Fbmd
vAfDQKPeaBo=
=TUTp
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Wed_Nov_14_15:50:05_2007-1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?oqve844kmu.fsf>