Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24659

Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list

Details

    Description

      # mysqld options required for replay: --innodb-buffer-pool-size=300M
      SET sql_mode='';
      SET GLOBAL innodb_limit_optimistic_insert_debug=2;
      SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
      CREATE TABLE t1 (a TIME, b DATETIME, KEY(a), KEY(b)) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (2775,974),(2775,975),(2775,976),(2778,977),(2778,978),(2782,979),(2790,986),(2790,1139),(2792,840),(2792,984),(2792,989),(2793,982),(2793,992),(2793,993),(2793,994),(2795,323),(2795,332),(2797,980),(2797,997),(2797,998),(2798,1103),(2798,1104),(2799,841),(2799,985),(2799,988),(2833,983),(2833,990),(2833,991),(2834,981),(2834,995),(2834,996),(2835,316),(2835,317),(3007,854),(3007,856),(3008,855),(3008,857),(3009,823),(3009,824),(3014,1),(3015,1),(3016,2),(3017,2),(3018,3),(3019,3),(3024,842),(3024,843),(3024,844),(3025,845),(3025,846),(3025,847),(3040,31),(3041,32),(3042,52),(3042,55),(3043,53),(3043,54),(3044,278),(3044,279),(3044,280),(3044,281),(3044,282),(3044,283),(3044,284),(3044,285),(3045,1),(3046,1),(3049,220),(3050,221),(3050,222),(3051,2),(3052,2),(3053,223),(3054,224),(3055,225),(3056,226),(3057,227),(3058,228),(3059,229),(3060,327),(3066,236),(3067,237),(3068,238),(3069,239),(3070,240),(3080,241),(3081,242),(3082,247),(3083,248),(3084,249),(3085,250),(3086,251),(3087,252),(3088,253),(3089,254),(3090,255),(3091,256),(3092,257),(3093,258),(3094,259),(3096,263),(3097,264),(3100,273),(3100,302),(3101,266),(3102,267),(3103,268),(3104,269),(3105,270),(3111,275),(3112,238),(3113,272),(3115,286),(3116,318),(3116,319),(3117,290),(3117,292),(3118,238),(3119,291),(3119,293),(3120,304),(3121,305),(3122,306),(3123,307),(3124,308),(3125,309),(3126,310),(3127,311),(3128,312),(3128,336),(3129,313),(3129,350),(3130,314),(3131,315),(3131,351),(3132,325),(3132,328),(3134,502),(3138,334),(3139,338),(3139,339),(3140,340),(3140,341),(3141,344),(3141,345),(3142,346),(3142,347),(3149,351),(3149,354),(3150,351),(3150,356),(3152,358),(3152,359),(3153,361),(3153,370),(3154,363),(3154,369),(3156,350),(3156,371),(3159,376),(3160,377),(3160,379),(3160,384),(3161,378),(3161,380),(3161,383),(3162,388),(3162,389),(3162,390),(3169,392),(3169,393),(3169,394),(3170,395),(3170,396),(3170,397),(3171,398),(3171,399),(3171,400),(3172,401),(3172,402),(3172,403),(3173,404),(3173,405),(3173,406),(3178,351),(3178,421),(3190,411),(3190,412),(3191,413),(3191,414),(3192,415),(3192,416),(3193,417),(3193,418),(3194,419),(3194,420),(3195,353),(3195,424),(3196,425),(3196,426),(3197,427),(3197,428),(3198,429),(3198,430),(3199,431),(3199,432),(3200,433),(3200,434),(3201,435),(3201,436),(3202,437),(3202,438),(3203,439),(3203,440),(3204,441),(3204,442),(3205,443),(3205,444),(3206,445),(3206,446),(3207,447),(3207,448),(3208,449),(3208,450),(3209,451),(3209,452),(3210,453),(3210,454),(3211,455),(3211,456),(3212,457),(3212,458),(3213,459),(3213,460),(3214,461),(3214,462),(3215,463),(3215,464),(3218,466),(3218,467),(3218,468),(3219,469),(3219,470),(3219,471),(3220,474),(3220,475),(3220,476),(3221,477),(3221,478),(3221,479),(3222,480),(3222,481),(3223,482),(3223,483),(3224,484),(3224,485),(3225,486),(3225,487),(3227,503),(3227,505),(3228,506),(3228,507),(3230,508),(3230,509),(3231,510),(3231,511),(3232,512),(3232,513),(3233,514),(3233,515),(3234,516),(3234,517),(3235,518),(3235,519),(3237,521),(3237,522),(3239,524),(3239,525),(3240,526),(3240,527),(3241,528),(3241,529),(3242,530),(3242,531),(3243,532),(3243,533),(3244,534),(3244,535),(3245,536),(3245,537),(3246,538),(3246,539),(3252,540),(3252,541),(3254,543),(3254,544),(3254,545),(3255,547),(3255,548),(3255,571),(3256,550),(3256,551),(3256,572),(3257,553),(3257,554),(3257,573),(3258,556),(3258,557),(3258,574),(3259,559),(3259,560),(3259,575),(3260,561),(3260,562),(3260,563),(3261,565),(3261,576),(3262,566),(3262,567),(3263,568),(3263,569),(3263,570),(3264,577),(3264,578),(3265,579),(3265,580),(3266,581),(3266,582),(3266,591),(3267,583),(3267,584),(3267,592),(3268,585),(3268,586),(3268,593),(3269,587),(3269,588),(3269,594),(3270,589),(3270,590),(3271,595),(3271,596),(3271,597),(3272,598),(3272,599),(3273,600),(3273,601),(3273,602),(3274,603),(3274,604),(3274,605),(3275,606),(3275,607),(3275,608),(3276,609),(3276,610),(3276,611),(3277,612),(3277,613),(3277,614),(3278,615),(3278,616),(3279,617),(3279,618),(3279,619),(3279,628),(3279,629),(3280,620),(3280,621),(3280,622),(3281,623),(3281,624),(3281,625),(3282,626),(3282,825),(3283,630),(3283,631),(3284,632),(3284,633),(3284,634),(3285,635),(3285,940),(3286,638),(3286,639),(3286,640),(3287,641),(3287,642),(3287,643),(3288,644),(3288,645),(3288,646),(3289,647),(3289,648),(3289,649),(3290,650),(3290,651),(3290,652),(3291,653),(3291,654),(3291,655),(3292,656),(3292,657),(3292,658),(3293,659),(3293,660),(3293,661),(3294,662),(3294,663),(3294,664),(3295,665),(3295,666),(3295,667),(3296,668),(3296,669),(3296,670),(3297,671),(3297,672),(3297,673),(3298,674),(3298,675),(3298,676),(3299,677),(3299,678),(3299,679),(3300,680),(3300,681),(3300,682),(3301,683),(3301,684),(3301,685),(3302,686),(3302,687),(3302,688),(3303,689),(3303,690),(3303,691),(3304,692),(3304,693),(3304,694),(3305,695),(3305,696),(3305,697),(3306,698),(3306,699),(3306,700),(3307,701),(3307,702),(3307,703),(3308,704),(3308,705),(3308,706),(3309,707),(3309,708),(3310,709),(3310,710),(3311,711),(3311,712),(3311,713),(3312,714),(3312,715),(3312,716),(3313,717),(3313,1167),(3314,720),(3314,721),(3314,722),(3315,723),(3315,724),(3315,725),(3316,726),(3316,727),(3316,728),(3317,729),(3317,730),(3317,731),(3318,732),(3318,733),(3318,734),(3319,735),(3319,736),(3319,737),(3320,738),(3320,739),(3320,740),(3321,741),(3321,742),(3322,743),(3322,744),(3323,745),(3323,746),(3323,747),(3324,748),(3324,749),(3324,750),(3325,751),(3325,752),(3325,753),(3326,754),(3326,755),(3327,756),(3327,757),(3328,758),(3328,789),(3329,761),(3329,790),(3330,762),(3330,763),(3331,768),(3331,785),(3331,786),(3332,769),(3332,783),(3332,784),(3335,766),(3336,767),(3343,770),(3343,771),(3344,772),(3344,773),(3345,774),(3345,775),(3347,776),(3347,777),(3347,987),(3348,778),(3348,779),(3349,780),(3372,781),(3372,782),(3373,787),(3373,788),(3376,791),(3376,792),(3377,793),(3377,794),(3378,799),(3378,800),(3379,801),(3379,802),(3380,795),(3380,796),(3381,797),(3381,798),(3383,805),(3384,806),(3384,807),(3385,808),(3385,809),(3386,810),(3386,811),(3387,812),(3387,814),(3388,815),(3388,816),(3391,817),(3391,818),(3391,819),(3392,820),(3392,821),(3392,822),(3393,826),(3393,827),(3394,828),(3394,829),(3395,830),(3395,831),(3396,834),(3396,835),(3397,832),(3397,833),(3398,836),(3398,837),(3399,838),(3399,839),(3410,850),(3410,851),(3411,852),(3411,853),(3412,848),(3412,849),(3419,860),(3419,951),(3420,859),(3420,861),(3422,862),(3422,863),(3423,864),(3423,865),(3424,866),(3424,867),(3424,872),(3424,873),(3425,868),(3425,869),(3425,874),(3425,875),(3426,878),(3426,879),(3427,876),(3427,877),(3428,880),(3432,884),(3432,885),(3432,886),(3434,887),(3434,888),(3434,889),(3441,894),(3441,895),(3442,896),(3442,897),(3444,904),(3445,905),(3449,906),(3449,907),(3450,908),(3450,909),(3453,910),(3458,915),(3458,916),(3459,917),(3459,918),(3463,919),(3463,920),(3485,929),(3486,930),(3487,931),(3488,932),(3489,933),(3493,2),(3494,2),(3501,934),(3502,936),(3503,938),(3504,939),(3505,941),(3506,942),(3507,943),(3508,944),(3509,945),(3510,946),(3511,947),(3512,948),(3514,949),(3514,950),(3515,953),(3516,954),(3517,955),(3518,956),(3519,957),(3520,958),(3521,959),(3527,960),(3527,965),(3528,961),(3528,962),(3529,963),(3529,964),(3530,966),(3530,967),(3531,968),(3531,969),(3535,970),(3535,971),(3536,972),(3536,973),(3540,999),(3540,1000),(3541,1001),(8888,9999);
      CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB;
      SET GLOBAL innodb_buffer_pool_size=16*1024*1024;
      SELECT SLEEP(3);
      

      Leads to:

      10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

      mysqld: /test/10.6_dbg/storage/innobase/buf/buf0flu.cc:285: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed.
      

      10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

      Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14bce9bfd700 (LWP 2398289))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005584e0e510d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x00005584e05e5ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014bd1dcef859 in __GI_abort () at abort.c:79
      #6  0x000014bd1dcef729 in __assert_fail_base (fmt=0x14bd1de85588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5584e12706d0 "!fsp_is_system_temporary(bpage->id().space())", file=0x5584e1270238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=285, function=<optimized out>) at assert.c:92
      #7  0x000014bd1dd00f36 in __GI___assert_fail (assertion=assertion@entry=0x5584e12706d0 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x5584e1270238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=285, function=function@entry=0x5584e1270b48 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101
      #8  0x00005584e0cc84a4 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x14bcf402ec20, dpage=dpage@entry=0x14bcfc000a80) at /test/10.6_dbg/storage/innobase/include/fsp0types.h:200
      #9  0x00005584e0cb7918 in buf_pool_t::realloc (this=this@entry=0x5584e1863c00 <buf_pool>, block=block@entry=0x14bcf402ec20) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1617
      #10 0x00005584e0cb8403 in buf_pool_t::withdraw_blocks (this=this@entry=0x5584e1863c00 <buf_pool>) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1764
      #11 0x00005584e0cb9f73 in buf_pool_t::resize (this=this@entry=0x5584e1863c00 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
      #12 0x00005584e0cb3b4a in buf_resize_callback () at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:2317
      #13 0x00005584e0ddd3a5 in tpool::task_group::execute (this=0x5584e21b4080 <single_threaded_group>, t=t@entry=0x5584e21b3fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task_group.cc:55
      #14 0x00005584e0ddd501 in tpool::task::execute (this=0x5584e21b3fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task.cc:47
      #15 0x00005584e0ddc0b9 in tpool::thread_pool_generic::worker_main (this=0x5584e42b08d0, thread_var=0x5584e42c0270) at /test/10.6_dbg/tpool/tpool_generic.cc:546
      #16 0x00005584e0ddc3f2 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
      #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
      #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
      #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
      #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
      #21 0x000014bd1e0e1d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #22 0x000014bd1e1fd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x000014bd1ddec293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.9 (dbg), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

      In spite of the options being available in for example 10.3 and 10.4, these releases does not crash. This is thus a regression. The reason may however be this (or related to this):

      10.4.18 3454b5cf35a61e8f6cfab376638520dee4a50609 (Debug)

      10.4.18>SET GLOBAL innodb_buffer_pool_size=16*1024*1024;
      Query OK, 0 rows affected, 1 warning (0.000 sec)
       
      10.4.18>SHOW WARNINGS;
      +---------+------+----------------------------------------------------------------------------------+
      | Level   | Code | Message                                                                          |
      +---------+------+----------------------------------------------------------------------------------+
      | Warning | 1210 | innodb_buffer_pool_size must be at least innodb_buffer_pool_chunk_size=134217728 |
      +---------+------+----------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar created issue -
            Roel Roel Van de Paar made changes -
            Field Original Value New Value
            Description {noformat}
            # mysqld options required for replay: --innodb-buffer-pool-size=300M
            SET sql_mode='';
            SET GLOBAL innodb_limit_optimistic_insert_debug=2;
            SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
            CREATE TABLE t1 (a TIME, b DATETIME, KEY(a), KEY(b)) ENGINE=InnoDB;
            INSERT INTO t1 VALUES (2775,974),(2775,975),(2775,976),(2778,977),(2778,978),(2782,979),(2790,986),(2790,1139),(2792,840),(2792,984),(2792,989),(2793,982),(2793,992),(2793,993),(2793,994),(2795,323),(2795,332),(2797,980),(2797,997),(2797,998),(2798,1103),(2798,1104),(2799,841),(2799,985),(2799,988),(2833,983),(2833,990),(2833,991),(2834,981),(2834,995),(2834,996),(2835,316),(2835,317),(3007,854),(3007,856),(3008,855),(3008,857),(3009,823),(3009,824),(3014,1),(3015,1),(3016,2),(3017,2),(3018,3),(3019,3),(3024,842),(3024,843),(3024,844),(3025,845),(3025,846),(3025,847),(3040,31),(3041,32),(3042,52),(3042,55),(3043,53),(3043,54),(3044,278),(3044,279),(3044,280),(3044,281),(3044,282),(3044,283),(3044,284),(3044,285),(3045,1),(3046,1),(3049,220),(3050,221),(3050,222),(3051,2),(3052,2),(3053,223),(3054,224),(3055,225),(3056,226),(3057,227),(3058,228),(3059,229),(3060,327),(3066,236),(3067,237),(3068,238),(3069,239),(3070,240),(3080,241),(3081,242),(3082,247),(3083,248),(3084,249),(3085,250),(3086,251),(3087,252),(3088,253),(3089,254),(3090,255),(3091,256),(3092,257),(3093,258),(3094,259),(3096,263),(3097,264),(3100,273),(3100,302),(3101,266),(3102,267),(3103,268),(3104,269),(3105,270),(3111,275),(3112,238),(3113,272),(3115,286),(3116,318),(3116,319),(3117,290),(3117,292),(3118,238),(3119,291),(3119,293),(3120,304),(3121,305),(3122,306),(3123,307),(3124,308),(3125,309),(3126,310),(3127,311),(3128,312),(3128,336),(3129,313),(3129,350),(3130,314),(3131,315),(3131,351),(3132,325),(3132,328),(3134,502),(3138,334),(3139,338),(3139,339),(3140,340),(3140,341),(3141,344),(3141,345),(3142,346),(3142,347),(3149,351),(3149,354),(3150,351),(3150,356),(3152,358),(3152,359),(3153,361),(3153,370),(3154,363),(3154,369),(3156,350),(3156,371),(3159,376),(3160,377),(3160,379),(3160,384),(3161,378),(3161,380),(3161,383),(3162,388),(3162,389),(3162,390),(3169,392),(3169,393),(3169,394),(3170,395),(3170,396),(3170,397),(3171,398),(3171,399),(3171,400),(3172,401),(3172,402),(3172,403),(3173,404),(3173,405),(3173,406),(3178,351),(3178,421),(3190,411),(3190,412),(3191,413),(3191,414),(3192,415),(3192,416),(3193,417),(3193,418),(3194,419),(3194,420),(3195,353),(3195,424),(3196,425),(3196,426),(3197,427),(3197,428),(3198,429),(3198,430),(3199,431),(3199,432),(3200,433),(3200,434),(3201,435),(3201,436),(3202,437),(3202,438),(3203,439),(3203,440),(3204,441),(3204,442),(3205,443),(3205,444),(3206,445),(3206,446),(3207,447),(3207,448),(3208,449),(3208,450),(3209,451),(3209,452),(3210,453),(3210,454),(3211,455),(3211,456),(3212,457),(3212,458),(3213,459),(3213,460),(3214,461),(3214,462),(3215,463),(3215,464),(3218,466),(3218,467),(3218,468),(3219,469),(3219,470),(3219,471),(3220,474),(3220,475),(3220,476),(3221,477),(3221,478),(3221,479),(3222,480),(3222,481),(3223,482),(3223,483),(3224,484),(3224,485),(3225,486),(3225,487),(3227,503),(3227,505),(3228,506),(3228,507),(3230,508),(3230,509),(3231,510),(3231,511),(3232,512),(3232,513),(3233,514),(3233,515),(3234,516),(3234,517),(3235,518),(3235,519),(3237,521),(3237,522),(3239,524),(3239,525),(3240,526),(3240,527),(3241,528),(3241,529),(3242,530),(3242,531),(3243,532),(3243,533),(3244,534),(3244,535),(3245,536),(3245,537),(3246,538),(3246,539),(3252,540),(3252,541),(3254,543),(3254,544),(3254,545),(3255,547),(3255,548),(3255,571),(3256,550),(3256,551),(3256,572),(3257,553),(3257,554),(3257,573),(3258,556),(3258,557),(3258,574),(3259,559),(3259,560),(3259,575),(3260,561),(3260,562),(3260,563),(3261,565),(3261,576),(3262,566),(3262,567),(3263,568),(3263,569),(3263,570),(3264,577),(3264,578),(3265,579),(3265,580),(3266,581),(3266,582),(3266,591),(3267,583),(3267,584),(3267,592),(3268,585),(3268,586),(3268,593),(3269,587),(3269,588),(3269,594),(3270,589),(3270,590),(3271,595),(3271,596),(3271,597),(3272,598),(3272,599),(3273,600),(3273,601),(3273,602),(3274,603),(3274,604),(3274,605),(3275,606),(3275,607),(3275,608),(3276,609),(3276,610),(3276,611),(3277,612),(3277,613),(3277,614),(3278,615),(3278,616),(3279,617),(3279,618),(3279,619),(3279,628),(3279,629),(3280,620),(3280,621),(3280,622),(3281,623),(3281,624),(3281,625),(3282,626),(3282,825),(3283,630),(3283,631),(3284,632),(3284,633),(3284,634),(3285,635),(3285,940),(3286,638),(3286,639),(3286,640),(3287,641),(3287,642),(3287,643),(3288,644),(3288,645),(3288,646),(3289,647),(3289,648),(3289,649),(3290,650),(3290,651),(3290,652),(3291,653),(3291,654),(3291,655),(3292,656),(3292,657),(3292,658),(3293,659),(3293,660),(3293,661),(3294,662),(3294,663),(3294,664),(3295,665),(3295,666),(3295,667),(3296,668),(3296,669),(3296,670),(3297,671),(3297,672),(3297,673),(3298,674),(3298,675),(3298,676),(3299,677),(3299,678),(3299,679),(3300,680),(3300,681),(3300,682),(3301,683),(3301,684),(3301,685),(3302,686),(3302,687),(3302,688),(3303,689),(3303,690),(3303,691),(3304,692),(3304,693),(3304,694),(3305,695),(3305,696),(3305,697),(3306,698),(3306,699),(3306,700),(3307,701),(3307,702),(3307,703),(3308,704),(3308,705),(3308,706),(3309,707),(3309,708),(3310,709),(3310,710),(3311,711),(3311,712),(3311,713),(3312,714),(3312,715),(3312,716),(3313,717),(3313,1167),(3314,720),(3314,721),(3314,722),(3315,723),(3315,724),(3315,725),(3316,726),(3316,727),(3316,728),(3317,729),(3317,730),(3317,731),(3318,732),(3318,733),(3318,734),(3319,735),(3319,736),(3319,737),(3320,738),(3320,739),(3320,740),(3321,741),(3321,742),(3322,743),(3322,744),(3323,745),(3323,746),(3323,747),(3324,748),(3324,749),(3324,750),(3325,751),(3325,752),(3325,753),(3326,754),(3326,755),(3327,756),(3327,757),(3328,758),(3328,789),(3329,761),(3329,790),(3330,762),(3330,763),(3331,768),(3331,785),(3331,786),(3332,769),(3332,783),(3332,784),(3335,766),(3336,767),(3343,770),(3343,771),(3344,772),(3344,773),(3345,774),(3345,775),(3347,776),(3347,777),(3347,987),(3348,778),(3348,779),(3349,780),(3372,781),(3372,782),(3373,787),(3373,788),(3376,791),(3376,792),(3377,793),(3377,794),(3378,799),(3378,800),(3379,801),(3379,802),(3380,795),(3380,796),(3381,797),(3381,798),(3383,805),(3384,806),(3384,807),(3385,808),(3385,809),(3386,810),(3386,811),(3387,812),(3387,814),(3388,815),(3388,816),(3391,817),(3391,818),(3391,819),(3392,820),(3392,821),(3392,822),(3393,826),(3393,827),(3394,828),(3394,829),(3395,830),(3395,831),(3396,834),(3396,835),(3397,832),(3397,833),(3398,836),(3398,837),(3399,838),(3399,839),(3410,850),(3410,851),(3411,852),(3411,853),(3412,848),(3412,849),(3419,860),(3419,951),(3420,859),(3420,861),(3422,862),(3422,863),(3423,864),(3423,865),(3424,866),(3424,867),(3424,872),(3424,873),(3425,868),(3425,869),(3425,874),(3425,875),(3426,878),(3426,879),(3427,876),(3427,877),(3428,880),(3432,884),(3432,885),(3432,886),(3434,887),(3434,888),(3434,889),(3441,894),(3441,895),(3442,896),(3442,897),(3444,904),(3445,905),(3449,906),(3449,907),(3450,908),(3450,909),(3453,910),(3458,915),(3458,916),(3459,917),(3459,918),(3463,919),(3463,920),(3485,929),(3486,930),(3487,931),(3488,932),(3489,933),(3493,2),(3494,2),(3501,934),(3502,936),(3503,938),(3504,939),(3505,941),(3506,942),(3507,943),(3508,944),(3509,945),(3510,946),(3511,947),(3512,948),(3514,949),(3514,950),(3515,953),(3516,954),(3517,955),(3518,956),(3519,957),(3520,958),(3521,959),(3527,960),(3527,965),(3528,961),(3528,962),(3529,963),(3529,964),(3530,966),(3530,967),(3531,968),(3531,969),(3535,970),(3535,971),(3536,972),(3536,973),(3540,999),(3540,1000),(3541,1001),(8888,9999);
            CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB;
            SET GLOBAL innodb_buffer_pool_size=16*1024*1024;
            SELECT SLEEP(3);
            {noformat}

            Leads to:

            {noformat:title=10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)}
            mysqld: /test/10.6_dbg/storage/innobase/buf/buf0flu.cc:285: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed.
            {noformat}

            {noformat:title=10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)}
            Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x14bce9bfd700 (LWP 2398289))]
            (gdb) bt
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1 0x00005584e0e510d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2 0x00005584e05e5ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
            #3 <signal handler called>
            #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5 0x000014bd1dcef859 in __GI_abort () at abort.c:79
            #6 0x000014bd1dcef729 in __assert_fail_base (fmt=0x14bd1de85588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5584e12706d0 "!fsp_is_system_temporary(bpage->id().space())", file=0x5584e1270238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=285, function=<optimized out>) at assert.c:92
            #7 0x000014bd1dd00f36 in __GI___assert_fail (assertion=assertion@entry=0x5584e12706d0 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x5584e1270238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=285, function=function@entry=0x5584e1270b48 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101
            #8 0x00005584e0cc84a4 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x14bcf402ec20, dpage=dpage@entry=0x14bcfc000a80) at /test/10.6_dbg/storage/innobase/include/fsp0types.h:200
            #9 0x00005584e0cb7918 in buf_pool_t::realloc (this=this@entry=0x5584e1863c00 <buf_pool>, block=block@entry=0x14bcf402ec20) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1617
            #10 0x00005584e0cb8403 in buf_pool_t::withdraw_blocks (this=this@entry=0x5584e1863c00 <buf_pool>) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1764
            #11 0x00005584e0cb9f73 in buf_pool_t::resize (this=this@entry=0x5584e1863c00 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
            #12 0x00005584e0cb3b4a in buf_resize_callback () at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:2317
            #13 0x00005584e0ddd3a5 in tpool::task_group::execute (this=0x5584e21b4080 <single_threaded_group>, t=t@entry=0x5584e21b3fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task_group.cc:55
            #14 0x00005584e0ddd501 in tpool::task::execute (this=0x5584e21b3fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task.cc:47
            #15 0x00005584e0ddc0b9 in tpool::thread_pool_generic::worker_main (this=0x5584e42b08d0, thread_var=0x5584e42c0270) at /test/10.6_dbg/tpool/tpool_generic.cc:546
            #16 0x00005584e0ddc3f2 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
            #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
            #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
            #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
            #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
            #21 0x000014bd1e0e1d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
            #22 0x000014bd1e1fd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #23 0x000014bd1ddec293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.9 (dbg), 10.6.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

            In spite of the options being available in for example 10.3 and 10.4, these releases does not crash. This is thus a regression. The reason may however be this or related to this:
            {noformat:title=10.4.18 3454b5cf35a61e8f6cfab376638520dee4a50609 (Debug)}
            10.4.18>SET GLOBAL innodb_buffer_pool_size=16*1024*1024;
            Query OK, 0 rows affected, 1 warning (0.000 sec)

            10.4.18>SHOW WARNINGS;
            +---------+------+----------------------------------------------------------------------------------+
            | Level | Code | Message |
            +---------+------+----------------------------------------------------------------------------------+
            | Warning | 1210 | innodb_buffer_pool_size must be at least innodb_buffer_pool_chunk_size=134217728 |
            +---------+------+----------------------------------------------------------------------------------+
            1 row in set (0.000 sec)
            {noformat}
            {noformat}
            # mysqld options required for replay: --innodb-buffer-pool-size=300M
            SET sql_mode='';
            SET GLOBAL innodb_limit_optimistic_insert_debug=2;
            SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
            CREATE TABLE t1 (a TIME, b DATETIME, KEY(a), KEY(b)) ENGINE=InnoDB;
            INSERT INTO t1 VALUES (2775,974),(2775,975),(2775,976),(2778,977),(2778,978),(2782,979),(2790,986),(2790,1139),(2792,840),(2792,984),(2792,989),(2793,982),(2793,992),(2793,993),(2793,994),(2795,323),(2795,332),(2797,980),(2797,997),(2797,998),(2798,1103),(2798,1104),(2799,841),(2799,985),(2799,988),(2833,983),(2833,990),(2833,991),(2834,981),(2834,995),(2834,996),(2835,316),(2835,317),(3007,854),(3007,856),(3008,855),(3008,857),(3009,823),(3009,824),(3014,1),(3015,1),(3016,2),(3017,2),(3018,3),(3019,3),(3024,842),(3024,843),(3024,844),(3025,845),(3025,846),(3025,847),(3040,31),(3041,32),(3042,52),(3042,55),(3043,53),(3043,54),(3044,278),(3044,279),(3044,280),(3044,281),(3044,282),(3044,283),(3044,284),(3044,285),(3045,1),(3046,1),(3049,220),(3050,221),(3050,222),(3051,2),(3052,2),(3053,223),(3054,224),(3055,225),(3056,226),(3057,227),(3058,228),(3059,229),(3060,327),(3066,236),(3067,237),(3068,238),(3069,239),(3070,240),(3080,241),(3081,242),(3082,247),(3083,248),(3084,249),(3085,250),(3086,251),(3087,252),(3088,253),(3089,254),(3090,255),(3091,256),(3092,257),(3093,258),(3094,259),(3096,263),(3097,264),(3100,273),(3100,302),(3101,266),(3102,267),(3103,268),(3104,269),(3105,270),(3111,275),(3112,238),(3113,272),(3115,286),(3116,318),(3116,319),(3117,290),(3117,292),(3118,238),(3119,291),(3119,293),(3120,304),(3121,305),(3122,306),(3123,307),(3124,308),(3125,309),(3126,310),(3127,311),(3128,312),(3128,336),(3129,313),(3129,350),(3130,314),(3131,315),(3131,351),(3132,325),(3132,328),(3134,502),(3138,334),(3139,338),(3139,339),(3140,340),(3140,341),(3141,344),(3141,345),(3142,346),(3142,347),(3149,351),(3149,354),(3150,351),(3150,356),(3152,358),(3152,359),(3153,361),(3153,370),(3154,363),(3154,369),(3156,350),(3156,371),(3159,376),(3160,377),(3160,379),(3160,384),(3161,378),(3161,380),(3161,383),(3162,388),(3162,389),(3162,390),(3169,392),(3169,393),(3169,394),(3170,395),(3170,396),(3170,397),(3171,398),(3171,399),(3171,400),(3172,401),(3172,402),(3172,403),(3173,404),(3173,405),(3173,406),(3178,351),(3178,421),(3190,411),(3190,412),(3191,413),(3191,414),(3192,415),(3192,416),(3193,417),(3193,418),(3194,419),(3194,420),(3195,353),(3195,424),(3196,425),(3196,426),(3197,427),(3197,428),(3198,429),(3198,430),(3199,431),(3199,432),(3200,433),(3200,434),(3201,435),(3201,436),(3202,437),(3202,438),(3203,439),(3203,440),(3204,441),(3204,442),(3205,443),(3205,444),(3206,445),(3206,446),(3207,447),(3207,448),(3208,449),(3208,450),(3209,451),(3209,452),(3210,453),(3210,454),(3211,455),(3211,456),(3212,457),(3212,458),(3213,459),(3213,460),(3214,461),(3214,462),(3215,463),(3215,464),(3218,466),(3218,467),(3218,468),(3219,469),(3219,470),(3219,471),(3220,474),(3220,475),(3220,476),(3221,477),(3221,478),(3221,479),(3222,480),(3222,481),(3223,482),(3223,483),(3224,484),(3224,485),(3225,486),(3225,487),(3227,503),(3227,505),(3228,506),(3228,507),(3230,508),(3230,509),(3231,510),(3231,511),(3232,512),(3232,513),(3233,514),(3233,515),(3234,516),(3234,517),(3235,518),(3235,519),(3237,521),(3237,522),(3239,524),(3239,525),(3240,526),(3240,527),(3241,528),(3241,529),(3242,530),(3242,531),(3243,532),(3243,533),(3244,534),(3244,535),(3245,536),(3245,537),(3246,538),(3246,539),(3252,540),(3252,541),(3254,543),(3254,544),(3254,545),(3255,547),(3255,548),(3255,571),(3256,550),(3256,551),(3256,572),(3257,553),(3257,554),(3257,573),(3258,556),(3258,557),(3258,574),(3259,559),(3259,560),(3259,575),(3260,561),(3260,562),(3260,563),(3261,565),(3261,576),(3262,566),(3262,567),(3263,568),(3263,569),(3263,570),(3264,577),(3264,578),(3265,579),(3265,580),(3266,581),(3266,582),(3266,591),(3267,583),(3267,584),(3267,592),(3268,585),(3268,586),(3268,593),(3269,587),(3269,588),(3269,594),(3270,589),(3270,590),(3271,595),(3271,596),(3271,597),(3272,598),(3272,599),(3273,600),(3273,601),(3273,602),(3274,603),(3274,604),(3274,605),(3275,606),(3275,607),(3275,608),(3276,609),(3276,610),(3276,611),(3277,612),(3277,613),(3277,614),(3278,615),(3278,616),(3279,617),(3279,618),(3279,619),(3279,628),(3279,629),(3280,620),(3280,621),(3280,622),(3281,623),(3281,624),(3281,625),(3282,626),(3282,825),(3283,630),(3283,631),(3284,632),(3284,633),(3284,634),(3285,635),(3285,940),(3286,638),(3286,639),(3286,640),(3287,641),(3287,642),(3287,643),(3288,644),(3288,645),(3288,646),(3289,647),(3289,648),(3289,649),(3290,650),(3290,651),(3290,652),(3291,653),(3291,654),(3291,655),(3292,656),(3292,657),(3292,658),(3293,659),(3293,660),(3293,661),(3294,662),(3294,663),(3294,664),(3295,665),(3295,666),(3295,667),(3296,668),(3296,669),(3296,670),(3297,671),(3297,672),(3297,673),(3298,674),(3298,675),(3298,676),(3299,677),(3299,678),(3299,679),(3300,680),(3300,681),(3300,682),(3301,683),(3301,684),(3301,685),(3302,686),(3302,687),(3302,688),(3303,689),(3303,690),(3303,691),(3304,692),(3304,693),(3304,694),(3305,695),(3305,696),(3305,697),(3306,698),(3306,699),(3306,700),(3307,701),(3307,702),(3307,703),(3308,704),(3308,705),(3308,706),(3309,707),(3309,708),(3310,709),(3310,710),(3311,711),(3311,712),(3311,713),(3312,714),(3312,715),(3312,716),(3313,717),(3313,1167),(3314,720),(3314,721),(3314,722),(3315,723),(3315,724),(3315,725),(3316,726),(3316,727),(3316,728),(3317,729),(3317,730),(3317,731),(3318,732),(3318,733),(3318,734),(3319,735),(3319,736),(3319,737),(3320,738),(3320,739),(3320,740),(3321,741),(3321,742),(3322,743),(3322,744),(3323,745),(3323,746),(3323,747),(3324,748),(3324,749),(3324,750),(3325,751),(3325,752),(3325,753),(3326,754),(3326,755),(3327,756),(3327,757),(3328,758),(3328,789),(3329,761),(3329,790),(3330,762),(3330,763),(3331,768),(3331,785),(3331,786),(3332,769),(3332,783),(3332,784),(3335,766),(3336,767),(3343,770),(3343,771),(3344,772),(3344,773),(3345,774),(3345,775),(3347,776),(3347,777),(3347,987),(3348,778),(3348,779),(3349,780),(3372,781),(3372,782),(3373,787),(3373,788),(3376,791),(3376,792),(3377,793),(3377,794),(3378,799),(3378,800),(3379,801),(3379,802),(3380,795),(3380,796),(3381,797),(3381,798),(3383,805),(3384,806),(3384,807),(3385,808),(3385,809),(3386,810),(3386,811),(3387,812),(3387,814),(3388,815),(3388,816),(3391,817),(3391,818),(3391,819),(3392,820),(3392,821),(3392,822),(3393,826),(3393,827),(3394,828),(3394,829),(3395,830),(3395,831),(3396,834),(3396,835),(3397,832),(3397,833),(3398,836),(3398,837),(3399,838),(3399,839),(3410,850),(3410,851),(3411,852),(3411,853),(3412,848),(3412,849),(3419,860),(3419,951),(3420,859),(3420,861),(3422,862),(3422,863),(3423,864),(3423,865),(3424,866),(3424,867),(3424,872),(3424,873),(3425,868),(3425,869),(3425,874),(3425,875),(3426,878),(3426,879),(3427,876),(3427,877),(3428,880),(3432,884),(3432,885),(3432,886),(3434,887),(3434,888),(3434,889),(3441,894),(3441,895),(3442,896),(3442,897),(3444,904),(3445,905),(3449,906),(3449,907),(3450,908),(3450,909),(3453,910),(3458,915),(3458,916),(3459,917),(3459,918),(3463,919),(3463,920),(3485,929),(3486,930),(3487,931),(3488,932),(3489,933),(3493,2),(3494,2),(3501,934),(3502,936),(3503,938),(3504,939),(3505,941),(3506,942),(3507,943),(3508,944),(3509,945),(3510,946),(3511,947),(3512,948),(3514,949),(3514,950),(3515,953),(3516,954),(3517,955),(3518,956),(3519,957),(3520,958),(3521,959),(3527,960),(3527,965),(3528,961),(3528,962),(3529,963),(3529,964),(3530,966),(3530,967),(3531,968),(3531,969),(3535,970),(3535,971),(3536,972),(3536,973),(3540,999),(3540,1000),(3541,1001),(8888,9999);
            CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB;
            SET GLOBAL innodb_buffer_pool_size=16*1024*1024;
            SELECT SLEEP(3);
            {noformat}

            Leads to:

            {noformat:title=10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)}
            mysqld: /test/10.6_dbg/storage/innobase/buf/buf0flu.cc:285: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed.
            {noformat}

            {noformat:title=10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)}
            Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x14bce9bfd700 (LWP 2398289))]
            (gdb) bt
            #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1 0x00005584e0e510d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2 0x00005584e05e5ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
            #3 <signal handler called>
            #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5 0x000014bd1dcef859 in __GI_abort () at abort.c:79
            #6 0x000014bd1dcef729 in __assert_fail_base (fmt=0x14bd1de85588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5584e12706d0 "!fsp_is_system_temporary(bpage->id().space())", file=0x5584e1270238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=285, function=<optimized out>) at assert.c:92
            #7 0x000014bd1dd00f36 in __GI___assert_fail (assertion=assertion@entry=0x5584e12706d0 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x5584e1270238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=285, function=function@entry=0x5584e1270b48 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101
            #8 0x00005584e0cc84a4 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x14bcf402ec20, dpage=dpage@entry=0x14bcfc000a80) at /test/10.6_dbg/storage/innobase/include/fsp0types.h:200
            #9 0x00005584e0cb7918 in buf_pool_t::realloc (this=this@entry=0x5584e1863c00 <buf_pool>, block=block@entry=0x14bcf402ec20) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1617
            #10 0x00005584e0cb8403 in buf_pool_t::withdraw_blocks (this=this@entry=0x5584e1863c00 <buf_pool>) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1764
            #11 0x00005584e0cb9f73 in buf_pool_t::resize (this=this@entry=0x5584e1863c00 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
            #12 0x00005584e0cb3b4a in buf_resize_callback () at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:2317
            #13 0x00005584e0ddd3a5 in tpool::task_group::execute (this=0x5584e21b4080 <single_threaded_group>, t=t@entry=0x5584e21b3fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task_group.cc:55
            #14 0x00005584e0ddd501 in tpool::task::execute (this=0x5584e21b3fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task.cc:47
            #15 0x00005584e0ddc0b9 in tpool::thread_pool_generic::worker_main (this=0x5584e42b08d0, thread_var=0x5584e42c0270) at /test/10.6_dbg/tpool/tpool_generic.cc:546
            #16 0x00005584e0ddc3f2 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
            #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
            #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
            #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
            #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
            #21 0x000014bd1e0e1d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
            #22 0x000014bd1e1fd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #23 0x000014bd1ddec293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.9 (dbg), 10.6.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

            In spite of the options being available in for example 10.3 and 10.4, these releases does not crash. This is thus a regression. The reason may however be this (or related to this):
            {noformat:title=10.4.18 3454b5cf35a61e8f6cfab376638520dee4a50609 (Debug)}
            10.4.18>SET GLOBAL innodb_buffer_pool_size=16*1024*1024;
            Query OK, 0 rows affected, 1 warning (0.000 sec)

            10.4.18>SHOW WARNINGS;
            +---------+------+----------------------------------------------------------------------------------+
            | Level | Code | Message |
            +---------+------+----------------------------------------------------------------------------------+
            | Warning | 1210 | innodb_buffer_pool_size must be at least innodb_buffer_pool_chunk_size=134217728 |
            +---------+------+----------------------------------------------------------------------------------+
            1 row in set (0.000 sec)
            {noformat}
            Roel Roel Van de Paar made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            Roel Roel Van de Paar added a comment - - edited

            Question: could it be that --innodb_disable_resize_buffer_pool_debug reacts differently in the C-connector? I seem to be seeing differences between replaying via C code (pquery) and CLI, which does not happen often. What I am seeing is that --innodb_disable_resize_buffer_pool_debug seems to be required for the CLI whereas it is not required for C-connector based replays, or similar.

            Roel Roel Van de Paar added a comment - - edited Question: could it be that --innodb_disable_resize_buffer_pool_debug reacts differently in the C-connector? I seem to be seeing differences between replaying via C code (pquery) and CLI, which does not happen often. What I am seeing is that --innodb_disable_resize_buffer_pool_debug seems to be required for the CLI whereas it is not required for C-connector based replays, or similar.
            Roel Roel Van de Paar added a comment - - edited

            Secondary testcase. It affects optimized builds also.

            # mysqld options required for replay: --max_allowed_packet=33554432 --innodb-buffer-pool-size=300M
            SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
            SET @inserted_value = REPEAT ('z', 33554431);
            CREATE TEMPORARY TABLE t1 (c1 LONGTEXT NULL) ENGINE=InnoDB;
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            INSERT IGNORE INTO t1 VALUES (@inserted_value);
            SET GLOBAL innodb_buffer_pool_size=1;
            SELECT SLEEP (3);
            

            Leads to:

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

            mysqld: /test/10.6_dbg/storage/innobase/buf/buf0flu.cc:285: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed.
            

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

            Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x154c38d54700 (LWP 3416985))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x0000559f383bf0d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2  0x0000559f37b53ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x0000154c4f4f4859 in __GI_abort () at abort.c:79
            #6  0x0000154c4f4f4729 in __assert_fail_base (fmt=0x154c4f68a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559f387de6d0 "!fsp_is_system_temporary(bpage->id().space())", file=0x559f387de238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=285, function=<optimized out>) at assert.c:92
            #7  0x0000154c4f505f36 in __GI___assert_fail (assertion=assertion@entry=0x559f387de6d0 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x559f387de238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=285, function=function@entry=0x559f387deb48 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101
            #8  0x0000559f382364a4 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x154c1c020520, dpage=dpage@entry=0x154c2c1b9e00) at /test/10.6_dbg/storage/innobase/include/fsp0types.h:200
            #9  0x0000559f38225918 in buf_pool_t::realloc (this=this@entry=0x559f38dd1c00 <buf_pool>, block=block@entry=0x154c1c020520) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1617
            #10 0x0000559f38226403 in buf_pool_t::withdraw_blocks (this=this@entry=0x559f38dd1c00 <buf_pool>) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1764
            #11 0x0000559f38227f73 in buf_pool_t::resize (this=this@entry=0x559f38dd1c00 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
            #12 0x0000559f38221b4a in buf_resize_callback () at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:2317
            #13 0x0000559f3834b3a5 in tpool::task_group::execute (this=0x559f39722080 <single_threaded_group>, t=t@entry=0x559f39721fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task_group.cc:55
            #14 0x0000559f3834b501 in tpool::task::execute (this=0x559f39721fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task.cc:47
            #15 0x0000559f3834a0b9 in tpool::thread_pool_generic::worker_main (this=0x559f3b74d8d0, thread_var=0x559f3b75d570) at /test/10.6_dbg/tpool/tpool_generic.cc:546
            #16 0x0000559f3834a3f2 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
            #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
            #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
            #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
            #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
            #21 0x0000154c4f8e6d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
            #22 0x0000154c4fa02609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #23 0x0000154c4f5f1293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Optimized)

            InnoDB: Failing assertion: list.count > 0
            

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Optimized)

            Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x14d5855f2700 (LWP 3421871))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x0000555919d1966f in my_write_core (sig=sig@entry=6) at /test/10.6_opt/mysys/stacktrace.c:424
            #2  0x000055591978ed20 in handle_fatal_signal (sig=6) at /test/10.6_opt/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x000014d5b9320859 in __GI_abort () at abort.c:79
            #6  0x0000555919454db2 in ut_dbg_assertion_failed (expr=expr@entry=0x55591a0127c1 "list.count > 0", file=file@entry=0x55591a012790 "/test/10.6_opt/storage/innobase/include/ut0lst.h", line=line@entry=334) at /test/10.6_opt/storage/innobase/ut/ut0dbg.cc:60
            #7  0x000055591945e069 in ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*>, GenericGetNode<buf_page_t> > (get_node=<optimized out>, node=<error reading variable>, list=<optimized out>) at /test/10.6_opt/storage/innobase/include/ut0lst.h:329
            #8  ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*> > (elem=0x14d59816bde0, list=<optimized out>) at /test/10.6_opt/storage/innobase/include/ut0lst.h:386
            #9  buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x14d588018c08, dpage=dpage@entry=0x14d59816bde0) at /test/10.6_opt/storage/innobase/buf/buf0flu.cc:309
            #10 0x0000555919c047e4 in buf_pool_t::realloc (this=this@entry=0x55591a5e6ca0 <buf_pool>, block=block@entry=0x14d588018c08) at /test/10.6_opt/storage/innobase/buf/buf0buf.cc:1617
            #11 0x000055591945bdcf in buf_pool_t::withdraw_blocks (this=this@entry=0x55591a5e6ca0 <buf_pool>) at /test/10.6_opt/storage/innobase/buf/buf0buf.cc:1764
            #12 0x000055591945c136 in buf_pool_t::resize (this=this@entry=0x55591a5e6ca0 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
            #13 0x000055591945b7c4 in buf_resize_callback () at /test/10.6_opt/storage/innobase/buf/buf0buf.cc:2317
            #14 0x0000555919cac59a in tpool::task_group::execute (this=0x55591af2e7e0 <single_threaded_group>, t=0x55591af2e740 <buf_resize_task>) at /test/10.6_opt/tpool/task_group.cc:55
            #15 0x0000555919cab347 in tpool::thread_pool_generic::worker_main (this=0x55591bc1d250, thread_var=0x55591bc2cd70) at /test/10.6_opt/tpool/tpool_generic.cc:546
            #16 0x000014d5b9712d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
            #17 0x000014d5b982e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #18 0x000014d5b941d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Debug)

            mysqld: /test/10.5_dbg/storage/innobase/buf/buf0flu.cc:287: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed.
            

            10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Debug)

            Core was generated by `/test/MD010121-mariadb-10.5.9-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x152180a09700 (LWP 3422176))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x0000560f3b0bd955 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
            #2  0x0000560f3a80f879 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x000015219846b859 in __GI_abort () at abort.c:79
            #6  0x000015219846b729 in __assert_fail_base (fmt=0x152198601588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x560f3b4e1c50 "!fsp_is_system_temporary(bpage->id().space())", file=0x560f3b4e17b8 "/test/10.5_dbg/storage/innobase/buf/buf0flu.cc", line=287, function=<optimized out>) at assert.c:92
            #7  0x000015219847cf36 in __GI___assert_fail (assertion=assertion@entry=0x560f3b4e1c50 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x560f3b4e17b8 "/test/10.5_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=287, function=function@entry=0x560f3b4e20c8 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101
            #8  0x0000560f3af21d19 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x15216403fcf0, dpage=dpage@entry=0x1521742c05b0) at /test/10.5_dbg/storage/innobase/include/fsp0types.h:200
            #9  0x0000560f3af0e7e9 in buf_pool_t::realloc (this=this@entry=0x560f3badac20 <buf_pool>, block=block@entry=0x15216403fcf0) at /test/10.5_dbg/storage/innobase/buf/buf0buf.cc:1627
            #10 0x0000560f3af0f5b1 in buf_pool_t::withdraw_blocks (this=this@entry=0x560f3badac20 <buf_pool>) at /test/10.5_dbg/storage/innobase/buf/buf0buf.cc:1774
            #11 0x0000560f3af11071 in buf_pool_t::resize (this=this@entry=0x560f3badac20 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
            #12 0x0000560f3af0b04a in buf_resize_callback () at /test/10.5_dbg/storage/innobase/buf/buf0buf.cc:2332
            #13 0x0000560f3b049c23 in tpool::task_group::execute (this=0x560f3c433ec0 <single_threaded_group>, t=t@entry=0x560f3c433e20 <buf_resize_task>) at /test/10.5_dbg/tpool/task_group.cc:55
            #14 0x0000560f3b049d7f in tpool::task::execute (this=0x560f3c433e20 <buf_resize_task>) at /test/10.5_dbg/tpool/task.cc:47
            #15 0x0000560f3b048937 in tpool::thread_pool_generic::worker_main (this=0x560f3d3e2fd0, thread_var=0x560f3d3f2b70) at /test/10.5_dbg/tpool/tpool_generic.cc:546
            #16 0x0000560f3b048c70 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
            #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
            #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
            #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
            #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
            #21 0x000015219885dd84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
            #22 0x0000152198979609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #23 0x0000152198568293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Optimized)

            InnoDB: Failing assertion: list.count > 0
            

            10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Optimized)

            Core was generated by `/test/MD010121-mariadb-10.5.9-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x145e48918700 (LWP 3421909))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000056087a0cb93f in my_write_core (sig=sig@entry=6) at /test/10.5_opt/mysys/stacktrace.c:424
            #2  0x0000560879af8b90 in handle_fatal_signal (sig=6) at /test/10.5_opt/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x0000145e5f4f3859 in __GI_abort () at abort.c:79
            #6  0x00005608797bc0f8 in ut_dbg_assertion_failed (expr=expr@entry=0x56087a3c5079 "list.count > 0", file=file@entry=0x56087a3c5048 "/test/10.5_opt/storage/innobase/include/ut0lst.h", line=line@entry=334) at /test/10.5_opt/storage/innobase/ut/ut0dbg.cc:60
            #7  0x00005608797c5c89 in ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*>, GenericGetNode<buf_page_t> > (get_node=<optimized out>, node=<error reading variable>, list=<optimized out>) at /test/10.5_opt/storage/innobase/include/ut0lst.h:329
            #8  ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*> > (elem=0x145e3c1f8000, list=<optimized out>) at /test/10.5_opt/storage/innobase/include/ut0lst.h:386
            #9  buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x145e2c027200, dpage=dpage@entry=0x145e3c1f8000) at /test/10.5_opt/storage/innobase/buf/buf0flu.cc:311
            #10 0x0000560879f99d14 in buf_pool_t::realloc (this=this@entry=0x56087a99ee40 <buf_pool>, block=block@entry=0x145e2c027200) at /test/10.5_opt/storage/innobase/buf/buf0buf.cc:1627
            #11 0x00005608797c38f5 in buf_pool_t::withdraw_blocks (this=this@entry=0x56087a99ee40 <buf_pool>) at /test/10.5_opt/storage/innobase/buf/buf0buf.cc:1774
            #12 0x00005608797c3c67 in buf_pool_t::resize (this=this@entry=0x56087a99ee40 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
            #13 0x00005608797c32c8 in buf_resize_callback () at /test/10.5_opt/storage/innobase/buf/buf0buf.cc:2332
            #14 0x000056087a05e86a in tpool::task_group::execute (this=0x56087b2f04c0 <single_threaded_group>, t=0x56087b2f0420 <buf_resize_task>) at /test/10.5_opt/tpool/task_group.cc:55
            #15 0x000056087a05d617 in tpool::thread_pool_generic::worker_main (this=0x56087c863860, thread_var=0x56087c873480) at /test/10.5_opt/tpool/tpool_generic.cc:546
            #16 0x0000145e5f8e5d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
            #17 0x0000145e5fa01609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #18 0x0000145e5f5f0293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.5.9 (dbg), 10.5.9 (opt), 10.6.0 (dbg), 10.6.0 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

            Roel Roel Van de Paar added a comment - - edited Secondary testcase. It affects optimized builds also. # mysqld options required for replay: --max_allowed_packet=33554432 --innodb-buffer-pool-size=300M SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF; SET @inserted_value = REPEAT ('z', 33554431); CREATE TEMPORARY TABLE t1 (c1 LONGTEXT NULL) ENGINE=InnoDB; INSERT IGNORE INTO t1 VALUES (@inserted_value); INSERT IGNORE INTO t1 VALUES (@inserted_value); INSERT IGNORE INTO t1 VALUES (@inserted_value); INSERT IGNORE INTO t1 VALUES (@inserted_value); INSERT IGNORE INTO t1 VALUES (@inserted_value); INSERT IGNORE INTO t1 VALUES (@inserted_value); INSERT IGNORE INTO t1 VALUES (@inserted_value); INSERT IGNORE INTO t1 VALUES (@inserted_value); SET GLOBAL innodb_buffer_pool_size=1; SELECT SLEEP (3); Leads to: 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug) mysqld: /test/10.6_dbg/storage/innobase/buf/buf0flu.cc:285: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed. 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug) Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x154c38d54700 (LWP 3416985))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x0000559f383bf0d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424 #2 0x0000559f37b53ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x0000154c4f4f4859 in __GI_abort () at abort.c:79 #6 0x0000154c4f4f4729 in __assert_fail_base (fmt=0x154c4f68a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559f387de6d0 "!fsp_is_system_temporary(bpage->id().space())", file=0x559f387de238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=285, function=<optimized out>) at assert.c:92 #7 0x0000154c4f505f36 in __GI___assert_fail (assertion=assertion@entry=0x559f387de6d0 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x559f387de238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=285, function=function@entry=0x559f387deb48 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101 #8 0x0000559f382364a4 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x154c1c020520, dpage=dpage@entry=0x154c2c1b9e00) at /test/10.6_dbg/storage/innobase/include/fsp0types.h:200 #9 0x0000559f38225918 in buf_pool_t::realloc (this=this@entry=0x559f38dd1c00 <buf_pool>, block=block@entry=0x154c1c020520) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1617 #10 0x0000559f38226403 in buf_pool_t::withdraw_blocks (this=this@entry=0x559f38dd1c00 <buf_pool>) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1764 #11 0x0000559f38227f73 in buf_pool_t::resize (this=this@entry=0x559f38dd1c00 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413 #12 0x0000559f38221b4a in buf_resize_callback () at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:2317 #13 0x0000559f3834b3a5 in tpool::task_group::execute (this=0x559f39722080 <single_threaded_group>, t=t@entry=0x559f39721fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task_group.cc:55 #14 0x0000559f3834b501 in tpool::task::execute (this=0x559f39721fe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task.cc:47 #15 0x0000559f3834a0b9 in tpool::thread_pool_generic::worker_main (this=0x559f3b74d8d0, thread_var=0x559f3b75d570) at /test/10.6_dbg/tpool/tpool_generic.cc:546 #16 0x0000559f3834a3f2 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89 #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95 #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244 #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251 #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195 #21 0x0000154c4f8e6d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #22 0x0000154c4fa02609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #23 0x0000154c4f5f1293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Optimized) InnoDB: Failing assertion: list.count > 0 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Optimized) Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x14d5855f2700 (LWP 3421871))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x0000555919d1966f in my_write_core (sig=sig@entry=6) at /test/10.6_opt/mysys/stacktrace.c:424 #2 0x000055591978ed20 in handle_fatal_signal (sig=6) at /test/10.6_opt/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x000014d5b9320859 in __GI_abort () at abort.c:79 #6 0x0000555919454db2 in ut_dbg_assertion_failed (expr=expr@entry=0x55591a0127c1 "list.count > 0", file=file@entry=0x55591a012790 "/test/10.6_opt/storage/innobase/include/ut0lst.h", line=line@entry=334) at /test/10.6_opt/storage/innobase/ut/ut0dbg.cc:60 #7 0x000055591945e069 in ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*>, GenericGetNode<buf_page_t> > (get_node=<optimized out>, node=<error reading variable>, list=<optimized out>) at /test/10.6_opt/storage/innobase/include/ut0lst.h:329 #8 ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*> > (elem=0x14d59816bde0, list=<optimized out>) at /test/10.6_opt/storage/innobase/include/ut0lst.h:386 #9 buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x14d588018c08, dpage=dpage@entry=0x14d59816bde0) at /test/10.6_opt/storage/innobase/buf/buf0flu.cc:309 #10 0x0000555919c047e4 in buf_pool_t::realloc (this=this@entry=0x55591a5e6ca0 <buf_pool>, block=block@entry=0x14d588018c08) at /test/10.6_opt/storage/innobase/buf/buf0buf.cc:1617 #11 0x000055591945bdcf in buf_pool_t::withdraw_blocks (this=this@entry=0x55591a5e6ca0 <buf_pool>) at /test/10.6_opt/storage/innobase/buf/buf0buf.cc:1764 #12 0x000055591945c136 in buf_pool_t::resize (this=this@entry=0x55591a5e6ca0 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413 #13 0x000055591945b7c4 in buf_resize_callback () at /test/10.6_opt/storage/innobase/buf/buf0buf.cc:2317 #14 0x0000555919cac59a in tpool::task_group::execute (this=0x55591af2e7e0 <single_threaded_group>, t=0x55591af2e740 <buf_resize_task>) at /test/10.6_opt/tpool/task_group.cc:55 #15 0x0000555919cab347 in tpool::thread_pool_generic::worker_main (this=0x55591bc1d250, thread_var=0x55591bc2cd70) at /test/10.6_opt/tpool/tpool_generic.cc:546 #16 0x000014d5b9712d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #17 0x000014d5b982e609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #18 0x000014d5b941d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Debug) mysqld: /test/10.5_dbg/storage/innobase/buf/buf0flu.cc:287: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed. 10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Debug) Core was generated by `/test/MD010121-mariadb-10.5.9-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x152180a09700 (LWP 3422176))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x0000560f3b0bd955 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424 #2 0x0000560f3a80f879 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x000015219846b859 in __GI_abort () at abort.c:79 #6 0x000015219846b729 in __assert_fail_base (fmt=0x152198601588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x560f3b4e1c50 "!fsp_is_system_temporary(bpage->id().space())", file=0x560f3b4e17b8 "/test/10.5_dbg/storage/innobase/buf/buf0flu.cc", line=287, function=<optimized out>) at assert.c:92 #7 0x000015219847cf36 in __GI___assert_fail (assertion=assertion@entry=0x560f3b4e1c50 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x560f3b4e17b8 "/test/10.5_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=287, function=function@entry=0x560f3b4e20c8 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101 #8 0x0000560f3af21d19 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x15216403fcf0, dpage=dpage@entry=0x1521742c05b0) at /test/10.5_dbg/storage/innobase/include/fsp0types.h:200 #9 0x0000560f3af0e7e9 in buf_pool_t::realloc (this=this@entry=0x560f3badac20 <buf_pool>, block=block@entry=0x15216403fcf0) at /test/10.5_dbg/storage/innobase/buf/buf0buf.cc:1627 #10 0x0000560f3af0f5b1 in buf_pool_t::withdraw_blocks (this=this@entry=0x560f3badac20 <buf_pool>) at /test/10.5_dbg/storage/innobase/buf/buf0buf.cc:1774 #11 0x0000560f3af11071 in buf_pool_t::resize (this=this@entry=0x560f3badac20 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413 #12 0x0000560f3af0b04a in buf_resize_callback () at /test/10.5_dbg/storage/innobase/buf/buf0buf.cc:2332 #13 0x0000560f3b049c23 in tpool::task_group::execute (this=0x560f3c433ec0 <single_threaded_group>, t=t@entry=0x560f3c433e20 <buf_resize_task>) at /test/10.5_dbg/tpool/task_group.cc:55 #14 0x0000560f3b049d7f in tpool::task::execute (this=0x560f3c433e20 <buf_resize_task>) at /test/10.5_dbg/tpool/task.cc:47 #15 0x0000560f3b048937 in tpool::thread_pool_generic::worker_main (this=0x560f3d3e2fd0, thread_var=0x560f3d3f2b70) at /test/10.5_dbg/tpool/tpool_generic.cc:546 #16 0x0000560f3b048c70 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89 #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95 #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244 #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251 #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195 #21 0x000015219885dd84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #22 0x0000152198979609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #23 0x0000152198568293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Optimized) InnoDB: Failing assertion: list.count > 0 10.5.9 139c85aafd4e4938f95843d44a455265a49b572e (Optimized) Core was generated by `/test/MD010121-mariadb-10.5.9-linux-x86_64-opt/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x145e48918700 (LWP 3421909))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000056087a0cb93f in my_write_core (sig=sig@entry=6) at /test/10.5_opt/mysys/stacktrace.c:424 #2 0x0000560879af8b90 in handle_fatal_signal (sig=6) at /test/10.5_opt/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x0000145e5f4f3859 in __GI_abort () at abort.c:79 #6 0x00005608797bc0f8 in ut_dbg_assertion_failed (expr=expr@entry=0x56087a3c5079 "list.count > 0", file=file@entry=0x56087a3c5048 "/test/10.5_opt/storage/innobase/include/ut0lst.h", line=line@entry=334) at /test/10.5_opt/storage/innobase/ut/ut0dbg.cc:60 #7 0x00005608797c5c89 in ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*>, GenericGetNode<buf_page_t> > (get_node=<optimized out>, node=<error reading variable>, list=<optimized out>) at /test/10.5_opt/storage/innobase/include/ut0lst.h:329 #8 ut_list_remove<ut_list_base<buf_page_t, ut_list_node<buf_page_t> buf_page_t::*> > (elem=0x145e3c1f8000, list=<optimized out>) at /test/10.5_opt/storage/innobase/include/ut0lst.h:386 #9 buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x145e2c027200, dpage=dpage@entry=0x145e3c1f8000) at /test/10.5_opt/storage/innobase/buf/buf0flu.cc:311 #10 0x0000560879f99d14 in buf_pool_t::realloc (this=this@entry=0x56087a99ee40 <buf_pool>, block=block@entry=0x145e2c027200) at /test/10.5_opt/storage/innobase/buf/buf0buf.cc:1627 #11 0x00005608797c38f5 in buf_pool_t::withdraw_blocks (this=this@entry=0x56087a99ee40 <buf_pool>) at /test/10.5_opt/storage/innobase/buf/buf0buf.cc:1774 #12 0x00005608797c3c67 in buf_pool_t::resize (this=this@entry=0x56087a99ee40 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413 #13 0x00005608797c32c8 in buf_resize_callback () at /test/10.5_opt/storage/innobase/buf/buf0buf.cc:2332 #14 0x000056087a05e86a in tpool::task_group::execute (this=0x56087b2f04c0 <single_threaded_group>, t=0x56087b2f0420 <buf_resize_task>) at /test/10.5_opt/tpool/task_group.cc:55 #15 0x000056087a05d617 in tpool::thread_pool_generic::worker_main (this=0x56087c863860, thread_var=0x56087c873480) at /test/10.5_opt/tpool/tpool_generic.cc:546 #16 0x0000145e5f8e5d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #17 0x0000145e5fa01609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #18 0x0000145e5f5f0293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.5.9 (dbg), 10.5.9 (opt), 10.6.0 (dbg), 10.6.0 (opt) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)
            Roel Roel Van de Paar made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            Roel Roel Van de Paar made changes -
            Summary Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list and Failing assertion: list.count > 0 in
            Roel Roel Van de Paar made changes -
            Summary Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list and Failing assertion: list.count > 0 in Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list and Failing assertion: list.count > 0 in ut_list_remove
            Roel Roel Van de Paar added a comment - - edited

            There is a secondary issue of interest here. If the --max_allowed_packet=33554432 is not passed for the last testcase, or set to a different size, some interesting things happen: 1) the server does not crash. On the other hand, 2) When it is specified, the replay of the "INSERT IGNORE INTO t1 VALUES (@inserted_value);" commands take 0.4 seconds each, whereas they are instantaneous when the max_allowed_packet option is not passed, and even when is set smaller (For example 10000000), which seems odd.

            Roel Roel Van de Paar added a comment - - edited There is a secondary issue of interest here. If the --max_allowed_packet=33554432 is not passed for the last testcase, or set to a different size, some interesting things happen: 1) the server does not crash. On the other hand, 2) When it is specified, the replay of the "INSERT IGNORE INTO t1 VALUES (@inserted_value);" commands take 0.4 seconds each, whereas they are instantaneous when the max_allowed_packet option is not passed, and even when is set smaller (For example 10000000), which seems odd.

            FWIW, I have also seen this issue happen on large partition definitions along the lines of:

            CREATE TABLE t2 (a INT) ENGINE='InnoDB' PARTITION BY LIST (a) SUBPARTITION BY HASH (a)  SUBPARTITIONS 2 (PARTITION p0 VALUES IN (0,1,2,3), PARTITION p1 VALUES IN (4,5,6,7), PARTITION p2 VALUES IN (8,9,10,11), PARTITION p3 VALUES IN (12,13,14,15), PARTITION p4 VALUES IN (16,17,18,19), PARTITION p5 VALUES IN (20,21,22,23),....
            

            Roel Roel Van de Paar added a comment - FWIW, I have also seen this issue happen on large partition definitions along the lines of: CREATE TABLE t2 (a INT) ENGINE='InnoDB' PARTITION BY LIST (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 2 (PARTITION p0 VALUES IN (0,1,2,3), PARTITION p1 VALUES IN (4,5,6,7), PARTITION p2 VALUES IN (8,9,10,11), PARTITION p3 VALUES IN (12,13,14,15), PARTITION p4 VALUES IN (16,17,18,19), PARTITION p5 VALUES IN (20,21,22,23),....
            Roel Roel Van de Paar added a comment - - edited

            Another interesting testcase.

            # mysqld options required for replay: --innodb-buffer-pool-size=300M
            SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
            CREATE TEMPORARY TABLE if NOT exists t1 (a INT) SELECT 1 AS a;
            INSERT INTO t1 VALUES (00),(01),(02),(03),(04),(05),(06),(07),(08),(09),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24),(25),(26),(27),(28),(29),(30),(31),(32),(33),(34),(35),(36),(37),(38),(39),(40),(41),(42),(43),(44),(45),(46),(47),(48),(49),(50),(51),(52),(53),(54),(55),(56),(57),(58),(59),(60),(61),(62),(63),(64),(65),(66),(67),(68),(69),(70),(71),(72),(73),(74),(75),(76),(77),(78),(79),(80),(81),(82),(83),(84),(85),(86),(87),(88),(89),(90),(91),(92),(93),(94),(95),(96),(97),(98),(99);
            ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL FIRST;
            INSERT INTO t1 SELECT @a:=@a+1, @a FROM t1 A, t1 B, t1 C, t1 D WHERE D.a<4;
            CREATE TABLE t2 (col1 char collate latin1_german2_ci);
            SET GLOBAL innodb_buffer_pool_size = 25165824;
            SELECT SLEEP (3);
            

            Leads to:

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

            mysqld: /test/10.6_dbg/storage/innobase/buf/buf0flu.cc:285: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed.
            

            10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

            Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x14f634751700 (LWP 426359))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000056415529d0d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2  0x0000564154a31ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x000014f64b63e859 in __GI_abort () at abort.c:79
            #6  0x000014f64b63e729 in __assert_fail_base (fmt=0x14f64b7d4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5641556bc6d0 "!fsp_is_system_temporary(bpage->id().space())", file=0x5641556bc238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=285, function=<optimized out>) at assert.c:92
            #7  0x000014f64b64ff36 in __GI___assert_fail (assertion=assertion@entry=0x5641556bc6d0 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x5641556bc238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=285, function=function@entry=0x5641556bcb48 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101
            #8  0x00005641551144a4 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x14f620198760, dpage=dpage@entry=0x14f628001340) at /test/10.6_dbg/storage/innobase/include/fsp0types.h:200
            #9  0x0000564155103918 in buf_pool_t::realloc (this=this@entry=0x564155cafc00 <buf_pool>, block=block@entry=0x14f620198760) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1617
            #10 0x0000564155104403 in buf_pool_t::withdraw_blocks (this=this@entry=0x564155cafc00 <buf_pool>) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1764
            #11 0x0000564155105f73 in buf_pool_t::resize (this=this@entry=0x564155cafc00 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413
            #12 0x00005641550ffb4a in buf_resize_callback () at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:2317
            #13 0x00005641552293a5 in tpool::task_group::execute (this=0x564156600080 <single_threaded_group>, t=t@entry=0x5641565fffe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task_group.cc:55
            #14 0x0000564155229501 in tpool::task::execute (this=0x5641565fffe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task.cc:47
            #15 0x00005641552280b9 in tpool::thread_pool_generic::worker_main (this=0x5641576df8d0, thread_var=0x5641576ef370) at /test/10.6_dbg/tpool/tpool_generic.cc:546
            #16 0x00005641552283f2 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
            #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
            #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
            #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
            #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
            #21 0x000014f64ba30d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
            #22 0x000014f64bb4c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #23 0x000014f64b73b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.5.9 (dbg), 10.6.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

            Roel Roel Van de Paar added a comment - - edited Another interesting testcase. # mysqld options required for replay: --innodb-buffer-pool-size=300M SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF; CREATE TEMPORARY TABLE if NOT exists t1 (a INT) SELECT 1 AS a; INSERT INTO t1 VALUES (00),(01),(02),(03),(04),(05),(06),(07),(08),(09),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24),(25),(26),(27),(28),(29),(30),(31),(32),(33),(34),(35),(36),(37),(38),(39),(40),(41),(42),(43),(44),(45),(46),(47),(48),(49),(50),(51),(52),(53),(54),(55),(56),(57),(58),(59),(60),(61),(62),(63),(64),(65),(66),(67),(68),(69),(70),(71),(72),(73),(74),(75),(76),(77),(78),(79),(80),(81),(82),(83),(84),(85),(86),(87),(88),(89),(90),(91),(92),(93),(94),(95),(96),(97),(98),(99); ALTER TABLE t1 ADD c2 TIMESTAMP NOT NULL FIRST; INSERT INTO t1 SELECT @a:=@a+1, @a FROM t1 A, t1 B, t1 C, t1 D WHERE D.a<4; CREATE TABLE t2 (col1 char collate latin1_german2_ci); SET GLOBAL innodb_buffer_pool_size = 25165824; SELECT SLEEP (3); Leads to: 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug) mysqld: /test/10.6_dbg/storage/innobase/buf/buf0flu.cc:285: void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*): Assertion `!fsp_is_system_temporary(bpage->id().space())' failed. 10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug) Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x14f634751700 (LWP 426359))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000056415529d0d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424 #2 0x0000564154a31ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x000014f64b63e859 in __GI_abort () at abort.c:79 #6 0x000014f64b63e729 in __assert_fail_base (fmt=0x14f64b7d4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5641556bc6d0 "!fsp_is_system_temporary(bpage->id().space())", file=0x5641556bc238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=285, function=<optimized out>) at assert.c:92 #7 0x000014f64b64ff36 in __GI___assert_fail (assertion=assertion@entry=0x5641556bc6d0 "!fsp_is_system_temporary(bpage->id().space())", file=file@entry=0x5641556bc238 "/test/10.6_dbg/storage/innobase/buf/buf0flu.cc", line=line@entry=285, function=function@entry=0x5641556bcb48 "void buf_flush_relocate_on_flush_list(buf_page_t*, buf_page_t*)") at assert.c:101 #8 0x00005641551144a4 in buf_flush_relocate_on_flush_list (bpage=bpage@entry=0x14f620198760, dpage=dpage@entry=0x14f628001340) at /test/10.6_dbg/storage/innobase/include/fsp0types.h:200 #9 0x0000564155103918 in buf_pool_t::realloc (this=this@entry=0x564155cafc00 <buf_pool>, block=block@entry=0x14f620198760) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1617 #10 0x0000564155104403 in buf_pool_t::withdraw_blocks (this=this@entry=0x564155cafc00 <buf_pool>) at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:1764 #11 0x0000564155105f73 in buf_pool_t::resize (this=this@entry=0x564155cafc00 <buf_pool>) at /usr/include/c++/9/bits/atomic_base.h:413 #12 0x00005641550ffb4a in buf_resize_callback () at /test/10.6_dbg/storage/innobase/buf/buf0buf.cc:2317 #13 0x00005641552293a5 in tpool::task_group::execute (this=0x564156600080 <single_threaded_group>, t=t@entry=0x5641565fffe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task_group.cc:55 #14 0x0000564155229501 in tpool::task::execute (this=0x5641565fffe0 <buf_resize_task>) at /test/10.6_dbg/tpool/task.cc:47 #15 0x00005641552280b9 in tpool::thread_pool_generic::worker_main (this=0x5641576df8d0, thread_var=0x5641576ef370) at /test/10.6_dbg/tpool/tpool_generic.cc:546 #16 0x00005641552283f2 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89 #17 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95 #18 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244 #19 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251 #20 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195 #21 0x000014f64ba30d84 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #22 0x000014f64bb4c609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #23 0x000014f64b73b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.5.9 (dbg), 10.6.0 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)
            Roel Roel Van de Paar made changes -
            Summary Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list and Failing assertion: list.count > 0 in ut_list_remove Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list AND Failing assertion: list.count > 0 in ut_list_remove AND Assertion `open_tables == __null' failed in
            Roel Roel Van de Paar made changes -
            Summary Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list AND Failing assertion: list.count > 0 in ut_list_remove AND Assertion `open_tables == __null' failed in Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list AND Failing assertion: list.count > 0 in ut_list_remove AND Assertion `open_tables == __null' failed in buf_flush_relocate_on_flush_list
            Roel Roel Van de Paar made changes -
            Summary Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list AND Failing assertion: list.count > 0 in ut_list_remove AND Assertion `open_tables == __null' failed in buf_flush_relocate_on_flush_list Assertion `!fsp_is_system_temporary(bpage->id().space())' failed in buf_flush_relocate_on_flush_list
            marko Marko Mäkelä made changes -
            Priority Critical [ 2 ] Blocker [ 1 ]
            marko Marko Mäkelä made changes -

            The following test case, which repeats the problem, did not fail immediately before MDEV-12227:

            --source include/have_innodb.inc
            --source include/have_sequence.inc
            --source include/have_debug.inc
             
            SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
            SET @save_disable=@@GLOBAL.innodb_disable_resize_buffer_pool_debug;
            SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
            SET GLOBAL innodb_limit_optimistic_insert_debug=2;
            SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
             
            SET GLOBAL innodb_buffer_pool_size=16777216;
             
            CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
            INSERT INTO t1 SELECT seq FROM seq_1_to_200;
             
            SET GLOBAL innodb_buffer_pool_size=8388608;
             
            let $wait_timeout = 60;
            let $wait_condition =
              SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
              FROM information_schema.global_status
              WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
            --source include/wait_condition.inc
             
            SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
            SET GLOBAL innodb_buffer_pool_size=@save_size;
            SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable;
            

            With MDEV-12227, the buf_pool.flush_list no longer contains pages of the temporary tablespace.

            marko Marko Mäkelä added a comment - The following test case, which repeats the problem, did not fail immediately before MDEV-12227 : --source include/have_innodb.inc --source include/have_sequence.inc --source include/have_debug.inc   SET @save_limit=@@ GLOBAL .innodb_limit_optimistic_insert_debug; SET @save_disable=@@ GLOBAL .innodb_disable_resize_buffer_pool_debug; SET @save_size=@@ GLOBAL .innodb_buffer_pool_size; SET GLOBAL innodb_limit_optimistic_insert_debug=2; SET GLOBAL innodb_disable_resize_buffer_pool_debug= OFF ;   SET GLOBAL innodb_buffer_pool_size=16777216;   CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY ) ENGINE=InnoDB; INSERT INTO t1 SELECT seq FROM seq_1_to_200;   SET GLOBAL innodb_buffer_pool_size=8388608;   let $wait_timeout = 60; let $wait_condition = SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at ' FROM information_schema.global_status WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS' ; --source include/wait_condition.inc   SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit; SET GLOBAL innodb_buffer_pool_size=@save_size; SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable; With MDEV-12227 , the buf_pool.flush_list no longer contains pages of the temporary tablespace.
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Affects Version/s N/A [ 14700 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]

            I set Affects Version: N/A, because this bug did not affect any released version. Both MDEV-12227 and this fix will be available in the upcoming 10.5.9 release.

            marko Marko Mäkelä added a comment - I set Affects Version: N/A, because this bug did not affect any released version. Both MDEV-12227 and this fix will be available in the upcoming 10.5.9 release.
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2021-01-23 15:58:55.0 2021-01-23 15:58:55.876
            marko Marko Mäkelä made changes -
            Fix Version/s 10.5.9 [ 25109 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 118422 ] MariaDB v4 [ 158804 ]
            Roel Roel Van de Paar made changes -

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.