ps command failed and produced "Bus error" or "Segmentation fault" messages

ps command failed and produced "Bus error" or "Segmentation fault" messages

Post by Essi J » Thu, 27 Jun 1996 04:00:00



Hi, Unix Gurus

    I have some problem with ps command
that you surely solve.

    The problem is as follows
    When My system's load gets a little bit heavy
and I type the "ps" command, the system echos as below

    unix prompt> ps aux
      PID TT STAT  TIME COMMAND
    Segmentation fault              => I wonder why it fails

    unix prompt> ps auxw
      PID TT STAT  TIME COMMAND
    Bus error                       => I wonder why it fails

    unix prompt> ps a
      PID TT STAT  TIME COMMAND
    Bus error                       => I wonder why it fails

    unix prompt> ps cax             => ps with command-only-display option "c"
      PID TT STAT  TIME COMMAND        always works
     0 ?  D     0:23 swapper
     1 ?  IW    0:00 init
    62 ?  IW    0:00 keyserv
    (omitted)
    13051 co IW    0:00 xinit
    13052 co S    77:37 Xsun
    13053 co IW    0:00 sh
    13059 co S     0:01 xclock
    13060 co S     0:11 xautolock
    13061 co S     1:42 fvwm
    13230 co S     0:03 GoodStuff
    (ommitted)

    And My system is the SPARC20 and its OS is updated
to SunOS 4.1.4 by the Administrator recently.
When its OS was SunOS 4.1.3, there was no problem with ps
in the relation to the system load.

    Surely when there is no process consuming the CPU resource
voraciously(i.e greater than 50%), ps is working fine with any option
I guess that ps get difficulties to read /dev/kmem, /dev/drum, /vmunix
when the system gets overloaded, but I surely don't know exactly why
and how can I fix the problem.

    For the reference, here are some bits about the case.

    unix prompt>  ls -l /usr/bin/ps
    lrwxrwxrwx  1 root            9 Jun 12 03:40 /usr/bin/ps -> ../kvm/ps

    unix prompt>  ls -l /usr/kvm/ps
    -rwxr-sr-x  1 root        40984 Dec 10  1994 /usr/kvm/ps

    unix prompt>  ls -l /dev/{drum,kmem} /vmunix
    crw-r-----  1 root       7,   0 Jun 12 04:05 /dev/drum
    crw-r-----  1 root       3,   1 Jun 12 04:05 /dev/kmem
    -rwxr-xr-x  1 root      2248839 Jun 12 04:04 /vmunix

    Thanks for your time and I would really
appreciate your explanation and solution:-)
    The Posting or E-mail would be great.

    Thanks in advance.

--
-------------------------------------------------------------------------------

Design Lab 1, System IC R&D, Hyundai Electronics
San 136-1, Ami-ri, Bubal-eub, Ichon, Kyoungki-do, 467-701 Korea
Jones's First Law:
        Anyone who makes a significant contribution to any field of
        endeavor, and stays in that field long enough, becomes an
        obstruction to its progress -- in direct proportion to the
        importance of their original contribution.
-------------------------------------------------------------------------------

 
 
 

ps command failed and produced "Bus error" or "Segmentation fault" messages

Post by Kyle M Forb » Tue, 02 Jul 1996 04:00:00


[snip]
:     unix prompt> ps aux
:       PID TT STAT  TIME COMMAND
:     Segmentation fault              => I wonder why it fails
[snip]

  No answers here, but I got this same problem when I upgraded to
Linux 2.0.  It wasn't a segmentation or bus error.  Rather, it was
a floating point exception.  My solution: revert back to the version that
works.

                                - Kyle

  ----------------------------------------------------------------------
    Kyle M Forbes                                 Systems Administrator

                                                  (402) 472 - 7556
    Grace Me Guide
  ----------------------------------------------------------------------

 
 
 

ps command failed and produced "Bus error" or "Segmentation fault" messages

Post by Kevin Fenz » Tue, 02 Jul 1996 04:00:00




> [snip]
> :     unix prompt> ps aux
> :       PID TT STAT  TIME COMMAND
> :     Segmentation fault              => I wonder why it fails
> [snip]

>   No answers here, but I got this same problem when I upgraded to
> Linux 2.0.  It wasn't a segmentation or bus error.  Rather, it was
> a floating point exception.  My solution: revert back to the version that
> works.

or you could read the linux/Documentation/Changes.txt file that comes
with the 2.0 kernel. This will inform you that amongst the other
things you need to upgrade when going to 2.0, you also need to upgrade
the procps package to 0.99a or later. There were kernel process
structures that changed between 1.2.x and 2.0, so the old ps/top/et al
don't work right.

Quote:>                            - Kyle

kevin
--


WWW -> http://scrye.com/~kevin/


 
 
 

ps command failed and produced "Bus error" or "Segmentation fault" messages

Post by Brad Littlejo » Wed, 03 Jul 1996 04:00:00




: [snip]
: :     unix prompt> ps aux
: :       PID TT STAT  TIME COMMAND
: :     Segmentation fault              => I wonder why it fails
: [snip]
:
:
:   No answers here, but I got this same problem when I upgraded to
: Linux 2.0.  It wasn't a segmentation or bus error.  Rather, it was
: a floating point exception.  My solution: revert back to the version that
: works.
:
:                               - Kyle

        It might have helped if you had RTFM'ed before you upgraded your
kernel. This problem has already been covered over a thousand times.. your
answer exists in the file /usr/src/linux/Documentation/Changes. This file also
exists in the kernel 2.0 Hierarchy. I'd SERIOUSLY recommend reading that
before using any kernel higher than 2.0, or better yet, 1.3.53 in the
development series. Also, check out the comp.os.linux.* hierarchy for more
linux-OS related problems.. you'll find your answer faster there..

                        Ta! :)
                                                        BL.
--