Description:
Hi,
I tried to compile MySQL with DWITH_INNODB_EXTRA_DEBUG to troubleshoot a crash on rollback I am getting with 5.7.41, 8.0.31 and 8.0.32. This crash is described on MySQL Community Slack [1], and it looks very similar to Bug#93768, but I am not yet understanding this fully (I will open another bug report when I know more).
[1]: https://mysqlcommunity.slack.com/archives/C8Y94HRMX/p1678719924358409
This bug report is about the compilation of 8.0.32 failing with DWITH_INNODB_EXTRA_DEBUG. It succeeds without this option, and it also succeeds with this option for 5.7.41. See how to repeat for details.
Unrelated, but if you are curious: 5.7.41 compiled with DWITH_INNODB_EXTRA_DEBUG did not get more information about the crash described in [1] above.
Many thanks for looking into this,
Jean-François Gagné
How to repeat:
Below works after tar -xf of the source package of 8.0.32 (mysql-8.0.32.tar.gz).
mkdir jfg_build
cd jfg_build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost .
cmake --build .
Below works for 5.7.41 (mysql-5.7.41.tar.gz):
mkdir jfg_build
cd jfg_build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DWITH_INNODB_EXTRA_DEBUG=ON -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost .
cmake --build .
But below does not for mysql-8.0.32 (working for 5.7.41 above):
mkdir jfg_build
cd jfg_build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DWITH_INNODB_EXTRA_DEBUG=ON -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost .
cmake --build .
The error I get is this one:
[ 48%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/buf/buf0lru.cc.o
In file included from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/os0thread.h:43,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/ut0counter.h:41,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/sync0sync.h:45,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/sync0types.h:39,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/univ.i:546,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/os0event.h:37,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/buf0types.h:36,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/buf0lru.h:38,
from /home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/buf/buf0lru.cc:33:
/home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/buf/buf0lru.cc: In function ‘bool buf_LRU_block_remove_hashed(buf_page_t*, bool, bool)’:
/home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/buf/buf0lru.cc:2154:60: error: ‘struct buf_block_t’ has no member named ‘index’
2154 | ((buf_block_t *)bpage)->index));
| ^~~~~
/home/jgagne/sandboxes/compile/mysql-8.0.32/storage/innobase/include/ut0dbg.h:58:34: note: in definition of macro ‘ut_a’
58 | if (unlikely(false == (bool)(EXPR))) { \
| ^~~~
gmake[2]: *** [storage/innobase/CMakeFiles/innobase.dir/build.make:314: storage/innobase/CMakeFiles/innobase.dir/buf/buf0lru.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:7833: storage/innobase/CMakeFiles/innobase.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2