Print linux TID while crashing
authorKai Wang <kaiwang@fb.com>
Sat, 20 Dec 2014 06:24:54 +0000 (22:24 -0800)
committerDave Watson <davejwatson@fb.com>
Mon, 29 Dec 2014 18:39:59 +0000 (10:39 -0800)
commit36194fe43517dd31f509ad9dbab93f66208c9f1b
treea41c1d1a840aaa46859bad1bb6e742c53a087886
parent3468cb59a4676d26ebbb93ed80018d7a9a9ff262
Print linux TID while crashing

Summary:
For servers using GLOG, all thread ID are get from gettid system call. So it
is very useful if we print this ID so during debugging I can find the log
of crashing thread.

I'm not sure who should review this diff. Just found you guys from previous
diffs touched this file :)

Test Plan:
See the crash log.
*** Aborted at 1419029404 (Unix time, try 'date -d @1419029404') ***
*** Signal 11 (SIGSEGV) (0x18) received by PID 18852 (pthread TID 0x7f52a1fff700) (linux TID 27908), stack trace: ***

Reviewed By: tudorb@fb.com

Subscribers: seanc, folly-diffs@

FB internal diff: D1752301

Signature: t1:1752301:1419032887:e43c2ace6914e54812149a8b8e84eaffaf42a09c
folly/experimental/symbolizer/SignalHandler.cpp
folly/experimental/symbolizer/test/SignalHandlerTest.cpp