[devel] [PATCH 1/1] base: Place TraceLog instance on heap memory V3 [#2860]

2018-05-24 Thread Minh Chau
When a process calls exit(), the exit_handler trigger __do_global_dtor_aux then calls TraceLog destructor. One of process thread is calling TraceLog::Log while the destructor is called. This leads to a coredump. The process (which could by any applications) calling exit() first is responsible to

[devel] [PATCH 0/1] Review Request for base: Place TraceLog instance on heap memory V3 [#2860]

2018-05-24 Thread Minh Chau
Summary: base: Place TraceLog instance on heap memory V3 [#2860] Review request for Ticket(s): 2860 Peer Reviewer(s): Hans, Anders, Ravi Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-2860 Base revision:

Re: [devel] [PATCH 1/1] base: Improve backtrace print in daemon.c [#2853]

2018-05-24 Thread Gary Lee
Hi Hans Ack Thanks Gary On 16/5/18, 5:27 pm, "Hans Nordeback" wrote: --- src/base/daemon.c | 52 ++--- tools/cluster_sim_uml/build_uml | 1 + 2 files changed, 49 insertions(+), 4 deletions(-)

Re: [devel] [PATCH 1/1] base: Destructor of TraceLog causes coredump V2 [#2860]

2018-05-24 Thread Minh Hon Chau
Hi Hans, Place it on heap so destructor won't be called as part of __do_global_dtor_aux I guess, it should be equivalent to the previous of TraceLog regarding this issue. I think you can make "if (mutex_ && mutext_->good())", it can pass the check mutex_ against null but not sure after

Re: [devel] [PATCH 1/1] base: Destructor of TraceLog causes coredump V2 [#2860]

2018-05-24 Thread Hans Nordeback
Hi Minh, yes gl_trace/gl_log can be put on the heap, you mean without any owner? But in this case when destructors for one of the threads has been run other threads should notice that some states may not be valid anymore,  e.g. that mutex_->good() returns false, but if mutex_ has been