HP3000-L Archives

September 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Mike Yawn <[log in to unmask]>
Date:
Sun, 27 Sep 1998 17:57:01 PDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (112 lines)
Alan,

I don't offhand know of any problem in the network code that would
cause a SIGBUS.  Off the top of my head, the only thing I know that
causes a SIGBUS is trying to run the 1.1.5 VM while using the
1.2beta class libraries, and it's a pretty good bet you're not
doing that unless you've been downloading stuff directly from
Sun and trying to put it on your 3000.

I can give you some general-purpose troubleshooting tips that will
probably help zero in on the problem, though:

1.  Running java_g, rather than java, will result in the 'debug'
    version of Java being used.  It has quite a bit more assertion-type
    testing and frequently identifies problems that aren't apparent
    from running Java.

2.  Run java from the MPE Command Interpreter, rather than the shell,
    MPE error messages are almost always more descriptive than the
    POSIX error messages.  Instead of SIG BUS, you're likely to get
    a different message more indicative of where the problem is.

3.  Run java in verbose mode (pass -v or -verbose as a command line
    argument).  Although it won't give you any more information
    about the failure itself, you will get more info about exactly
    what the program was doing when it failed -- trying to load the
    libnet.sl library, or trying to create a socket, or trying to
    write to the socket, etc.

4.  Turn on logging.  Logging is only available with java_g; you
    turn it on by passing a -lNN command line option.  That's a
    lower case L, not a one; followed by a number from 1 to 15.
    -l1 often gives you all the info you need; if not, -l5 should
    be sufficient.  -l15 is so detailed that you'll be watching
    a trivial program run for hours.

5.  Turn on tracing.  There is method level tracing (-tm) and
    instruction level tracing (-t).  Again, life's too short to
    do instruction-level tracing of anything more complex than
    Hello, World.

A lot of these things are more useful in debugging the VM itself
than in debugging application-level failures, but I feel like you
can never have too many tools in your bag of tricks, so you might
want to play with any or all of these to get a feel for the kind
of information they can provide you.

Mike

>
> Sent to: hp3000-l, sig-java interex listserv
>
> And now for some non-tape or 700/92 terminal questions (friday hp3000-l
> discussions)...
>
> Now I have Java running, I want to use it.  I think that sounds
> resonable. :)
>
> I have typed in a chat client/server program that I got from the day
> long seminar at HPWorld.  The presenter was not a 3000 type, but Java
> should be Java right?
>
> The program is failing with a SIGBUS error when it tries to open a
> listener on a server socket:
> -----------------------------------------------
> shell/iX> java ChatTest
> No Floating-Point coprocessor, disabling JIT
> Enter main
> SIGBUS    10*  bus error
> Sig = 10; code = 18.
>
> Full thread dump:
> [skip dump since it is rather large]
> -----------------------------------------------
> I stripped the program down just to get the bare minimum and here it
> is...
>
> import java.io.*;
> import java.net.*;
> import java.util.*;
>
> public class ChatTest {
>
>  public static void main( String arg[]) {
>      try {
> System.out.println("Enter main");
> ServerSocket s = new ServerSocket (1234);
> System.out.println("After get socket: ");
> System.out.flush();
>          }
>      catch(IOException e) { System.out.println("Exception: "+ e); }
>  }
> }
>
> ----------------------
>
> Do I need to set anything up from a networking standpoint?  I have used
> different port numbers, but if that was the failure, I would expect the
> IOException to be thrown.
>
> It isn't security/permissions since I can be an SM and get the same
> message.
>
> Any ideas?
>
> /alan
> [log in to unmask]
>
> Alan "Can't wait for the weekend to work on Java this week." Ambers
>
>

ATOM RSS1 RSS2