[MDEV-24533] SIGSEGV in std::__atomic_base from Atomic_counter from buf_page_t::oldest_modification Created: 2021-01-06  Updated: 2021-05-04  Resolved: 2021-05-04

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.6
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Roel Van de Paar
Resolution: Cannot Reproduce Votes: 0
Labels: None

Attachments: Text File thread apply all bt full.txt    

 Description   

I am seeing the following crash, seemingly with some regularity:

10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4

Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld --no-defaults --max_a'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x1496a17fd700 (LWP 1539259))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x0000562c5784c66f in my_write_core (sig=sig@entry=11) at /test/10.6_opt/mysys/stacktrace.c:424
#2  0x0000562c572c1d20 in handle_fatal_signal (sig=11) at /test/10.6_opt/sql/signal_handler.cc:330
#3  <signal handler called>
#4  std::__atomic_base<unsigned long>::load (__m=std::memory_order_relaxed, this=<optimized out>) at /usr/include/c++/9/bits/atomic_base.h:413
#5  Atomic_counter<unsigned long>::operator unsigned long (this=<optimized out>) at /test/10.6_opt/include/my_counter.h:45
#6  buf_page_t::oldest_modification (this=<optimized out>) at /test/10.6_opt/storage/innobase/include/buf0buf.h:870
#7  buf_flush_page_cleaner () at /test/10.6_opt/storage/innobase/buf/buf0flu.cc:2130
#8  0x00001496b8d42609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00001496b8931293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Reproducing the issue has not worked, even once.

Options used in this trial were:

--no-defaults --max_allowed_packet=33554432 --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --innodb_file_per_table=1 --innodb_flush_method=O_DIRECT --innodb_stats_persistent=off --loose-idle_write_transaction_timeout=0 --loose-idle_transaction_timeout=0 --loose-idle_readonly_transaction_timeout=0 --connect_timeout=60 --interactive_timeout=28800 --slave_net_timeout=60 --net_read_timeout=30 --net_write_timeout=60 --loose-table_lock_wait_timeout=50 --wait_timeout=28800 --lock-wait-timeout=86400 --innodb-lock-wait-timeout=50 --log_output=FILE --log-bin --log_bin_trust_function_creators=1 --loose-max-statement-time=30 --loose-debug_assert_on_not_freed_memory=0 --innodb-buffer-pool-size=300M



 Comments   
Comment by Roel Van de Paar [ 2021-05-04 ]

Discussed with @marko. Changes in MDEV-25404 may have affected this bug, though it is not sure.
Have not seen it recently. Closing for the time being and will reopen if observed again.
The issue may be related to --innodb-buffer-pool-size=300M at startup, then subsequent resize.

Generated at Thu Feb 08 09:30:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.