RE: SIGSEGV issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

I have been to catch the place where the SIGSEGV occurs, I hope this stack
trace will help you:

Program received signal SIGSEGV, Segmentation fault.
0x0004a284 in TCPServer.HMCServer.selectEventLoop() () at
TCPServer/HMCServer.java:1849
1849                            int nReadBytes =
client.read(info.m_readBuff);
Current language:  auto; currently java
(gdb) bt
#0  0x0004a284 in TCPServer.HMCServer.selectEventLoop() () at
TCPServer/HMCServer.java:1849
#1  0x0004ba34 in TCPServer.HMCServer.run() () at
TCPServer/HMCServer.java:2055
#2  0x00134068 in _Jv_ThreadRun (thread=@402a9780)
    at
/opt/test/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-4.1.2-glibc-2.3.2/g
cc-4.1.2/libjava/java/lang/natThread.cc:297
#3  0x00137aa4 in really_start (x=@40267fd8)
    at
/opt/test/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-4.1.2-glibc-2.3.2/g
cc-4.1.2/libjava/posix-threads.cc:432
#4  0x002a01a0 in GC_start_routine (arg=<value optimized out>)
    at
/opt/test/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-4.1.2-glibc-2.3.2/g
cc-4.1.2/boehm-gc/pthread_support.c:1192
#5  0x40032a74 in pthread_start_thread () from /nfsroot/lib/libpthread.so.0
#6  0x40032aec in pthread_start_thread_event () from
/nfsroot/lib/libpthread.so.0

Best Regards,
David Sayada.

-----Original Message-----
From: Andrew Haley [mailto:aph-gcc@xxxxxxxxxxxxxxxxxxx] 
Sent: Thursday, August 30, 2007 11:52 AM
To: David Sayada
Cc: classpath@xxxxxxx; 'Amnon David'
Subject: RE: SIGSEGV issue

David Sayada writes:

 > To better understand what you are asking:
 > 
 > - I need to look at the gcc-4.1.2 source to see if
 > gnu.java.nio.ServerSocketChannelImpl inherits from
 > java.nio.channels.SocketChannel?

Sure.  In particular, we need to know where exactly the code is that
throws this exception.

I see this:

public final class ServerSocketChannelImpl extends ServerSocketChannel
public abstract class ServerSocketChannel extends AbstractSelectableChannel
public abstract class AbstractSelectableChannel extends SelectableChannel
public abstract class SelectableChannel extends AbstractInterruptibleChannel
public abstract class AbstractInterruptibleChannel
  implements Channel, InterruptibleChannel

so it looks to me like this exception is correctly thrown.  

The cause is very likely:

classpath/gnu/java/nio/SelectorImpl.java:292:                     if
(((SocketChannel) key.channel ()).isConnected ())

but that code is surrounded by 

			if (key.channel() instanceof SocketChannel)

so it's very weird.


 > - "This is caused by a bug somewhere when generating stack traces",
 > you mean in classpath or libgcj in my case. I must then return you
 > an indication in your code? This is a bug of yours?

Mine personally?  I doubt it.  The bug is probably in the ARM-specific
code.  We won't know until you've run the program in gdb and let us
see where the SEGV occurs.

Andrew.

 > -----Original Message-----
 > From: Andrew Haley [mailto:aph-gcc@xxxxxxxxxxxxxxxxxxx] 
 > Sent: Thursday, August 30, 2007 10:48 AM
 > To: David Sayada
 > Cc: classpath@xxxxxxx; 'Amnon David'
 > Subject: RE: SIGSEGV issue
 > 
 > David Sayada writes:
 >  > Hi Andrew,
 >  > 
 >  > In fact, the exception I am receiving is the following one:
 >  > 
 >  > java.lang.ClassCastException: 
 >  > > gnu.java.nio.ServerSocketChannelImpl cannot be cast to
 >  > java.nio.channels.SocketChannel
 >  > 
 >  > What can make such an exception to occur?
 > 
 > Does gnu.java.nio.ServerSocketChannelImpl inherit from
 > java.nio.channels.SocketChannel?  Have a look.
 > 
 >  > Also can it cause an application to terminate with signal SIGSEGV?
 > 
 > No.  This is caused by a bug somewhere when generating stack traces.
 > You need to run our app under gdb and tell us exactly where the segv
 > happens.
 > 
 > Andrew.
 > 



[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux