180102  2:07:12 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.

Server version: 10.1.30-MariaDB-1~xenial
key_buffer_size=1048576
read_buffer_size=1048576
max_used_connections=5
max_threads=102
thread_count=6
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 525365 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f75d1032008
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f75e0c5001f thread_stack 0x48400
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55770103cffe]
/usr/sbin/mysqld(handle_fatal_signal+0x2f5)[0x557700b85725]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f75e29fa390]
/usr/sbin/mysqld(_ZN13Explain_query10get_selectEj+0x10)[0x557700ae4b00]
/usr/sbin/mysqld(_ZN13Explain_query8add_nodeEP12Explain_node+0xa3)[0x557700ae4be3]
/usr/sbin/mysqld(_ZN4JOIN24save_explain_data_internEP13Explain_querybbbPKc+0xb50)[0x557700a45940]
/usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0xc3)[0x557700a4b4e3]
/usr/sbin/mysqld(_Z22mysql_derived_optimizeP3THDP3LEXP10TABLE_LIST+0xa5)[0x5577009cc4b5]
/usr/sbin/mysqld(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0x1ba)[0x5577009ccf1a]
/usr/sbin/mysqld(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x5577009e5977]
/usr/sbin/mysqld(_ZN4JOIN14optimize_innerEv+0xa6)[0x557700a478d6]
/usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0x29)[0x557700a4b449]
/usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x8f1)[0x557700a4bdf1]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x139)[0x557700a4bfb9]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x83fb)[0x5577009f6d1b]
/usr/sbin/mysqld(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x15)[0x557700c86985]
/usr/sbin/mysqld(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x83)[0x557700c8dad3]
/usr/sbin/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x205)[0x557700c8e085]
/usr/sbin/mysqld(_ZN7sp_head7executeEP3THDb+0x7ae)[0x557700c89e5e]
/usr/sbin/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x3b8)[0x557700c8b378]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x673a)[0x5577009f505a]
/usr/sbin/mysqld(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x15)[0x557700c86985]
/usr/sbin/mysqld(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x83)[0x557700c8dad3]
/usr/sbin/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x205)[0x557700c8e085]
/usr/sbin/mysqld(_ZN7sp_head7executeEP3THDb+0x7ae)[0x557700c89e5e]
/usr/sbin/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x739)[0x557700c8b6f9]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x673a)[0x5577009f505a]
/usr/sbin/mysqld(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x15)[0x557700c86985]
/usr/sbin/mysqld(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x83)[0x557700c8dad3]
/usr/sbin/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x205)[0x557700c8e085]
/usr/sbin/mysqld(_ZN7sp_head7executeEP3THDb+0x7ae)[0x557700c89e5e]
/usr/sbin/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x3b8)[0x557700c8b378]
/usr/sbin/mysqld(_ZN14Event_job_data7executeEP3THDb+0xa43)[0x557700ab2d53]
/usr/sbin/mysqld(_ZN19Event_worker_thread3runEP3THDP28Event_queue_element_for_exec+0xe7)[0x557700cbef57]
/usr/sbin/mysqld(event_worker_thread+0x4d)[0x557700cbeffd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f75e29f06ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f75e209b3dd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f758504e020): insert into pai_db_log(log_name,log_text) select log_name,concat(log_cnt,' Rows pending in UX table') log_text from ( select 'beacon_post_service_entries' log_name,count(*) log_cnt from pai_beacon_service_entries_ux ) as x
Connection ID (thread ID): 10016
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: The InnoDB memory heap is disabled
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Using Linux native AIO
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Using SSE crc32 instructions
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Initializing buffer pool, size = 1.0G
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Completed initialization of buffer pool
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Highest supported file format is Barracuda.
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Starting crash recovery from checkpoint LSN=14812093404
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
InnoDB: Transaction 40725185 was in the XA prepared state.
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 0 row operations to undo
InnoDB: Trx id counter is 40725504
2018-01-02  2:07:18 139748155693312 [Note] InnoDB: Starting final batch to recover 129 pages from redo log
InnoDB: Last MySQL binlog file position 0 30969192, file name /var/log/mysql/mariadb-bin.000141
2018-01-02  2:07:19 139748155693312 [Note] InnoDB: 128 rollback segment(s) are active.
2018-01-02  2:07:19 139746537891584 [Note] InnoDB: Starting in background the rollback of recovered transactions
2018-01-02  2:07:19 139746537891584 [Note] InnoDB: Rollback of non-prepared transactions completed
2018-01-02  2:07:19 139748155693312 [Note] InnoDB: Waiting for purge to start
2018-01-02  2:07:19 139748155693312 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 14815351226
2018-01-02  2:07:19 139748155693312 [Note] Plugin 'FEEDBACK' is disabled.
2018-01-02  2:07:19 139748155693312 [Note] Recovering after a crash using /var/log/mysql/mariadb-bin
2018-01-02  2:07:19 139746424649472 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-01-02  2:07:20 139748155693312 [Note] Starting crash recovery...
2018-01-02 02:07:20 7f19a72d9900  InnoDB: Starting recovery for XA transactions...
2018-01-02 02:07:20 7f19a72d9900  InnoDB: Transaction 40725185 in prepared state after recovery
2018-01-02 02:07:20 7f19a72d9900  InnoDB: Transaction contains changes to 1 rows
2018-01-02 02:07:20 7f19a72d9900  InnoDB: 1 transactions in prepared state after recovery
2018-01-02  2:07:20 139748155693312 [Note] Found 1 prepared transaction(s) in InnoDB
2018-01-02  2:07:20 139748155693312 [Note] Crash recovery finished.
2018-01-02  2:07:20 139748155693312 [Note] Server socket created on IP: '127.0.0.1'.
2018-01-02  2:07:20 139748155693312 [Warning] 'user' entry 'root@www' ignored in --skip-name-resolve mode.
2018-01-02  2:07:20 139748155693312 [Warning] 'proxies_priv' entry '@% root@www' ignored in --skip-name-resolve mode.
2018-01-02  2:07:20 139748155693312 [ERROR] mysqld: Table './mysql/event' is marked as crashed and should be repaired
2018-01-02  2:07:20 139748155693312 [Warning] Checking table:   './mysql/event'
2018-01-02  2:07:20 139748155693312 [ERROR] mysql.event: 1 client is using or hasn't closed the table properly
2018-01-02  2:07:20 139748154891008 [Note] Event Scheduler: scheduler thread started with id 2
2018-01-02  2:07:20 139748155693312 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.30-MariaDB-1~xenial'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
