Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 159604

Summary: piagent seg faults when running in application server
Product: z_Archived Reporter: Ashish Patel <ashishp>
Component: TPTPAssignee: Samson Wai <samwai>
Status: CLOSED WONTFIX QA Contact:
Severity: critical    
Priority: P1 CC: jkubasta
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Core dump 1
none
Core dump 2
none
The regular binary of the piagent.
none
A debug version of the piagent none

Description Ashish Patel CLA 2006-10-03 11:13:37 EDT
I have a simple scenario where there are two jvmpi agents, one of which is the pi agent, that runs in WAS 6.  When running a large load test against the application server, the piagent seg faults and causes the application server to crash.  I have attached the core dump files.  

This only seems to happen when running on linux. Running the two agents on Windows seems to be ok.

This defect is needed to be fixed for a consuming product.
Comment 1 Ashish Patel CLA 2006-10-03 11:15:20 EDT
Created attachment 51341 [details]
Core dump 1
Comment 2 Ashish Patel CLA 2006-10-03 11:15:44 EDT
Created attachment 51342 [details]
Core dump 2
Comment 3 Bob Duncan CLA 2006-10-03 12:08:20 EDT
This problem involves a pass-thru agent that sits on the JVMPI interface and broadcasts JVMPI events to two actual JVMPI agents, one of which is the TPTP piAgent. The scenario works fine (including the pass-thru behavior) as long as piAgent is the only jvmpi agent being serviced by the pass-thru agent.
Comment 4 Bob Duncan CLA 2006-10-27 12:30:35 EDT
Re-targeting for 4.2.1 patch (consuming product will not be picking up 4.3). 
Comment 5 Harm Sluiman CLA 2006-11-20 14:57:53 EST
Please retarget this defect asap. 4.2.1 was clsoed a long time ago
Comment 6 Bob Duncan CLA 2006-11-23 17:17:55 EST
Retargetting to 4.4 until I can diagnose and assess a fix for another, open target. Working on this currently. 
Comment 7 Bob Duncan CLA 2006-12-05 19:55:45 EST
Ahish,

From what I am seeing so far, I would've expected the following message to have appeared in the WAS console or the native error log or some such place (wherever WAS captures stderr for native code) just before the Segv occurred:
   "FATAL ERROR:  Out of memory...JVM Exiting"

Can you find that message anywhere after this failure? If so, I have an idea of what the problem might be (ie: why you get a Segv instead of a graceful exit for an OutOfMemory condition).  If not, I have more digging to do.
Comment 8 Ashish Patel CLA 2006-12-14 18:22:08 EST
Created attachment 55728 [details]
The regular binary of the piagent.
Comment 9 Ashish Patel CLA 2006-12-14 18:22:35 EST
Created attachment 55729 [details]
A debug version of the piagent
Comment 10 Ashish Patel CLA 2006-12-14 18:23:25 EST
Attached two binaries from the piagent based on the following note:

Hi Ashish,

Thanks for your patience.  I am hitting some road-blocks with a couple of things I've been trying on this (confirming the exact point of failure, repro'ing with a smaller testcase, testing the jvmpi ProfilerExit call that may be implicated, etc). Let's see if we can at least get a proper traceback with a debug version and gdb.  I've attached two versions of the piAgent lib: one vanilla/reg and the other debug. 



Let's try two runs:

Replace the libpiAgent.so in the <rac_dir>/lib with the attached libpiAgent.so.reg (minus the ".reg" suffix) and reproduce the problem
Replace the libpiAgent.so in the <rac_dir>/lib with the attached libpiAgent.so.dbg (minus the ".dbg" suffix), attach WAS process from gdb, and reproduce the problem


Thanks,
Bob
Comment 11 Bob Duncan CLA 2006-12-14 18:38:55 EST
Note that the second run (with the debug piAgent and attaching gdb to the AppServer/profiled process) is expected to produce the precise traceback we need to nail the point of the Segv.  That's what we need at this point.
Comment 12 Samson Wai CLA 2007-01-31 16:09:41 EST
Set priority to P1 for 4.4 plan closure.
Comment 13 jkubasta CLA 2007-02-04 09:14:32 EST
Please indicate the Java version being used.
Comment 14 Ashish Patel CLA 2007-02-05 07:41:11 EST
Java version being used is IBM JDK 1.4.2 (as bundled with WAS 6).
Comment 15 jkubasta CLA 2007-10-18 14:10:08 EDT
No plan to fix
Comment 16 Ashish Patel CLA 2007-10-25 16:43:01 EDT
cls