"Bus error" or "Segmentation Fault" By ps command

"Bus error" or "Segmentation Fault" By ps command

Post by Essi J » Sat, 29 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.
-------------------------------------------------------------------------------

 
 
 

"Bus error" or "Segmentation Fault" By ps command

Post by Quentin Fennes » Sat, 29 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

Essi Jun-
        I will hazard a guess that the kernel you booted the system from
is not the kernel in the file /vmunix.  Compare uptime (time of boot)
with the time on /vmunix.  If /vmunix is newer than the boot time
you may have found the problem.  The solution is to boot using the
kernel in /vmunix.

        If you still have the kernel around that you booted from you can
try using that with ps:

        $ ps aux /vmunix.old

--
Quentin Fennessy                        AMD, Austin Texas

 
 
 

"Bus error" or "Segmentation Fault" By ps command

Post by Martin Hargreav » Wed, 03 Jul 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
>Essi Jun-
>    I will hazard a guess that the kernel you booted the system from
>is not the kernel in the file /vmunix.  Compare uptime (time of boot)
>with the time on /vmunix.  If /vmunix is newer than the boot time
>you may have found the problem.  The solution is to boot using the
>kernel in /vmunix.

If it only happens under load, it could be ps failing to get the data
it wanted from the kernel. The poster mentions it's a SPARC 20 running
4.1.4 - if it's multi-cpu 4.1.4 may have trouble with it under load.

I'd guess that it's either multi-cpu, or heavily loaded and ps is
getting bad data, or losing at it's system calls. Quentin's idea is
most likely right though, I'm just speculating in the case that you
are running the same kernel as /vmunix.

M.

##################################################################

# Director, Datamodel Ltd                                Chemist #
# Contract Unix system admin/Unix security              Sysadmin #  
##################################################################