home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / sysv386 / 16267 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  43.7 KB

  1. Xref: sparky comp.unix.sysv386:16267 comp.unix.bsd:8490 comp.os.mach:1520 news.answers:3842
  2. Path: sparky!uunet!cbmvax!snark!esr
  3. From: esr@snark.thyrsus.com (Eric S. Raymond)
  4. Newsgroups: comp.unix.sysv386,comp.unix.bsd,comp.os.mach,news.answers
  5. Subject: Known Bugs in the USL UNIX distribution
  6. Message-ID: <1jMpJ5#0t9gJc4gnFbZ0yll4q43YYcf=esr@snark.thyrsus.com>
  7. Date: 5 Nov 92 17:20:17 GMT
  8. Expires: 5 Feb 93 00:00:00 GMT
  9. Sender: esr@snark.thyrsus.com (Eric S. Raymond)
  10. Followup-To: comp.unix.sysv386
  11. Distribution: world
  12. Lines: 1078
  13. Approved: news-answers-request@MIT.Edu
  14.  
  15. Archive-name: usl-bugs
  16. Last-update: Tue Nov  3 12:16:32 1992
  17. Version: 7.0
  18.  
  19. What's new in this issue:
  20.   * Confirmation of a number of USL source bugs still in Consensys 1.3
  21.   * More info and clarification on the suid core-dump bug.
  22.   * Transfer-speed problem with Adaptec 1542B
  23.   * More on logical unit IDs for SCSI tapes.
  24.   * Bugs in SVr4 ftp(1), cp(1), tbl(1), who(1), at(1).
  25.   * A workaround for the CPU-hogging problem in X11R5.
  26.   * A newly-reported bug in the WD80x3 support.
  27.  
  28. My apologies to all for the two-month hiatus.  Press of work...
  29.  
  30. I. Introduction
  31.  
  32. This posting lists known bugs in System V Release 4 implementations, and known
  33. fixes applied by various porting houses (there's also random bits of
  34. information about SCO UNIX here and there).  It was formerly part of the
  35. 386-buyers-faq issues 1.0 through 4.0, and is still best read in conjunction
  36. with the pc-unix/software FAQ descended from that posting.
  37.  
  38. This document is maintained and periodically updated as a service to the net by
  39. Eric S.  Raymond <esr@snark.thyrsus.com>, who began it for the very best
  40. self-interested reason that he was in the market and didn't believe in plonking
  41. down several grand without doing his homework first (no, I don't get paid for
  42. this, though I have had a bunch of free software and hardware dumped on me as a
  43. result of it!).  Corrections, updates, and all pertinent information are
  44. welcomed at that address.
  45.  
  46. This posting is periodically broadcast to the USENET group comp.unix.sysv386
  47. and to a list of vendor addresses.  If you are a vendor representative, please
  48. check to make sure the information on your company is current and correct.  If
  49. it is not, please email me a correction ASAP.  If you are a knowledgeable user
  50. of any of these products, please send me a precis of your experiences for the
  51. improvement of future issues.
  52.  
  53. The bug descriptions often include indications of fixes by the various porting
  54. houses to their current releases.  These are:
  55.  
  56. Consensys UNIX Version 1.3            abbreviated as "Cons" below
  57. Dell UNIX Issue 2.2                abbreviated as "Dell" below
  58. Esix Revision A                    abbreviated as "Esix" below
  59. Micro Station Technology SVr4 UNIX        abbreviated as "MST" below
  60. Microport System V Release 4.0 version 4    abbreviated as "uPort" below
  61. UHC Version 3.6                    abbreviated as "UHC" below
  62. SCO Open DeskTop 1.1                abbreviated as "SCO" below
  63.  
  64. II. General Bugs
  65.  
  66. 1. Dropout problems with tty devices
  67.    The most serious problem anyone has reported is that the USL asy driver is
  68. flaky and occasionally drops characters at above 4800 baud.
  69.    Microport, Dell, Esix, and UHC say that they believe they've fixed this.
  70. However, Dell, at least, was mistaken when they first made this claim; a more
  71. detailed description of the problem is given below.  I have been assured that
  72. this is on the fix list for the next Dell release.
  73.    Bela Lubkin at SCO comments "386 interrupt latency vs. unbuffered UARTs.
  74. This is a tough problem.  Nobody's driver should drop characters with a
  75. turned-on 16550.  It's not so easy with a 16450.  Anyone with 16450s or lower
  76. should be able to solve their problems by dropping in a 16550."
  77.  
  78. 2. Suid programs dump core when signalled
  79.    Mark Snitily of SGCS says that under many SVr4s, signalling a
  80. process that is running suid root will cause it to core-dump.  He says
  81. Dell and MST have fixed this, and SCO doesn't suffer from this.
  82.  
  83. 3. DMAs on large ISA machines may fail
  84.    On ISA machines with more that 16MB of RAM, SVr4 may try to do DMA
  85. from outside the bus's address space, causing serious problems.  UNIX ought
  86. to do an in-memory copy to within the low 16MB but the USL base code doesn't.
  87.    Dell says they've fixed this, and that's been confirmed by a user.
  88.    UHC says they've fixed this; they add that the special buffer-allocation
  89. logic to handle the problem can be turned off with a tunable kernel parameter
  90. if you've got less than 16M.
  91.    Microport says they've fixed this in their new 4.1 release, shipping early
  92. March.
  93.    Esix offers a patch to correct this problem.
  94.    SCO used to have a similar bug but fixed it long ago.
  95.    John Sully <jms@mport.com> writes: "This was due to a bug in pre version 4
  96. dma code.  The USL code has always at least attempted to do a copy from low
  97. memory to high memory on systems with more than 16Mb of RAM.  By the way UHC is
  98. wrong; the buffer allocation code only comes into play if you have more than
  99. 16Mb of memory.  You can turn it off if you have a machine (ie. an EISA bus)
  100. which will allow you to do DMA above 16Mb.  You *must* have this tunable
  101. (MAXDMAPAGE) turned on if you are using *ISA* bus masters in a system with more
  102. than 16Mb of ram.  Unfortunately doing this will affect all drivers which do
  103. dma as there is no good way to do this on a per-driver basis."
  104.  
  105. 4. There is a cylinder limit on disk size
  106.    Stock USL code is limited to 1,024 cylinders per Winchester, which
  107. might cause problems with some disk drives.
  108.    Microport, Dell, Esix, MST, and UHC have fixed this.
  109.    Bela Lubkin says "SCO's boot filesystem must lie below 1024 cylinder mark;
  110. anything else can be anywhere.  This is more-or-less a limitation of the BIOS
  111. interface that the bootstrap loader must use.  Could be circumvented by going
  112. directly to controller hardware in the bootstrap loader, but that would be
  113. horrendously complex with all the controllers & host adapters to be supported."
  114. This limit probably applies to all other UNIXes as well.
  115.  
  116. 5. shmat(2) vs. vfork(2)
  117.    The shmat(2) call is known to interact bady with vfork(2).  Specifically,
  118. if you attach a shared-memory segment, vfork(), and then the child releases
  119. the segment, the parent loses it too!  Workaround; use fork(2).
  120.    UHC and Microport both suspect that they still have this bug and opine that
  121. anyone who uses vfork deserves to lose.  Dell has no plans to fix it.
  122.  
  123.    John Sully <jms@mport.com> writes: "This is not a bug.  It is completely
  124. consistent with the semantics of a change to the address space of the child.
  125. Think about it: any change to the address space of a child process created by
  126. vfork(2) is reflected in the parent since the child is actually executing in
  127. the parent's address space.  Therefore if the child changes the address space
  128. (in this case by releasing the shared memory segment) what should happen?
  129. Right, the parent should have the same change happen.  And what does happen?
  130. The segment is released in the parent.  One can argue about the braindead
  131. semantics of vfork(2) all day, but the fact remains that this is exactly what
  132. one would expect to happen.  To quote from the manual page:
  133.  
  134.      [...] vfork differs  from fork  in
  135.      that the    child  borrows    the parent's *memory* and thread of
  136.      control until a call to execve or an exit (either by a  call
  137.      to     exit  or  abnormally.) [ emphasis added ]
  138.  
  139. and later:
  140.  
  141.      It does not work, however, to return while
  142.      running in    the child's  context  from  the     procedure  which
  143.      called vfork since    the eventual return from vfork would then
  144.      return to a no longer existent  stack  frame.
  145.  
  146. Please note that the entire address space of the parent is used by
  147. the child created by vfork(2).  The manual page also points out
  148. several other caveats involved in doing anything to the parent's
  149. address space except successfully calling an exec family function or
  150. _exit (note it specifically says *not* to call exit(2)).  I do not believe 
  151. that having a shared memory segment disappear from the parent's address 
  152. space is out of line after reading the man page for vfork(2).
  153.  
  154. It is interesting to note that Sun after implementing its new VM system in
  155. SunOS 4.0 initially had no plans to support vfork, since they felt that the COW
  156. semantics of the new fork would provide the necessary efficiency gain.  Indeed
  157. they found that most programs which used vfork worked just fine by doing
  158. -Dvfork=fork.  All that is, except for a certain popular command interpreter
  159. [ed: can you say C shell?].  So we are stuck with the legacy of this braindead
  160. system call.
  161.  
  162. BTW, Microport has no plans to fix this :-)."
  163.  
  164. 6. X performance problem
  165.    Stock X11R4 and R5 (at least prior to 1.2E) is said to hog the
  166. processor if you use the LOCALCONNECT option.  Jan Brittenson
  167. <bson@gnu.ai.mit.edu> posted the following workaround:
  168.  
  169.    I don't know what causes the standard X server to hog the CPU, but
  170. it can be avoided. Use the following program instead of xinit. Compile
  171. it with `$CC -O -o xserv xserv.c -lX11' where CC is either
  172. /usr/ccs/bin/cc or gcc. Set DISPLAY and XINITRC and run `xserv' from
  173. your home directory. This is just a q&d hack, and not really a
  174. substitute for xinit -- but it works.
  175.  
  176. /* xserv.c -- start X server
  177.  
  178.    Start X server. Similar to xinit, but intended to
  179.    circumvent the X386 CPU Hog Mode
  180.  
  181.    Jan Brittenson, June 2 1992  05:15 am */
  182.  
  183. #include <stdio.h>
  184. #include <sys/types.h>
  185. #include <signal.h>
  186. #include <setjmp.h>
  187. #include <unistd.h>
  188. #include <libgen.h>
  189.  
  190. #include <X11/Xlib.h>
  191. #include <X11/Xos.h>
  192. #include <X11/Xmu/SysUtil.h>
  193.  
  194.  
  195. extern int errno;
  196.  
  197.  
  198. /* Start X server. Fork-exec server, passing the DISPLAY environment
  199.    variable. Wait for server to get up and running (at which point it
  200.    passes back a SIGUSR1), at which point the user xinitrc file is run. */
  201.  
  202. #define DEFAULT_XPATH "/usr/X386/bin/X386"
  203. #define XINITRC ".xinitrc"
  204. #define DEFAULT_XCOMMAND "xterm -g +1+1 -n login -display :0"
  205.  
  206. extern void *malloc (), free ();
  207. extern char *basename (), *getenv (), *strcpy ();
  208.  
  209. /* X stuff */
  210. Display *top_display;
  211.  
  212.  
  213. /* This is supposed to be in libgen.a... */
  214. static char
  215. *basename (s0)
  216.   char *s0;
  217. {
  218.   register char *s1;
  219.  
  220.   for (s1 = s0 + strlen (s0) - 1;
  221.        s1 > s0 && *s1 != '/'; s1--);
  222.  
  223.   if (*s1 == '/')
  224.     return s1+1;
  225.  
  226.   return s1;
  227. }
  228.  
  229. jmp_buf sigusr1_frame;
  230.  
  231. static void
  232. caught_sigusr1 (int dummy) { longjmp (sigusr1_frame, !0); }
  233.  
  234.  
  235. static char
  236. *dispname (s0)
  237.   char *s0;
  238. {
  239.   register char *s1;
  240.  
  241.   for (s1 = s0 + strlen (s0) - 1;
  242.        s1 > s0 && *s1 != ':'; s1--);
  243.  
  244.   return s1;
  245. }
  246.  
  247.  
  248. /* No arguments */
  249. int
  250. main (argc, argv)
  251. int argc;
  252. char **argv;
  253. {
  254.   char *xserver_file, *xinitrc_file, *home_path, *display, *display_X_arg;
  255.   int xserver_pid, orgmask;
  256.   
  257.   
  258.   /* Not that it really matters, just to avoid being used as a direct
  259.      replacement for xinit. */
  260.   
  261.   if (argc != 1)
  262.     {
  263.       fprintf (stderr, "usage: %s\n", basename (*argv));
  264.       exit (1);
  265.     }
  266.   
  267.   
  268.   /* Resolve xinitrc path. This is done before the server is
  269.      started. */
  270.   
  271.   if (!(home_path = getenv ("HOME")))
  272.     home_path = "/etc";
  273.   
  274.   if (!(xinitrc_file = getenv ("XINITRC")))
  275.     {
  276.       xinitrc_file = malloc (strlen (home_path) + 1 + strlen (XINITRC) + 1);
  277.       sprintf (xinitrc_file, "%s/%s", home_path, xinitrc_file);
  278.     }
  279.   else
  280.     xinitrc_file = strdup (xinitrc_file);
  281.  
  282.  
  283.   /* Resolve display */
  284.   if (!(display = getenv ("DISPLAY")))
  285.     display = display_X_arg = ":0.0";
  286.   else
  287.     display_X_arg = dispname (display);
  288.  
  289.  
  290.   /* Tell server to notify us when up and running */
  291.   signal (SIGUSR1, SIG_IGN);
  292.   orgmask = sigblock (sigmask (SIGUSR1));
  293.  
  294.   /* Start server */
  295.   if (!(xserver_pid = vfork ()))
  296.     {
  297.       xserver_file = DEFAULT_XPATH;
  298.       
  299.       execl (xserver_file, xserver_file, display_X_arg, NULL);
  300.  
  301.       fprintf (stderr, "%s: can't exec %s (errno = %d) -- start-up aborted\n",
  302.                basename (*argv), xserver_file, errno);
  303.       exit (1);
  304.     }
  305.  
  306.   if (xserver_pid < 0)
  307.     {
  308.       fprintf (stderr, "%s: can't fork (errno = %d) -- start-up aborted\n",
  309.                basename (*argv), errno);
  310.       
  311.       exit (1);
  312.     }
  313.   
  314.   /* Await signal from server */
  315. #if 0
  316.   /* Why the #@$*! doesn't this work?! */
  317.   sigsetmask (orgmask);
  318.   alarm (20);
  319.   sigpause (sigmask (SIGUSR1) | sigmask (SIGALRM));
  320. #else
  321.   sleep (5);
  322. #endif
  323.  
  324.   /* Open display */
  325.   if (!(top_display = XOpenDisplay (display)))
  326.     {
  327.       fprintf (stderr, "%s: unable to open display '%s' -- start-up aborted\n",
  328.                basename (*argv), display);
  329.       exit (1);
  330.     }
  331.   
  332.   /* Execute xinitrc file */
  333.   if (system (xinitrc_file) < 0)
  334.     system (DEFAULT_XCOMMAND);
  335.       
  336.   /* Close display */
  337.   XCloseDisplay (top_display);
  338.  
  339.   /* Terminate server */
  340.   kill (xserver_pid, SIGTERM);
  341.  
  342.   /* Finished */
  343.   free (xinitrc_file);
  344. }
  345.  
  346. 7. UFS file system problems
  347.    In stock USL 4.0.3, you can't use a UFS file system as the root; the
  348. system hangs if you try.  Consensys, Dell, Esix, Microport, MST and ESIX
  349. all appear to have fixed this.
  350.    David Aitken, the UNIX product manager at UHC, writes "The ufs as root file
  351. system [problem] was not really a bug, just a little oversight on USL's part -
  352. we have fixed it completely by adding one line to the /stand/boot script:
  353. rootfstype=ufs!"  He adds that they've been using ufs on their lab machines for
  354. over 10 months with no trouble, and the latest UHC release defaults to ufs if
  355. you have more than 120MB of disk.
  356.  
  357. 8. A security hole in login
  358.    David Wexelblat <dwex@mtgzfs3.att.com> reports: "There is a HUGE security
  359. hole in /bin/login in all USL derived SVR4s before 4.0.4.  Refer to CERT
  360. advisory CA-91:08, dated 5/23/91.  This is known to be present in AT&T SVR4
  361. 2.1, and Microport SVR4 3.1.  ESIX claims to have fixed it, Microport reports
  362. that it is fixed in 4.1.  I won't give any more details unless necessary.
  363. Suffice to say that this bug allows any non-privileged user on an SVR4 system
  364. to get read-write access to any file on the system."
  365.  
  366. 9. COFF problems with long filenames
  367.    A source at Dell urges: "Our SVR4v2 did some stuff that USL didn't get
  368. around to until SVR4v4.  Try Dell UNIX 2.1 with a COFF program on a large UFS
  369. filesystem in a directory with long names.  Runs on Dell UNIX.  Breaks on
  370. others."  I don't have more definite info yet.
  371.  
  372. 10. Flakeouts in the Wangtek device driver
  373.    Dell reports that USL's Wangtek device driver is seriously flaky.  "How'd
  374. you like a multi volume backup where the second and subsequent volumes don't
  375. follow on from the previous volumes?"  UHC confirms this and is actively
  376. working on the problem.
  377.    An anonymous SCOer says "The QIC02 tape controller `standard' is seriously
  378. flaky.  Our driver's in pretty good shape but nobody will ever have a truly
  379. solid driver that supports every QIC02 controller you can find."
  380.    Gordon Ross <gwr@mc.com> reports: "Actually, the SCSI tape target driver
  381. `st01' has a similar problem at version 4.0.3 which I corrected while I worked
  382. on the SVR4 code.  The correction was provided to the support group at USL.
  383. The actual problem was that the SCSI tape would return a `check status'
  384. completion code which was just trying to inform the driver of the arrival
  385. of the `logical end of media' indication but the driver was treating it
  386. as an error.  The tape drive had in fact written the data, but the driver
  387. incorrectly assumed that the "check status" return meant that it failed.
  388. The result of this is that when you write into the end of the tape, you
  389. can read back one more "chunk" than yu wrote.  Of course, cpio does not
  390. like this at all when doing multi-volume backups..."
  391.  
  392. 11. A kernel declaration bug
  393.     A botch in USL's /etc/conf/pack.d/kernel/space.c (which is present in
  394. Consensys 1.3, Dell, Microport 4.0.3 and 4.0.4 and may also be present in other
  395. SVr4s) can step on the linesw[] table.  The problem is that the domain name
  396. array initialization is wrong and too short; thus, when it's set, data past the
  397. end of the array can be stomped.  To fix this, find the following near line
  398. 247:
  399.  
  400.     char srpc_domain[] = SRPC_DOMAIN;
  401.  
  402. and change it to
  403.  
  404.     char srpc_domain[SYS_NMLN] = SRPC_DOMAIN;
  405.  
  406. then rebuild the kernel.
  407.    Microport officially knows about this bug and plans to fix it in a
  408. near-future update release.
  409.  
  410. 12. fread(3) does the wrong thing on pipes and FIFOs
  411.    Ed Hall <edhall@rand.org> writes: "Unlike the raw read() system call,
  412. fread() is supposed to be able to make several partial read's to satisfy the
  413. data requested by its arguments.  The exceptions are an EOF or an error on the
  414. stream.  This characteristic is quite useful when moving data through pipes or
  415. over network connections, since partial reads are quite common in these cases.
  416. Well, the version of fread() in ESIX 4.0.3 (and likely other Sys5R4's) only
  417. does a single physical read, and if it only satifies part of the requested
  418. number of bytes, that's all you get.  This can sting you even if you carefully
  419. check the value returned by fread(), since the value returned is rounded down
  420. to the number of complete "nitems" read, although your position in the stream
  421. can be up to size-1 bytes beyond that point.  Neither ferror() nor feof()
  422. indicate anything is wrong when this happens."
  423.    This bug (which is also present in 4.0.4) is serious and nasty and should
  424. be high on every porting house's list to fix.  It appears to be peculiar to
  425. USL 4.0.3 and 4.0.4; 4.0.2 does *not* have it, nor does SCO.
  426.    A USL source claims it has been fixed in 4.1.
  427.  
  428. 13. Process accounting is broken
  429.     In 4.0.3, process accounting doesn't work.  From examining the accounting
  430. scripts, it appears that /usr/lib/acct/accton is supposed to set a return code
  431. depending on whether accounting was switched on already or not.  However, it
  432. always returns the same result - accounting switched off.  This means that the
  433. /usr/lib/acct/ckpacct script, which is run every hour to keep the proccess
  434. accounting log in check, instead turns off accounting the first time it is run
  435. after booting.  The same happens with the nightly /usr/lib/acct/monacct
  436. program.
  437.    I don't yet know whether this bug is present in 4.0.4.  It is definitely
  438. un-fixed in Dell 2.1 and Consensys 1.3.
  439.  
  440. 14. tar(1) foos up in the presence of symbolic links
  441.     Tar can get the names of symbolic links wrong when creating an archive.
  442. This bug can be demonstrated by doing the following:
  443.  
  444.    mkdir t
  445.    cd t
  446.    touch a 1234567890
  447.    ln -s 1234567890 b
  448.    ln -s a c
  449.    tar vcf ../t.tar .
  450.  
  451.    The output generated by tar is:
  452.  
  453.    a ./ 0 tape blocks
  454.    a ./a 0 tape blocks
  455.    a ./1234567890 0 tape blocks
  456.    a ./b symbolic link to 1234567890
  457.    a ./c symbolic link to a234567890
  458.  
  459. (Note the above commands should be done in the order shown and in a new
  460. directory)  This bug is nasty.  Recommended solution: use GNU tar.
  461.    This is reported from Esix 4.0.3 and Consensys 1.3, but probably exists on
  462. other SVr4s as well.
  463.  
  464. 15. Symbolic links can interfere with shellscript execution
  465.    There is a problem running #! scripts when symbolic links are involved.
  466. Typing in the following from a command shell demonstrates the problem:
  467.  
  468.    mkdir a b
  469.    ln -s a c
  470.    cd a
  471.    cat > script <<!
  472.    #!/bin/sh
  473.    echo Hello
  474.    !
  475.    chmod 755 script
  476.    cd ../b
  477.    ln -s ../c/script .
  478.    ./script
  479.  
  480. The message generated from the last line is:
  481.  
  482.      a/script: a/script: cannot open
  483.  
  484.    This is reported from Esix 4.0.3, but probably exists on other SVr4s
  485. as well.
  486.  
  487. 16. Piping a csh builtin causes the shell to hang.
  488.    While running csh, this can be demonstrated by some of the following:
  489.  
  490.    echo Hello | cat
  491.    history | more
  492.  
  493. (A solution to this one is use tcsh-6.02.)
  494.    This is reported from Esix 4.0.3 and Consensys 1.3, but probably exists on
  495. other SVr4s as well.
  496.  
  497. 17. Quick port setup option in sysadm is broken
  498.    In 4.0.3 sysadm, the quick port setup option, which is used to add and
  499. delete terminal ports, is seriously broken.  The script modifies /etc/conf/*
  500. files, and has incorrect minor numbers, sets the 5th field of sdevice.d if Y
  501. when it should be N, and is missing columns for node.d.  See
  502. /usr/sadm/sysadm/bin/q-add.
  503.  
  504. 18. COFF binaries linked with curses(3) and shared libc hang, eating the CPU
  505.    Cause unknown.
  506.  
  507. 19. shl hangs, sxt devices bad
  508.    shl(1) does not work.  Try creating a layer and doing an 'ls'.  Your session
  509. hangs.  Bruce Momjian <root%candle.uucp@bts.com>, who reported this bug, says
  510. he believes it is the sxt devices which are broken.  It definitely exists in
  511. Consensys 1.3.
  512.  
  513. 20. num-lock prevents mouse from working properly
  514.    When using the Motif window manager, if your num lock is on, your mouse
  515. clicks are not recognized by the window manager.  The mouse still works in
  516. xterm(1).  This is allegedly fixed in Destiny (4.2).
  517.  
  518. 21. adjtime() doesn't work
  519.   Hugh Stearns <hoyt@isus.tnet.com> reports that in 4.0.3.6 adjtime() doesn't.
  520. Calling `date -a' works to adjust the time slowly.
  521.  
  522. 22. ttymon drops DTR
  523.   Hugh Stearns <hoyt@isus.tnet.com> reports that in 4.0.3.6 the ttymon(1)
  524. utility for HDB uucp drops DTR every few weeks.  The workaround is to disable
  525. and re-enable it.
  526.  
  527. 23. cron mail doesn't go through aliasing
  528.   Hugh Stearns <hoyt@isus.tnet.com> reports that in 4.0.3.6 cron mail to adm
  529. doesn't get redirected by an
  530.  
  531. 24. fragility in xterm
  532.   Hugh Stearns <hoyt@isus.tnet.com> reports that in 4.0.3.6, doing ~! from
  533. a cu in xterm kills xterm.
  534.  
  535. 25. byte-order problem with NFS when accessing Sun disks
  536.    Christoph Badura <bad@generics.ka.sub.org> notes that the stock USL resolver
  537. library suffers from serious confusion about the byte order in the
  538. socketaddr_in structure.  This bug is acknowledged by USL for the 4.0.4
  539. release.  A symptom of this bug is that Sun disks will not mount correctly over
  540. NFS. As a workaround, try removing the references to /usr/lib/resolv.so from
  541. /etc/netconfig and rebooting your system.  Unfortunately, this will mean
  542. you can't use nameservers.
  543.  
  544. 26. Under weird circumstances, lseek on UFS may cause corruption
  545.   Christoph Badura <bad@generics.ka.sub.org.ka.sub.org> reports that a UFS
  546. lseek() to an offset which is a multiple of 4096 but not a multiple of 8192,
  547. followed by a write(), may corrupt the file being written.  The bug shows up
  548. only, if the file has no pages in the page pool associated with it at the seek
  549. offset and at 4k before the seek offset.  He has sent USL kernel fix for this.
  550.  
  551. 27. FIONREAD fails on regular files
  552.   Christoph Badura <bad@generics.ka.sub.org.ka.sub.org> reports that the
  553. FIONREAD ioctl() fails on regular (disk) files.  He has sent USL a one-line
  554. kernel fix.
  555.  
  556. 28. Network hangs with WD80x3
  557.    T. Paul Lee at MST reports that you can produce a hang with a WD80x3 board
  558. as follows:  On the server, init 3 and share (export) /usr (for example).  On
  559. the client,
  560.  
  561.     mount -F nfs server:/usr /mnt
  562.     cd /mnt
  563.     find . -print | cpio -ocBuv > /dev/null
  564.  
  565. The server and client will "hang" together.   If you hit keys on the server
  566. and/or client, hang will go away for 10-20 seconds temporarily.   Yanking the
  567. BNC connectors will do the same trick.
  568.    He says "We heard from customers that this happens on Dell, UHC as well as
  569. USL 4.0.4.  PCNFS/BWNFS network xcopy suffers this as well.  Client can be a
  570. Sun Sparc for that matter."
  571.  
  572. 28. csh lossage due to bad optimization
  573.   If a csh user sources a non-existent file in their .cshrc (eg, source .alias,
  574. where .alias doesn't exist), then the system will hang for a couple of minutes.
  575. Eventually the user get an "Out of memory" error and the console logs "NOTICE:
  576. out of swap space - Insufficient memory to allocate 2 pages - system call
  577. failed".
  578.   This appears to be due to over-optimization of code surrounding a longjmp
  579. call.
  580.   (There are numerous other reports of memory leak bugs in csh).
  581.  
  582. 29. FTP problems
  583.   The in.ftpd on SVR4.0.3 does not support all the commands listed in RFC 959.
  584. When recent SCO UNIX/ODT versions ftp to SVR4.0.3, the SVR4 side will refuse,
  585. drop the connection, and core dump after you authenticate.  This is because the
  586. SCO end sends the 'SYST' command ala RFC 959, and the SVR4.0.3 end doesn't
  587. recognise it.  Some ports have fixed this.
  588.  
  589. 30. Bug in cp(1)
  590.    If ``copy'' encounters a directory before a file, it dumps core ...
  591.  
  592. --- cut ---
  593. cd /tmp
  594. mkdir copybug jnk
  595. cd jnk
  596. mkdir directory
  597. >file
  598. copy -r * /tmp/copbug
  599. --- cut ---
  600.  
  601. This was reported from Consensys 4.0.3 but is probably a generic SVr4 bug.
  602.  
  603. 31. tbl -me doesn't work
  604.    Wolfgang Denk reports that trying to use "tbl -me" for any input file causes
  605. tbl to quit.  The problem is that newer tbl versions don't accept [nt]roff
  606. contol lines (".rm @W") after .TS.
  607.  
  608. 32. who -r fragility leads to boot-time problems
  609.   It coredumps if the name of the timezone is longer than three characters.
  610. This can be a real problem for European sites...  and is potentially more
  611. hazardous than immediately apparent as _a lot_ of the initialization scripts
  612. (rc1.d, rc2.d) use ``who -r'' to see if the machine is in single- or multi-user
  613. mode.  And when ``who'' bombs out, the ``set'' command is iven an empty
  614. command-line and can't do much else than print the shell variables, $1-$9
  615. remain empty ... meaning that more or less all the scripts fail in various ways
  616. and the system has an exceptionally hard time coming up.
  617.  
  618. 33. at(1) breaks here-documents in shell scripts
  619.    at adds gratuitous empty lines to the job submitted by the user.
  620. This prevents shell here-documents from working.
  621.  
  622. 34. A bug in the WD80x3 support
  623.    MST reports a serious bug in the SVr4 kernel support for this card.  Here's
  624. how to reproduce it:
  625.  
  626.     server: init 3 and share (export) /usr for example.
  627.  
  628.     client: mount -F nfs server:/usr /mnt
  629.         cd /mnt
  630.         find . -print | cpio -ocBuv > /dev/null
  631.  
  632.     what happens:
  633.         server and client will "hang" together.
  634.  
  635.     "cue":
  636.         hit keys on server and/or client, hang will go away
  637.         for 10-20 seconds temporarily.  Yank BNC connectors
  638.         do the same trick.
  639.  
  640.    They say they've heard from customers that this happens on Dell, UHC as well
  641. as USL 4.0.4.  PCNFS/BWNFS network xcopy suffers this as well.  Client can be a
  642. Sun Sparc for that matter.
  643.  
  644. III. SCSI Support Problems
  645.  
  646. 1. sar is confused by SCSI
  647.    Sar -d doesn't work on SCSI drives.  Dell fixed this in 2.1; no report of
  648. any other SVr4 having fixed this yet.  SCO fixed it in 3.2.4.
  649.  
  650. 2. A configuration problem
  651.    Stock USL requires you to jumper your SCSI devices to fixed IDs
  652. during installation (it can be changed to any other ID after).  
  653.    Dell says they've fixed this.  The requirement is definitely still present
  654. in Esix and Consensys 1.3.  UHC thinks they've fixed this, but their 4.0.3.6
  655. release still seems to demand ID 1 to install. 
  656.  
  657. 3. Synchronous SCSI hang problem
  658.    David Wexelblat <dwex@mtgzfs3.att.com> reports: "Stock SVR4.0.3 will hang
  659. the SCSI bus with a 1542 in synchronous mode.  Dell fixed this, and this has
  660. been given to Microport [ed note: Microport 4.0.4 and Consensys 4.0.3 have
  661. fixed the problem; MST UNIX and Esix 4.0.3 still have this problem; I have not
  662. yet been able to determine if ESIX 4.0.4 does].  In the file /sbin/bcheckrc,
  663. change the line:
  664.  
  665.     echo MARK > /dev/rswap
  666.  
  667. to
  668.         
  669.     echo MARK | dd of=/dev/rswap bs=512 conv=sync > /dev/null 2>&1
  670.  
  671. The magic is apparently the conv=sync, which forces a 512 byte block
  672. to be written.  The original echo writes 4 bytes, which apparently causes
  673. synchronous SCSI to go out to lunch.
  674.  
  675. Now, you ask, how can I fix this, since the system won't boot?  There are
  676. a couple of methods.  First, if possible, disable synchronous negotiation
  677. (1542 jumper J5-1 removed, plus whatever you may need to do to your drive).
  678. Then boot up, edit /sbin/bcheckrc, then shutdown, restrap for synchronous,
  679. then reboot.  Everything should be OK.
  680.  
  681. That's the easy way.  Unfortunately, some hard drives will only work
  682. in synchronous mode.  Well, you can still recover from this phenomenon.
  683. Here's how:
  684.  
  685.         1) Install on your hard drive
  686.         2) Boot from the first boot floppy.  When it tells you to, insert
  687.            the second boot floppy.  At the first prompt, hit <DEL> to
  688.            break out to a shell.
  689.         3) Mount your hard drive under /mnt with the following command
  690.            (replace FS-TYPE with s5, s52, or ufs, whichever you used for
  691.            for your root partition):
  692.  
  693.                 /etc/fs/FS-TYPE/mount /dev/dsk/c0t0d0s1 /mnt
  694.  
  695.         4) Now edit /mnt/sbin/bcheckrc:
  696.  
  697.                 ed /mnt/sbin/bcheckrc
  698.  
  699.            You may want the 'ed' man page handy (I barely remember how to
  700.            to use 'ed' :->).  For simplicity, you can delete/comment out
  701.            the offending line, then replace it with the correct line later.
  702.         5) Unmount the hard drive:
  703.  
  704.                 umount /mnt
  705.  
  706.         6) Reboot from the hard drive.  Everything should come up OK. and
  707.            you can finish editing /sbin/bcheckrc, if necessary.
  708.  
  709. Note that you perform these actions at your own risk.  The first version was
  710. performed by me on Microport SVR4, and the second was performed by someone
  711. else (on my suggestion) on ESIX SVR4."
  712.    This problem appears to be fixed on Consensys 1.3.
  713.  
  714. 4. ps chokes on commands that do SCSI I/O
  715.   Hugh Stearns <hoyt@isus.tnet.com> reports that in 4.0.3.6, ps
  716. doesn't work when a SCSI command in progress. It stops printing at the
  717. process executing the scsi command.
  718.  
  719. 5. Transfer speed problems with Adaptec 1542B on 486s
  720.   If a system mount or install fails, try setting the DMA speed to 5MB/s,
  721. rather than the default 5.7MB/s.  This is accomplished by removing the jumper
  722. shorting the 12th pin pair of jumper block 5.
  723.  
  724. IV. Development Tools Problems
  725.  
  726. 1. General UCB library brokenness
  727.    The BSD compatibility libraries were badly broken in USL code.  A Dell
  728. source adds "That meant that almost all the apps derived from them were broken
  729. too.  Most stuff like automount will die when you send a SIGHUP, instead of
  730. rereading the map file.  You can get a system into very strange states when
  731. that happens."
  732.    John Sully <jms@mport> of Microport opines: "This is a bug in automount
  733. itself rather than BSD compatibility, since the automount which comes with SVR4
  734. is not compiled with the BSD libraries.  (isn't this comforting??  :-()."
  735.  
  736.    Esix and UHC's BSD libraries are USL stock.  I don't yet know
  737. the status of other ports.  Microport has run into things they think may be
  738. symptoms of this but have no fix yet.
  739.  
  740.    John Sully <jms@mport> of Microport counters with: "One common thread I find
  741. on reading of these problems is that the BSD compatibility libraries are
  742. *misused*. [...] The problem is that BSD and SYSV have similarly named .h files
  743. which sometimes contain different definitions for objects with the same name.
  744. This has been known to cause all sorts of problems because the SYSV headers are
  745. picked up and then the calls are satisfied from the BSD library rather than the
  746. shared object library.  I have found that if you use /usr/ucb/cc that the BSD
  747. compatibility is much less broken than it would seem at first because it
  748. ensures that the correct headers are picked up."
  749.  
  750.    However, note that there is at least one *real* bug known --- as of 4.0.4
  751. the signal emulation cannot explicitly set a handler to SIG_DFL or SIG_IGN.
  752.  
  753.    Ron Guilmette <rfg@ncd.com> writes "[Library lossage] may be easily
  754. demonstrated by attempting to build and link the GNU C compiler with
  755. `-L/usr/ucblib -lucb'.  The resulting compiler will most certainly
  756. crash and die."  John Sully thinks this is because the /usr/ucb/cc
  757. compiler should have been used, but wasn't.
  758.  
  759. 2. USL emulation of BSD signals doesn't work
  760.    A different source reports that the the USL implementatation of BSD signals
  761. is broken in both 4.0.3 and 4.0.4; in particular, the sigvec() family doesn't
  762. work properly.  It is possible to make minor tweaks to source to make such apps
  763. work properly with the native USL signals implementation.
  764.  
  765.    Here's more on the signals problem, thanks to Richard <rc@siesoft.co.uk>:
  766. ------------------------------------------------------------------------------
  767. The problem is to do with the signal() function that is within the BSD
  768. compatability libc. 
  769.  
  770. To reproduce the problem do the following:
  771.  
  772. #include <stdio.h>
  773. #include <sys/types.h>
  774. #include <signal.h>
  775. #include <sys/siginfo.h>
  776.  
  777. main()
  778. {
  779.     signal(SIGPIPE,SIG_IGN);
  780.     pause();
  781. }
  782.  
  783. and compile it with cc xx.c -o xx /usr/ucblib/libucb.a
  784.  
  785. (John Sully observes that this is definitely wrong; /usr/ucb/cc should have
  786. been used rather than "cc ... -L/usr/ucblib -lucb" or the equivalent "cc ...
  787. /usr/ucblib/libucb.a".)
  788.  
  789. If you run the program and then signal it with a SIGPIPE, the program
  790. will die, even though you've told it to ignore SIGPIPE.
  791.  
  792. The fix is difficult unless you've got source cos there's a missing 'else'
  793. clause from the signal() code. This is the only signal fault I've found in
  794. the BSD signal functions, details of the rumoured sigvec problem would be
  795. useful?
  796.  
  797. If you're trying to compile an application you could change the application
  798. code to do the following, this does work..
  799.  
  800. void
  801. catch(s)
  802. int    s;
  803. {
  804.     /* DO NOTHING */
  805.     ;
  806. }
  807.  
  808. main()
  809. {
  810.     signal(SIGPIPE,catch);
  811.     pause();
  812. }
  813.  
  814. SUMMARY
  815. You can only change a signal handler to a function handler, any number of
  816. times.  Any attempt to set the handler to SIG_DFL, or SIG_IGN will fail.
  817.  
  818. This bug has given some people working with X11R5 aggro, causing the X server
  819. to die when you close a client. 
  820.  
  821.   Christoph Badura <bad@flatlin.ka.sub.org> confirms this bug
  822. He has sent USL a source fix.
  823. ------------------------------------------------------------------------------
  824.  
  825. 3. Possible string library problems
  826.    There are also persistent rumors of problems in the BSD-emulation string
  827. libraries.  I have not been able to pin down specifics on this.
  828.  
  829. 4. Compiler problems
  830.    Ronald Guilmette <rfg@ncd.com> also reports the following:
  831.  
  832. ------------------------------------------------------------------------------
  833. /* Here is a bug in the original SVR4 C compiler (aka C Issue 5) which
  834.    effectively prevents you from making good use of the `const' and
  835.    `volatile' qualifiers defined by ANSI C in conjunction with pointer
  836.    types and typedef statements.  Compile this code and you will get:
  837.  
  838.    "qualifiers.c", line 23: left operand must be modifiable lvalue: op "="
  839.  
  840.    ...if your copy of the svr4 C compiler still has the bug.  Note that
  841.    given these declarations, the ANSI C standard say that the thing pointed
  842.    to by the variable `pci' should be considered to be constant... not the
  843.    variable `pci' itself.  (The GCC compiler, either version 1.x or version
  844.    2.x, correctly compiles this example without complaint.)
  845. */
  846.  
  847. typedef const int *ptr_to_const_int;
  848.  
  849. ptr_to_const_int pci;
  850.  
  851. int i;
  852.  
  853. void main ()
  854. {
  855.   pci = &i;
  856. }
  857. ------------------------------------------------------------------------------
  858. /* Here is a subtle bug in the original SVR4 C compiler (aka C Issue 5)
  859.    which prevents you from first declaring a tagged type (i.e. a struct
  860.    type or a union type) in a parameter list, and then defining that tagged
  861.    type later on within the same scope.  (Note that according to the ANSI C
  862.    standard, the scope in which parameters get declared and the outermost
  863.    block of a function body are one and the same scope.  Thus, this really
  864.    is legal ANSI C code!)
  865.  
  866.    Try compiling this with your C compiler on SVR4.  If your compiler still
  867.    has the bug, you will get:
  868.  
  869.    "tagged_type.c", line 24: warning: dubious tag declaration: struct S
  870.    "tagged_type.c", line 28: warning: improper member use: i
  871.    "tagged_type.c", line 28: warning: improper member use: i
  872.    "tagged_type.c", line 31: warning: dubious tag declaration: struct S
  873.    "tagged_type.c", line 35: warning: improper member use: i
  874.    "tagged_type.c", line 35: warning: improper member use: i
  875.  
  876.    (The GCC compiler also had this bug in version 1.x, but it has been fixed
  877.    in version 2.x.)
  878. */
  879.  
  880. void foobar1 (arg)        /* use old-style without prototypes */
  881.     struct S *arg;
  882. {
  883.   struct S { int i; };        /* define the type `struct S' */
  884.  
  885.   arg->i = arg->i;        /* legal according to ANSI C rules! */
  886. }
  887.  
  888. void foobar2 (struct S *arg)    /* use new-style with prototypes */
  889. {
  890.   struct S { int i; };        /* define the type `struct S' */
  891.  
  892.   arg->i = arg->i;        /* legal according to ANSI C rules! */
  893. }
  894. ------------------------------------------------------------------------------
  895. /* Here is a serious bug in the original SVR4 `dump' program which dumps
  896.    out parts of object files in either plain hex form or symbolically.
  897.  
  898.    To see the `dump' program get a segfault and die, save this code under
  899.    the name `dump-bug.c' and then do:
  900.  
  901.     cc -g -c dump-bug.c
  902.     dump -v -D dump-bug.o
  903.  
  904.    The bug arises whenever `dump' tries to read Dwarf debugging information
  905.    for an array of pointers to any "user defined" type (e.g. `struct S' in
  906.    this example).  Past that point, `dump' is totally confused, so further
  907.    Dwarf debugging information finally causes it to go belly-up.
  908. */
  909.  
  910. struct S { int i; };
  911. struct S *array[10];
  912. int j;
  913. ------------------------------------------------------------------------------
  914. It appears that the svr4 C compiler (for x86 machines) doesn't conform real
  915. well to either the letter or the spirit of the IEEE 754 floating-point
  916. standard.  In particular, "unordered comparisons" and other operations on
  917. NaNs don't always produce the result that that the IEEE 754 standard calls
  918. for.
  919.  
  920. An AT&T source comments: "This is documented in the SVID as a future direction.
  921. We do not support NaNs in -Xa and -Xt modes, only in -Xc.  Try
  922. isnan(sqrt(-1.0)) to determine which modes support it."
  923. ------------------------------------------------------------------------------
  924.  
  925. The compiler fails to issue diagnostics for cases where a floating point
  926. literal is given which exceeds the range of its type (either float or
  927. double).  Actually this one could be argued either way, since IEEE FP
  928. format includes "infinities" and the compiler probably just changes any
  929. FP value which is out of range for its type into either positive infinity
  930. or negative infinity (as appropriate).
  931.  
  932. The compiler fails to issue diagnostics in cases where a typedef name is
  933. reused to declare a formal parameter, as in:
  934.  
  935. -----------------------------------------------------------------------
  936. typedef int FOO;
  937. void bar (FOO)
  938.     int FOO;
  939. {
  940. }
  941. -----------------------------------------------------------------------
  942.  
  943. The compiler crashes on the following invalid input:
  944.  
  945. -----------------------------------------------------------------------
  946. int i;
  947. volatile void *pvv;
  948.  
  949. void pvv_test ()
  950. {
  951.   (i ? *pvv : *pvv);    /* ERROR */
  952. }
  953. -----------------------------------------------------------------------
  954.  
  955. The compiler fails to issue diagnostics for cases where an attempt is
  956. made to "forward declare" an enum type (without also defining it), as
  957. in:
  958.  
  959. -----------------------------------------------------------------------
  960. enum enum0 *ep;       /* ERROR */
  961. -----------------------------------------------------------------------
  962.  
  963. The compiler rejects the following code with an error, although there
  964. seems to be no good reason why it should (because no object is being
  965. declared).
  966.  
  967. -----------------------------------------------------------------------
  968. #include <limits.h>
  969.  
  970. typedef char array_type[ULONG_MAX];
  971. -----------------------------------------------------------------------
  972.  
  973.    Both 4.0.3 and 4.0.4 USL versions are missing the documented dial.h
  974. file from their /usr/include directory.  Dell 2.1 has it.
  975.  
  976.    Anthony Shipman <als@bohra.cpg.oz.au> reports: " I found the following bug
  977. in SCO Unix 3.2.* and I think it may be common to many AT&T derived Unixes.
  978.  
  979. sscanf() calls _doscan() to read from a pretend file.  The file
  980. uses the string as a buffer and a fake file descriptor of 60 (=_NFILE).  
  981. Since _NFILE (for SCO UNIX) is 60 it assumes that fd 60 can never be open.
  982.  
  983. Then when fscanf() hits the end of the string it calls _filbuf() to read
  984. into the buffer (which is the string) from fd 60.  This should fail with
  985. an errno=9 and then _filbuf() sets EOF and it all terminates.
  986.  
  987. However in SCO Unix you can reconfigure the kernel to increase the number
  988. of files per process to a recommended maximum of 150.  If you do this then
  989. your program might have fd 60 open one day.  Then sscanf() will read from this
  990. file overwriting your string.  The byte count to the read() in _filbuf() 
  991. is some undefined but large value so a lot of memory will be overwritten.  In
  992. my case the string was on the stack so my stack was wiped.
  993.  
  994. In short if you configure your kernel to have NOFILES > _NFILE ie more than
  995. the default then sscanf() is a time bomb in your code."
  996.  
  997. V. The FUBYTE bug
  998.  
  999. (Thanks to Christoph Badura <bad@flatlin.ka.sub.org> for this info)
  1000.  
  1001. The kernel function fubyte() is documented to return a positive value when
  1002. given a valid user space address and -1 otherwise. In the latter case u.u_error
  1003. is set to EFAULT.  USL SysV R4.0.3 has a sign extension bug in the
  1004. implementation of fubyte() for local file descriptors (i.e. not opened via
  1005. RFS), which causes fubyte() to return negative values if the byte fetched has
  1006. its high bit set. This bug doesn't affect STREAMS drivers, as they don't call
  1007. (and in fact are normally unable to call) fubyte().  Thus writing a byte with
  1008. the high bit set to certain character device drivers returns with -1 and errno
  1009. set to EFAULT.
  1010.  
  1011. The bug may affect any character device driver that calls fubyte(). It's not
  1012. limited to serial card drivers. The bug is noticed most often with serial card
  1013. drivers, since uucp uses byte values > 127 very early during g-protocol setup
  1014. and drivers for serial cards tend to use fubyte() quite often.
  1015.  
  1016. Note also that the bug's effect is different if the driver checks for a -1
  1017. return value of fubyte() or just a negative one. In the former case it is
  1018. possible to pass bytes with the 8 bit set through fubyte(), except for 0xff
  1019. which is -1 in two's complement. That makes the bug more obscure.
  1020.  
  1021. The fix is easy.  First, make a backup copy of the kernel object file
  1022. /etc/conf/pack.d/kernel/vm.o!  A disassembly of vm.o(lfubyte) should reveal
  1023. *exactly* one mov[s]bl (move byte to long w/sign extend).  That one needs to be
  1024. patched into a movzbl (zero extend). The difference is one bit in the second
  1025. byte of the opcode.
  1026.  
  1027. The movsbl has the bit pattern 00001111 1011111w mod/rm-byte.
  1028. The movzbl has the bit pattern 00001111 1011011w mod/rm-byte.
  1029.  
  1030. The 'w' bit is 0 for the instruction in question. So the opcodes are 0f be and
  1031. 0f b6. Here is the diff -c from dis -F lfubyte showing the patch applied to
  1032. the Dell 2.1 kernel:
  1033.  
  1034. *** vm.o    Mon Mar  9 00:31:38 1992
  1035. --- vm.o.org    Mon Mar  9 00:32:40 1992
  1036. ***************
  1037. *** 22,28 ****
  1038.       11c90:  85 c0                 testl  %eax,%eax
  1039.       11c92:  75 09                 jne    0x9 <11c9d>
  1040.       11c94:  8b 45 08              movl   8(%ebp),%eax
  1041. !     11c97:  0f b6 00              movzbl (%eax),%eax
  1042.       11c9a:  89 45 fc              movl   %eax,-4(%ebp)
  1043.       11c9d:  c7 05 d8 13 00 00 00 00 00 00 movl   $0x0,0x13d8
  1044.       11ca7:  83 3d dc 13 00 00 00  cmpl   $0x0,0x13dc
  1045. --- 22,28 ----
  1046.       11c90:  85 c0                 testl  %eax,%eax
  1047.       11c92:  75 09                 jne    0x9 <11c9d>
  1048.       11c94:  8b 45 08              movl   8(%ebp),%eax
  1049. !     11c97:  0f be 00              movsbl (%eax),%eax
  1050.       11c9a:  89 45 fc              movl   %eax,-4(%ebp)
  1051.       11c9d:  c7 05 d8 13 00 00 00 00 00 00 movl   $0x0,0x13d8
  1052.       11ca7:  83 3d dc 13 00 00 00  cmpl   $0x0,0x13dc
  1053.  
  1054. Of course there is a workaround at the driver level.  Canonically, one would do
  1055. this by checking for fubyte() returning -1 *and* u.u_error being set to EFAULT
  1056. (u.u_error is cleared upon entering a system call).  However, in R4.0.3
  1057. fubyte() does NOT set u.u_error.  It *does* set u.u_fault_catch.fc_errno.
  1058.  
  1059. Cristoph reports that Dell V.4 can be object-patched successfully to fix this.
  1060. I'm told that the offending 11c97 is at exactly the same address in the
  1061. Consensys 1.3 kernel.  I do not know the status of the other ports.
  1062.  
  1063. Another poster (Marc Boucher <marc@cam.org>) adds:
  1064.  
  1065. On ESIX SVR4.0.3 Rev. A, the instruction movsbl in question can be changed to
  1066. movzbl (as described above) with a binary-editor on file
  1067. /etc/conf/pack.d/kernel/vm.o. At offset 0x11eb0, change 0xbe to 0xb6.
  1068.  
  1069. Before patching, verify that your /etc/conf/pack.d/kernel/vm.o is the same as
  1070. mine!  On my system, the /bin/sum generated checksum of vm.o was "4440 222".
  1071.  
  1072. The problem results from a sign-extension bug.  The function lfubyte(), which
  1073. is called by fubyte(), is declared as
  1074.  
  1075. int lfubyte(char *addr);    /* actually caddr_t */
  1076.  
  1077. The byte is fetched with
  1078.  
  1079.     val = *addr;
  1080.  
  1081. which triggers sign extension.  Casting addr to a unsigned char * or declaring
  1082. it as such solves the problem.
  1083.  
  1084. This bug is still present in stock USL 4.0.4.
  1085.  
  1086. DESTINY AND DELL
  1087.  
  1088. A source at at UNIX System Labs Europe claims that `Destiny' (the new Release
  1089. 4.2) incorporates all of Dell UNIX's fixes to 4.0.3; thus, any bug for which a
  1090. Dell fix is indicated above should be gone in Destiny.
  1091. --
  1092.     Send your feedback to: Eric Raymond = esr@snark.thyrsus.com
  1093.