Bugzilla – Bug ******
[ThreadProf] Resume profiling cause SIGSEGV
Last modified: 2009-07-01 16:54:40 EDT
[x]
Login:
[x]
Eclipse.org will be offline tomorrow, Saturday Feb. 9 from 7:00am EST for a server migration. We expect services to be restored at 17:00 EST later that day.
FirstLast
This bug is not in your last
search results.
Bug 230125 -
[ThreadProf] Resume profiling cause SIGSEGV
Summary:
[ThreadProf] Resume profiling cause SIGSEGV
Platform.Agents.JVMTI
Version:
4.5
Platform:
All
Linux-GTK
Importance:
P1
blocker Target Milestone:
4.5i8
:
Alexander N. Alexeev
2008-05-04 10:55 EDT by Alexander N. Alexeev
Modified:
2009-07-01 16:54 EDT CC List: 4
users See Also:
Flags:
asaf.yaffe:
review+
Attachments
crachdump
(19.14 KB,
application/octet-stream)
2008-05-04 10:59 EDT,
Alexander N. Alexeev
no flags
patch fixes crashes at resume for ThreadProf
(23.31 KB,
patch)
2008-05-10 10:51 EDT,
Alexander N. Alexeev
no flags
patch fixes crashes at resume for ThreadProf
(23.09 KB,
patch)
2008-05-10 10:56 EDT,
Alexander N. Alexeev
no flags
patch fixes crashes at resume for ThreadProf
(23.35 KB,
patch)
2008-05-11 10:45 EDT,
Alexander N. Alexeev
no flags
Show
Obsolete (2)
(proposed patch, testcase, etc.)
Note
You need to
before you can comment on or make changes to this bug.
Alexander N. Alexeev
2008-05-04 10:55:52 EDT
Build: 200*********
1. Start standalone profiling:
java -cp /nfs/pb/home/analexee/iret/users/aan/sandbox/229670/ws/Simple2/bin/ -agentlib:JPIBootLoader=JPIAgent:server=controlled\;ThreadProf StartStop
2. Attach to agent without option "Automatically start monitoring
3. Press Resume button
Profile application crash with SIGSEGV
Alexander N. Alexeev
2008-05-04 10:59:04 EDT
Created [details]
crachdump
Alexander N. Alexeev
2008-05-10 10:51:22 EDT
Created [details]
patch fixes crashes at resume for ThreadProf
Patch fixes in two possible causes of crashes at resume collecting
1. One of the arguments of printing methods for thread events (like PrintMonitorWaitElement) is pointer to SStackTrace_. Such methods can be called with null value for stack trace pointer argument in some circumstances, but real printers (XML or binary) don't check this fact and dereference pointers. Hence profiler can crash with SIGSEGV.
2. CheckObjectId requests object's info from JVM by call to method m_pMpiApi->GetObjectInfo. If object with provided ID has already been garbage collected then method returns with MRTE_RESULT_OK but doesn't provide requested information.
Previous implementation of CheckObjectId only asserts condition that DR_OBJECT_INFO flag exists but don't have rescue logic if info isn't provided.
Now result is checked, if flag DR_OBJECT_INFO is absent then execution exit from method.
Fix requires to add functionality for Object's infos be collected even if profiler inactive and printed later.
Minor refactoring has been done also.
Alexander N. Alexeev
2008-05-10 10:56:29 EDT
Created [details]
patch fixes crashes at resume for ThreadProf
Alexander N. Alexeev
2008-05-10 10:58:53 EDT
Asaf, could you review the patch?
Asaf Yaffe
2008-05-11 08:10:42 EDT
Specific comments:
ProfEnv.cpp - CProfEnv::CheckObjectId
Line 335: if object info is not valid, you exit the function without releasing the lockObjectCheckObject lock.
General comments:
Can you explain the reason for the code refactoring? I see it is related to printing of objAlloc elements, but I don't understand the change (part of the problem is that I am not familiar with the original code).
Can assess the impact of this refactoring on functionality? Is it really necessary at this point in time? Can it cause any regression issues?
Thanks,
Asaf
Alexander N. Alexeev
2008-05-11 10:45:10 EDT
Created [details]
patch fixes crashes at resume for ThreadProf
1. lockObjectCheckObject->Leave is added
2. Refactoring is only about removing unneeded arguments from functions IsMethodStored and IsClassStored. All other changes are requited for bug fixing.
Asaf Yaffe
2008-05-12 02:41:52 EDT
Patch is OK
Alexander N. Alexeev
2008-05-13 01:29:53 EDT
patch committed to the HEAD with PMC approval
Paul Slauenwhite
2009-06-30 13:33:39 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Paul Slauenwhite
2009-06-30 13:53:33 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
FirstLast
This bug is not in your last
search results.
[x]
Login:
[x]
Copyright Agent