I have separated the problem from all the mysql code.
This file here works on x86 and on older riscv64.
But if ran on current hirsute riscv64 it breaks as mysql-server-8.0 does.

I further simplified it and attach it hereby for debugging.
It seems that the detection of the cache-line-size is failing and from there 
things go south.

riscv64 @ Hirsute
CL 18446744073709551615
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

riscv64 @ Focal
CL 0
static 32@0x3fff86f2c0

x86 @ Hirsute
CL 64
static 32@0x7fff300363a0


So it seems what is broken is "sysconf(_SC_LEVEL1_DCACHE_LINESIZE);"
On some platforms that returns good values (e.g. x86) and on others it used to 
return "0".
Mysql had code to cover the "0" case, but the new libc@riscv64 we get a crazy 
high value and that  breaks all that we see.

** Attachment added: "test-riscv64-alloc.cpp"
   
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1915275/+attachment/5475843/+files/test-riscv64-alloc.cpp

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915275

Title:
  mysql-8.0 regressed on riscv64 due to new glibc

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1915275/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to