Commit Graph

64 Commits

Author SHA1 Message Date
Alexander Kuzmenkov
fb64cf210a straighten the protocol version 2020-09-17 17:37:29 +03:00
Azat Khuzhin
b7ba0b64dc Reset signal handlers just before closing signal pipe to avoid EBADF after
stack trace:

    (gdb) bt
    0  0x00007ffff7dda355 in raise () from /usr/lib/libc.so.6
    1  0x00007ffff7dc3853 in abort () from /usr/lib/libc.so.6
    2  0x0000000013a78180 in abort_message (format=format@entry=0x5781e10 "terminate_handler unexpectedly threw an exception") at abort_message.cpp:76
    3  0x0000000013a899ff in std::__terminate (func=<optimized out>) at cxa_handlers.cpp:67
    4  0x0000000013a771a1 in __cxxabiv1::call_terminate (native_exception=native_exception@entry=true, unwind_exception=unwind_exception@entry=0x7ffff70e9060) at cxa_personality.cpp:323
    5  0x0000000013a77669 in __cxxabiv1::scan_eh_tab (results=..., actions=<optimized out>, native_exception=native_exception@entry=true, unwind_exception=0x7ffff70e9060, context=context@entry=0x7fffffffc3a0) at cxa_personality.cpp:887
    6  0x0000000013a77bde in __cxxabiv1::__gxx_personality_v0 (version=<optimized out>, actions=<optimized out>, exceptionClass=<optimized out>, unwind_exception=0x7ffff70e9060, context=0x7fffffffc3a0) at cxa_personality.cpp:969
    7  0x0000000013a962d7 in unwind_phase1 (exception_object=0x7ffff70e9060, cursor=0x7fffffffc3a0, uc=0x7fffffffc2f0) at UnwindLevel1.c:98
    8  _Unwind_RaiseException (exception_object=exception_object@entry=0x7ffff70e9060) at UnwindLevel1.c:363
    9  0x0000000013a8929b in __cxxabiv1::__cxa_rethrow () at cxa_exception.cpp:607
    10 0x000000000f170ad2 in DB::WriteBuffer::next (this=0x7fffffffc510) at WriteBuffer.h:52
    11 writeSignalIDtoSignalPipe (sig=<optimized out>) at BaseDaemon.cpp:111
    12 <signal handler called>
    13 0x00007ffff7e9895b in munmap () from /usr/lib/libc.so.6
    14 0x00007ffff7f7e255 in free_stacks () from /usr/lib/libpthread.so.0
    15 0x00007ffff7f7e6aa in __deallocate_stack () from /usr/lib/libpthread.so.0
    16 0x00007ffff7f80898 in __pthread_clockjoin_ex () from /usr/lib/libpthread.so.0
    17 0x0000000013a759f7 in std::__1::__libcpp_thread_join (__t=0x7fff0aa2b090) at __threading_support:409
    18 std::__1:🧵:join (this=this@entry=0x7fff0aa2b090) at thread.cpp:56
    19 0x000000000a4c9399 in ThreadPoolImpl<std::__1::thread>::finalize (this=this@entry=0x7ffff7053900) at list:355
    20 0x000000000a4c9426 in ThreadPoolImpl<std::__1::thread>::~ThreadPoolImpl (this=0x7ffff7053900, __in_chrg=<optimized out>) at ThreadPool.cpp:172
    21 0x000000000a4c8a9c in GlobalThreadPool::~GlobalThreadPool (this=0x7ffff7053900, __in_chrg=<optimized out>) at ThreadPool.h:132
    22 std::__1::default_delete<GlobalThreadPool>::operator() (__ptr=0x7ffff7053900, this=<optimized out>) at memory:2363
    23 std::__1::unique_ptr<GlobalThreadPool, std::__1::default_delete<GlobalThreadPool> >::reset (__p=0x0, this=<optimized out>) at memory:2618
    24 std::__1::unique_ptr<GlobalThreadPool, std::__1::default_delete<GlobalThreadPool> >::~unique_ptr (this=<optimized out>, __in_chrg=<optimized out>) at memory:2572
    25 0x00007ffff7ddcc57 in __run_exit_handlers () from /usr/lib/libc.so.6
    26 0x00007ffff7ddcdfe in exit () from /usr/lib/libc.so.6
    27 0x00007ffff7dc5009 in __libc_start_main () from /usr/lib/libc.so.6
    28 0x000000000a48702e in _start () at new:340
2020-08-13 23:12:36 +03:00
Alexander Kuzmenkov
e7744cc15c Merge remote-tracking branch 'origin/master' into HEAD 2020-08-03 16:35:42 +03:00
Alexey Milovidov
64d91d0f90 Fix build; fix errors 2020-08-01 18:54:44 +03:00
Alexey Milovidov
9ef9d31f03 Crash log: development 2020-07-31 23:16:31 +03:00
Alexander Kuzmenkov
efb09d7ff5 Cleanup for #12999. NFC. 2020-07-31 17:53:41 +03:00
Alexander Kuzmenkov
3e6b9f297f Some provisions for Android build 2020-07-15 14:16:00 +03:00
Alexey Milovidov
d07af62370 Log sanitizer trap messages from separate thread 2020-07-09 05:00:48 +03:00
Alexey Milovidov
176a7f2f72 Normalize "pid" file handling #3501 2020-07-04 16:54:24 +03:00
Ivan Blinkov
3ed76a388e send build_id to sentry as well + fix some minor issues 2020-06-24 00:27:04 +03:00
Ivan Blinkov
45d1ca2567 merge master 2020-06-24 00:18:16 +03:00
Alexey Milovidov
b50b4b14de Merge branch 'master' into send-logs-on-fatal-errors 2020-06-22 15:48:46 +03:00
Ivan Blinkov
2c0ff29c48 Merge branch 'master' of github.com:ClickHouse/ClickHouse into sentry 2020-06-22 10:06:36 +03:00
Alexey Milovidov
ea35829481 Fix build 2020-06-21 13:46:41 +03:00
Alexey Milovidov
7f05d2bac0 Merge branch 'master' into print-build-id 2020-06-21 13:44:32 +03:00
Alexey Milovidov
581d1a4470 Fix build 2020-06-20 21:05:44 +03:00
Alexey Milovidov
b2d1e08dd6 Fix build 2020-06-20 14:31:38 +03:00
Alexey Milovidov
7ba25bd799 Make it work 2020-06-20 14:17:15 +03:00
Alexey Milovidov
beae4d5db1 Fix sleep in signal handler 2020-06-20 13:15:53 +03:00
Alexey Milovidov
9f42e81ef9 Send logs on fatal errors (development) 2020-06-20 13:10:18 +03:00
Alexey Milovidov
2897a54072 Fix build 2020-06-20 12:17:31 +03:00
Alexey Milovidov
7fcdfa1f88 Print build id on startup 2020-06-20 12:13:11 +03:00
Alexey Milovidov
ead4a2cfd9 Print build id in crash messages 2020-06-20 12:07:05 +03:00
Ivan Blinkov
6191d33bd9 Do not cache frames inside StackTrace 2020-06-10 16:30:12 +03:00
Ivan Blinkov
acf22bfb19 fix sanitizers build 2020-06-01 19:42:59 +03:00
Ivan Blinkov
fcc7ff0ef9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into sentry 2020-06-01 08:42:03 +03:00
Alexey Milovidov
d2eb58142e Fix build 2020-05-31 16:51:37 +03:00
Alexey Milovidov
e3dc1d6734 Fix build 2020-05-31 16:50:40 +03:00
Alexey Milovidov
25f941020b Remove namespace pollution 2020-05-31 00:57:37 +03:00
Ivan Blinkov
69dedcbe21 Move sending crash reports below logging 2020-05-30 00:28:55 +03:00
Ivan Blinkov
d9bb3ef91b Add logging and adjust initialization 2020-05-29 22:48:32 +03:00
Ivan Blinkov
31123236cb Settings for crash report opt-in 2020-05-27 23:15:33 +03:00
Ivan Blinkov
709b4f42c8 Prototype sending crash reports on segfaults 2020-05-27 22:11:04 +03:00
Alexey Milovidov
2fd48696dc Fix build 2020-05-24 12:50:30 +03:00
Alexey Milovidov
7e1813825b Return old names of macros 2020-05-24 01:24:01 +03:00
Alexey Milovidov
61cc605ee7 Remove old method 2020-05-24 01:21:29 +03:00
Alexey Milovidov
f13ccfc8e8 Progress on task 2020-05-23 22:43:13 +03:00
Alexey Milovidov
7e2fb9ad65 Apply all transformations again 2020-05-23 22:38:30 +03:00
Alexey Milovidov
29762240de Remove duplicate whitespaces (preparation) 2020-05-23 22:31:54 +03:00
Alexey Milovidov
1f13515a65 Make all LOG in single line (preparation) 2020-05-23 21:31:37 +03:00
Alexey Milovidov
3a09f9ca1c find {base,src,programs} -name '*.h' -or -name '*.cpp' | xargs grep -l -P 'LOG_[^\W_]+\([^,]+, [^<+)"]+\);' | xargs sed -i -r -e 's/(LOG_[^\W_]+)\(([^,]+), ([^<+)"]+)\);/\1_FORMATTED(\2, \3);/' 2020-05-23 20:29:56 +03:00
Alexey Milovidov
f69cbdcbfc find {base,src,programs} -name '*.h' -or -name '*.cpp' | xargs grep -l -P 'LOG_\w+\([^,]+, "[^"]+" \+ [^+]+\);' | xargs sed -i -r -e 's/(LOG_\w+)\(([^,]+), "([^"]+)" \+ ([^+]+)\);/\1_FORMATTED(\2, "\3{}", \4);/' 2020-05-23 20:09:37 +03:00
Alexey Milovidov
8042e5febe find {base,src,programs} -name '*.h' -or -name '*.cpp' | xargs grep -l -P 'LOG_\w+\([^,]+, "[^"]+" << [^<]+ << "[^"]+" << [^<]+\);' | xargs sed -i -r -e 's/(LOG_\w+)\(([^,]+), "([^"]+)" << ([^<]+) << "([^"]+)" << ([^<]+)\);/\1_FORMATTED(\2, "\3{}\5{}", \4, \6);/' 2020-05-23 19:58:15 +03:00
Alexey Milovidov
e391b77d81 find {base,src,programs} -name '*.h' -or -name '*.cpp' | xargs grep -l -P 'LOG_\w+\([^,]+, "[^"]+" << [^<]+ << "[^"]+"\);' | xargs sed -i -r -e 's/(LOG_\w+)\(([^,]+), "([^"]+)" << ([^<]+) << "([^"]+)"\);/\1_FORMATTED(\2, "\3{}\5", \4);/' 2020-05-23 19:56:05 +03:00
Alexey Milovidov
ee4ffbc332 find {base,src,programs} -name '*.h' -or -name '*.cpp' | xargs grep -l -P 'LOG_\w+\([^,]+, "[^"]+" << [^<]+\);' | xargs sed -i -r -e 's/(LOG_\w+)\(([^,]+), "([^"]+)" << ([^<]+)\);/\1_FORMATTED(\2, "\3{}", \4);/' 2020-05-23 19:47:56 +03:00
Alexey Milovidov
8d2e80a5e2 find {base,src,programs} -name '*.h' -or -name '*.cpp' | xargs grep -l -P 'LOG_\w+\([^,]+, "[^"]+"\)' | xargs sed -i -r -e 's/(LOG_\w+)\(([^,]+, "[^"]+")\)/\1_FORMATTED(\2)/' 2020-05-23 19:42:39 +03:00
Alexey Milovidov
2864012d1b Better support for sanitizers 2020-05-12 06:36:09 +03:00
Alexey Milovidov
365acc65ea Better support for sanitizers 2020-05-12 06:31:53 +03:00
Alexey Milovidov
6b38005575 Fix build 2020-05-11 01:17:28 +03:00
Alexey Milovidov
eeaab4ba11 Fix build 2020-05-10 02:22:51 +03:00