kvm_open causes hardware error on Solaris 2.5?

kvm_open causes hardware error on Solaris 2.5?

Post by Georgia W. Gaudett » Thu, 03 Apr 1997 04:00:00



This is a multi-part message in MIME format.

---------------------------------120852368321755
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

To anyone that can help!  I've talked to sun to no avail.  The following is a copy of
a dbx session that shows the problem that I'm running into.  It seems that kvm_open
using the default parameters gives me a hardware error.  I'm confused.  What am I
doing wrong?  Any help would be GREATLY APPRECIATED!  This code is just a test to be
integrated with my project when it works.  The system that it was run on is a SPARC
20 running Solaris 2.5.

---------------------------------120852368321755
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

    1   /*******************************************************************/
    2   /* This will be used to test SUN functions for Orakill, clfp/tcncl.*/
    3   /*******************************************************************/
    4
    5
    6   #include <stdio.h>
    7   #include <errno.h>
    8   #include <kvm.h>
    9   #include <sys/param.h>
   10   #include <sys/time.h>
   11   #include <sys/proc.h>
   12   #include <fcntl.h>
   13
   14   int rc, pid;
   15   char *namelist, *corefile, *swapfile, *errstr;
   16   struct _kvmd *kd;
   17   struct proc *ppt;
   18
   19
   20   int main ()
   21   {
   22
   23           namelist = "/dev/ksyms";
   24           corefile = "/dev/kmem";
   25           swapfile = "/tmp";
   26           errstr = "Joe's process";
   27
   28           kd = kvm_open(namelist, corefile, swapfile, O_RDONLY, errstr);
(dbx) list
   29
   30           printf("This is the value of errno = %d \n",errno);
   31           printf("This is the value of kd = %x \n",kd);
   32
   33           ppt = kvm_nextproc(kd);
   34
   35           rc = kvm_close(kd);  /* Close the kernel */
   36           exit();
   37   }
(dbx) stop at 28
(2) stop at "kvm_test.c":28
(dbx) run
Running: a.out
setuid program exec()ed. Reattaching
(process id 23260)
stopped in main at line 28 in file "kvm_test.c"
   28           kd = kvm_open(namelist, corefile, swapfile, O_RDONLY, errstr);
(dbx) step
signal BUS (object specific hardware error) in condensed_setup at 0xef793ae8
condensed_setup+0x60:   ld      [%i4], %o0
Current function is main
   28           kd = kvm_open(namelist, corefile, swapfile, O_RDONLY, errstr);
(dbx) print corefile
corefile = 0x20d78 "/dev/kmem"
(dbx) print namelist
namelist = 0x20d6c "/dev/ksyms"
(dbx) print swapfile
swapfile = 0x20d84 "/tmp"
(dbx) print errstr
errstr = 0x20d8c "Joe's process"
(dbx)
---------------------------------120852368321755--

 
 
 

kvm_open causes hardware error on Solaris 2.5?

Post by Georgia W. Gaudett » Thu, 03 Apr 1997 04:00:00


This is a multi-part message in MIME format.

---------------------------------97371368721533
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

To anyone that can help!  I've talked to sun to no avail.  The following is a copy of
a dbx session that shows the problem that I'm running into.  It seems that kvm_open
using the default parameters gives me a hardware error.  I'm confused.  What am I
doing wrong?  Any help would be GREATLY APPRECIATED!  This code is just a test to be
integrated with my project when it works.  The system that it was run on is a SPARC
20 running Solaris 2.5.

---------------------------------97371368721533
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

    1   /*******************************************************************/
    2   /* This will be used to test SUN functions for Orakill, clfp/tcncl.*/
    3   /*******************************************************************/
    4
    5
    6   #include <stdio.h>
    7   #include <errno.h>
    8   #include <kvm.h>
    9   #include <sys/param.h>
   10   #include <sys/time.h>
   11   #include <sys/proc.h>
   12   #include <fcntl.h>
   13
   14   int rc, pid;
   15   char *namelist, *corefile, *swapfile, *errstr;
   16   struct _kvmd *kd;
   17   struct proc *ppt;
   18
   19
   20   int main ()
   21   {
   22
   23           namelist = "/dev/ksyms";
   24           corefile = "/dev/kmem";
   25           swapfile = "/tmp";
   26           errstr = "Joe's process";
   27
   28           kd = kvm_open(namelist, corefile, swapfile, O_RDONLY, errstr);
(dbx) list
   29
   30           printf("This is the value of errno = %d \n",errno);
   31           printf("This is the value of kd = %x \n",kd);
   32
   33           ppt = kvm_nextproc(kd);
   34
   35           rc = kvm_close(kd);  /* Close the kernel */
   36           exit();
   37   }
(dbx) stop at 28
(2) stop at "kvm_test.c":28
(dbx) run
Running: a.out
setuid program exec()ed. Reattaching
(process id 23260)
stopped in main at line 28 in file "kvm_test.c"
   28           kd = kvm_open(namelist, corefile, swapfile, O_RDONLY, errstr);
(dbx) step
signal BUS (object specific hardware error) in condensed_setup at 0xef793ae8
condensed_setup+0x60:   ld      [%i4], %o0
Current function is main
   28           kd = kvm_open(namelist, corefile, swapfile, O_RDONLY, errstr);
(dbx) print corefile
corefile = 0x20d78 "/dev/kmem"
(dbx) print namelist
namelist = 0x20d6c "/dev/ksyms"
(dbx) print swapfile
swapfile = 0x20d84 "/tmp"
(dbx) print errstr
errstr = 0x20d8c "Joe's process"
(dbx)
---------------------------------97371368721533--

 
 
 

kvm_open causes hardware error on Solaris 2.5?

Post by Casper H.S. Dik - Network Security Engine » Fri, 04 Apr 1997 04:00:00



Quote:>To anyone that can help!  I've talked to sun to no avail.  The following is a copy of
>a dbx session that shows the problem that I'm running into.  It seems that kvm_open
>using the default parameters gives me a hardware error.  I'm confused.  What am I
>doing wrong?  Any help would be GREATLY APPRECIATED!  This code is just a test to be
>integrated with my project when it works.  The system that it was run on is a SPARC
>20 running Solaris 2.5.

You're not using the default parameters.

The default parameters are:

        kvm_open(NULL, NULL, NULL, <flag>, "error string");

Quote:>   25           swapfile = "/tmp";

/tmp is not a swap file; it's teh mountpoint of a virtual memory based
filesystem that has *ntohing* to do with swap (other than that it uses
memory from swap).

The manual really tells you to use "NULL" for the parameters to kvm_open
i fyou want to access the runnign kernel.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

1. Solaris 2.3 prog exiting on kvm_open call on solaris 2.5

 I am having a problem in running a server program compiled
 on Solaris 2.3  exiting on Solaris 2.5 but working on
 on Solaris 2.3 2.4.
       The program was compiled using Sparc c++ compiler
 linking libkvm dynamically.But the program fails on

 kvm_open("/kernel/unix", "/dev/mem", (char *) NULL, O_RDONLY, "kvm_open (swap)")
 giving error

 kvm_open (swap): cannot open /kernel/unix: No such file or directory
 and there is no /kernel/unix directory.
 Thanks in advance for any help.
best regards,
Gokul
----------------------------------------------------------------------------

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

2. considering linux...

3. lp / lpadmin options ignored in Solaris 2.5 and cause error in 2.6

4. sgml2txt inconsistency

5. patch can solve the problem of kvm_open error on solaris 2.8?

6. Menu Problems and Hyperlink Problems in Applix/KDE

7. solaris 2.8,kvm_open() call error!

8. WaveLan problem

9. FS: Solaris 2.5 Desktop (CDE) and/or Solaris 2.5 Server Packages for x86 desktops

10. UltraSPARCs and Solaris 2.5 and Hardware 1/96?

11. Solaris 2.5 Hardware 1/96?

12. Solaris 2.5 x86 upgrade and hardware config problems

13. Looking for CDR software and hardware for Solaris 2.5 sparc