Hi,

I have installed openmpi-1.9.0a1git99c3999 on my machines with
Sun C 5.12 and gcc-4.9.1 and I still get SIGSEGV for my small
Java program. Furthermore I get "select: Interrupted system call"
as you can see below. I use Java-1.8.0. The error appears on
Solaris 10 Sparc and Solaris 10 x86_64.

tyr java 104 ompi_info | grep -e MPI: -e "C compiler:"
                Open MPI: 1.9.0a1
              C compiler: cc
tyr java 105 mpijavac InitFinalizeMain.java
warning: [path] bad path element
  "/usr/local/openmpi-1.9_64_cc/lib64/shmem.jar":
  no such file or directory
1 warning
tyr java 106 


"oshmem" is only available on Linux. Is it possible that you omit
"shmem.jar" on other platforms like Solaris to avoid the above
warning, if you use "mpijavac -deprecation -Xlint:all"?


tyr java 107 /usr/local/gdb-7.6.1_64_gcc/bin/gdb mpiexec
...
(gdb) run -np 1 java InitFinalizeMain 
Starting program: /usr/local/openmpi-1.9_64_cc/bin/mpiexec
  -np 1 java InitFinalizeMain
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New LWP    2        ]
select: Interrupted system call
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xffffffff7ea3c7f0, pid=12461, tid=2
...


Unfortunately I wasn't able to set any breakpoints in my Java
program, so that I couldn't use gdb to get more information.
Therefore I modified my program in the following way to get an
idea where the "Interrupted system call" happened.

tyr java 112 cat InitFinalizeMain.java
import mpi.*;
public class InitFinalizeMain
{
  public static void main (String args[]) throws MPIException
  {
    System.out.println ("Before MPI.Init()");
    MPI.Init (args);
    System.out.println ("After MPI.Init()");
    System.out.print ("Hello!\n");
    MPI.Finalize ();
  }
}
tyr java 113 




tyr java 116 /usr/local/gdb-7.6.1_64_gcc/bin/gdb mpiexec
GNU gdb (GDB) 7.6.1
...
(gdb) run -np 1 java InitFinalizeMain 
Starting program: /usr/local/openmpi-1.9_64_cc/bin/mpiexec
  -np 1 java InitFinalizeMain
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New LWP    2        ]
select: Interrupted system call
Before MPI.Init()
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xffffffff7ea3c7f0, pid=12578, tid=2
...


It seems that "Interrupted system call" happens before I call
the first MPI function, i.e., in "mpiexec" (?). If that's true,
then the "SIGSEGV" may happen, because my Java program hasn't
been started correctly. Do you agree? How do you debug a Java
program using MPI with gdb? I would be grateful, if somebody
can tell me how I must start/prepare the program so that I can
use "list" to see the source code of my class file and to set
proper breakpoints.

I also tried my program with our former Java version which I
used for all test programs which I ported from C to Java.
Unfortunately I got the same error.


tyr java 118 /usr/local/gdb-7.6.1_64_gcc/bin/gdb mpiexec
...
(gdb) run -np 1 java InitFinalizeMain 
Starting program: /usr/local/openmpi-1.9.0_64_cc/bin/mpiexec
  -np 1 java InitFinalizeMain
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New LWP    2        ]
Before MPI.Init()
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xffffffff7e93c7f0, pid=2351, tid=2
#
# JRE version: 7.0_07-b10
...
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /usr/local/openmpi-1.9.0_64_cc/bin/mpiexec
  -np 1 java InitFinalizeMain
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New LWP    2        ]
select: Interrupted system call
Before MPI.Init()
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xffffffff7e93c7f0, pid=2383, tid=2
...


The error "Interrupted system call" doesn't happen every time,
but "SIGSEGV" happens even with our older Java version, so that
these problems are probably unrelated after all. Are you still
interested to solve the problem or have you abandoned Solaris?
What can I do to help you, if you are still interested in
Solaris for at least openmpi-1.8.x? Thank you very much for any
help and any comments in advance.


Kind regards

Siegmar

Reply via email to