activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek <>
Subject ActiveMQ Client Crashing when called from JNI
Date Mon, 17 Mar 2014 05:30:52 GMT

I have written a JMS Client, a plain Java Application using the Active MQ as
the JMS Broker.
I am not using the ActiveMQ's inbuilt facility of managing failover but have
written that piece of code myself. The code works fine when run as a pure
java application, but when I am invoking the same code from JNI ( from my
C++ App) it crashes ( generates segmentation fault ). The crash is observed
mostly when I connect/disconnect the Broker. Here is the PStack of the
segmentation fault generated.

Stack: [0x00007f26fc4c0000,0x00007f26fc5c1000],  sp=0x00007f26fc5bf4e0, 
free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
V  []  void
V  []  PSScavengeRootsClosure::do_oop(oopDesc**)+0x30
V  []  InterpreterFrameClosure::offset_do(int)+0x31
V  []  InterpreterOopMap::iterate_oop(OffsetClosure*)+0x86
V  []  frame::oops_interpreted_do(OopClosure*, RegisterMap
const*, bool)+0x19a
V  []  frame::oops_do_internal(OopClosure*,
CodeBlobClosure*, RegisterMap*, bool)+0xb1
V  []  JavaThread::oops_do(OopClosure*,
V  []  ThreadRootsTask::do_it(GCTaskManager*,
V  []  GCTaskThread::run()+0x16a
V  []  java_start(Thread*)+0x13f

JavaThread 0x0000000000893000 (nid = 20820) was being processed
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  java.lang.Object.wait(J)V+0
j  java.lang.Thread.join(J)V+38
j  java.lang.Thread.join()V+2
j  TestJMSClient2.main([Ljava/lang/String;)V+31
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x00007f268005a800 JavaThread "ActiveMQ Task-1" daemon [_thread_blocked,
id=21039, stack(0x00007f26e537e000,0x00007f26e547f000)]
  0x00007f267c002000 JavaThread "ActiveMQ InactivityMonitor Worker" daemon
[_thread_blocked, id=20996, stack(0x00007f26e4f7a000,0x00007f26e507b000)]
  0x00007f268006e800 JavaThread "ActiveMQ Transport:
tcp:///" [_thread_in_native, id=20960,
  0x00007f2684003000 JavaThread "ActiveMQ InactivityMonitor WriteCheckTimer"
daemon [_thread_blocked, id=20851,
  0x00007f2684002000 JavaThread "ActiveMQ InactivityMonitor ReadCheckTimer"
daemon [_thread_blocked, id=20850,
  0x00000000009af800 JavaThread "Thread-0" [_thread_blocked, id=20847,
  0x0000000000938800 JavaThread "Low Memory Detector" daemon
[_thread_blocked, id=20845, stack(0x00007f26e5842000,0x00007f26e5943000)]
  0x0000000000936000 JavaThread "C2 CompilerThread1" daemon
[_thread_blocked, id=20844, stack(0x00007f26e5943000,0x00007f26e5a44000)]
  0x0000000000933000 JavaThread "C2 CompilerThread0" daemon
[_thread_blocked, id=20843, stack(0x00007f26e5a44000,0x00007f26e5b45000)]
  0x0000000000931000 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=20842, stack(0x00007f26e5b45000,0x00007f26e5c46000)]
  0x0000000000914800 JavaThread "Finalizer" daemon [_thread_blocked,
id=20841, stack(0x00007f26e5c46000,0x00007f26e5d47000)]
  0x0000000000912800 JavaThread "Reference Handler" daemon [_thread_blocked,
id=20840, stack(0x00007f26e5d47000,0x00007f26e5e48000)]
  0x0000000000893000 JavaThread "main" [_thread_blocked, id=20820,

It would be great if some one can help me on this.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message