Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-10-07 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12968#261762, @labath wrote: > I have committed http://reviews.llvm.org/D13056 with the event hijacking > portion from your patch. I think your use case should be working now. I am > planning to return to this later, as I believe there are

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-10-07 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12968#259931, @clayborg wrote: > This can't be the real fix for this. We must be able to trust the empty() > function call. We must have someone playing with the collection without > locking the mutex. Please find the real bug. Hello

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-10-05 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. This can't be the real fix for this. We must be able to trust the empty() function call. We must have someone playing with the collection without locking the mutex. Please find

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-30 Thread Pavel Labath via lldb-commits
labath added a comment. This is definitely not a proper fix for this problem, it merely sweeps the problem under the carpet. If something like this makes a difference then it means something has gone horribly wrong a long time ago. I haven't been able to reproduce this locally, but I'd

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-24 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. @clayborg, @labath, After more deep investigation I think setting listener for hijacking also looks like workaround. Setting additional listener just change code flow path and buggy path not executed, thus no crash. At top level - crash appeared in

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Pavel Labath via lldb-commits
labath added inline comments. Comment at: source/Target/Process.cpp:3934 @@ +3933,3 @@ + +ListenerSP listener_sp (new Listener("lldb.Process.HaltForDestroyOrDetach.hijack")); +HijackProcessEvents(listener_sp.get()); ki.stfu wrote: > btw:

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. @labath, I updated patch against actual source in SVN - i.e. with taking into account your change (Halt*->Stop*). Regarding matter of this patch - I just tried to make process stop synchronous, see Process::ResumeSynchronous() - same technique was applied month ago.

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done. KLapshin added a comment. Done. Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12968#251719, @labath wrote: > In http://reviews.llvm.org/D12968#251696, @KLapshin wrote: > > > Regarding matter of this patch - I just tried to make process stop > > synchronous, see Process::ResumeSynchronous() - same technique was applied

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Pavel Labath via lldb-commits
labath added a comment. In http://reviews.llvm.org/D12968#251696, @KLapshin wrote: > Regarding matter of this patch - I just tried to make process stop > synchronous, see Process::ResumeSynchronous() - same technique was applied > months ago (@ki.stfu). > > Agreed what crash may be related to

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin removed rL LLVM as the repository for this revision. KLapshin updated this revision to Diff 35491. http://reviews.llvm.org/D12968 Files: source/Target/Process.cpp Index: source/Target/Process.cpp === ---

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. If you are going to hijack you do need to do it before you call Halt(). Repository: rL LLVM http://reviews.llvm.org/D12968 ___

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin updated this revision to Diff 35392. Repository: rL LLVM http://reviews.llvm.org/D12968 Files: source/Target/Process.cpp Index: source/Target/Process.cpp === --- source/Target/Process.cpp +++ source/Target/Process.cpp

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. Greg, I reworked initial workaround solution, now this is exact fix. Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin updated the summary for this revision. KLapshin updated this revision to Diff 35390. Repository: rL LLVM http://reviews.llvm.org/D12968 Files: source/Target/Process.cpp Index: source/Target/Process.cpp === ---

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin added a subscriber: labath. KLapshin added a comment. Due to @labath reworked and replaced HaltForDestroyOrDetach to StopHaltForDestroyOrDetach method (see http://reviews.llvm.org/D13056) and his patch already approved by @clayborg and crash still reproducible with just race condition

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-18 Thread Greg Clayton via lldb-commits
clayborg added a comment. To work around it you might be able to call SBProcess::Halt() first? Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-18 Thread Greg Clayton via lldb-commits
clayborg added a comment. You should be able to just call Destroy(), we shouldn't crash. We will need to fix the core it allow this since people can/will call this. Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-18 Thread Dawn Perchik via lldb-commits
dawn resigned from this revision. dawn edited reviewers, added: clayborg; removed: dawn. dawn added a comment. I'll watch and learn from Ilia and Greg :) Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-18 Thread Kirill Lapshin via lldb-commits
KLapshin created this revision. KLapshin added reviewers: dawn, ki.stfu, abidh. KLapshin added a subscriber: lldb-commits. KLapshin set the repository for this revision to rL LLVM. This patch fixes lldb core crash in Listener waiting for process ended and operates with already invalid data if

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-18 Thread Ilia K via lldb-commits
ki.stfu added a subscriber: clayborg. ki.stfu added a comment. For me it looks like a workaround because here is assumed the SBProcess::Destroy will do all required work. @clayborg, is it permissible to make a Process::Destroy(force_kill=false) for a running process? If so, it's a bug in lldb