Bug #106285 mysqlpump fails with Segmentation fault
Submitted: 26 Jan 2022 3:25 Modified: 29 Jan 2022 15:33
Reporter: xincheng xie Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: mysqlpump Command-line Client Severity:S3 (Non-critical)
Version:Ver 8.0.26 for Linux on x86_64 (MySQL Co OS:Linux
Assigned to: CPU Architecture:Any

[26 Jan 2022 3:25] xincheng xie
Description:
my command:

[da@da-pentaho-1 bin]$  ./mysqlpump  --exclude-databases=information_schema,mysql  --databases=db_mklij_xingcheng_stat -uda -p -h *** --set-gtid-purged=OFF  --skip-definer --exclude-tables=t_tonghuajilu_huadan,property_follow,t_keyuan --default-parallelism=8    > mysqlpback.sql

How to repeat:
Dump progress: 46/466 tables, 3774503/223069423 rows
Segmentation fault (core dumped)

Suggested fix:
I used GDB to debug the core file and found an error

(gdb) bt
Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x7f6d4a0fc8b8:

Complete error reports are as follows:

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.1.al7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/da/mysql/mysql8/bin/mysqlpump...(no debugging symbols found)...done.
BFD: Warning: /home/da/core.4914 is truncated: expected core file size >= 118210560, found: 1048576.
[New LWP 4919]
[New LWP 4924]
[New LWP 4920]
[New LWP 4914]
[New LWP 4922]
[New LWP 4918]
[New LWP 4917]
[New LWP 4923]
[New LWP 4921]
Cannot access memory at address 0x7f6d4d2ce128
Cannot access memory at address 0x7f6d4d2ce120
Failed to read a valid object file image from memory.
Core was generated by `./mysqlpump --exclude-databases=information_schema,mysql --databases=db_mklij_x'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f6d4b670596 in ?? ()
[26 Jan 2022 7:58] xincheng xie
largest table in this database is about 10 GB
[26 Jan 2022 13:44] MySQL Verification Team
Hi Mr. xie,

Thank you for your bug report.

However, we can not proceed with further processing of your report.

We require a fully repeatable test case. Hence, we need a table whose dump produces a segmentation fault. Hence, try dumping table one by one and let us know on which one does mysqlpump crashes. There is no way that we could proceed any further with no relevant data provided by your report.

Next, we would like to inform you that this could not be a bug in Python, since mysqlpump is not written in pump.

Last, but not least, the stacktrace output is totally unreadable.

We are waiting for your full feedback.
[27 Jan 2022 6:35] xincheng xie
Hi,

i just put the dump file on the sftp server,please try to reproduce after importing, thanks
[27 Jan 2022 13:59] MySQL Verification Team
Hi Mr. xie,

We are sorry, but that is not what we asked for.

We asked for a table that produces the segmentation fault, when dumped with mysqlpump.

Also, if you are sending us something, please use "Files" tab. on this screen.
[27 Jan 2022 14:00] MySQL Verification Team
To explain further. We have thousands of files on our SFTP site, which is why it is best to use "Files" tab.

If that does not work, let us know why ......
[28 Jan 2022 6:32] xincheng xie
Hi,thanks for  explain ,this is the table which cause Segmentation fault , In the production environment, there

Attachment: mysql-bug-data-106285.zip (application/x-zip-compressed, text), 11.74 KiB.

[28 Jan 2022 6:33] xincheng xie
about 900000 data
[28 Jan 2022 13:32] MySQL Verification Team
Hi Mr. xie,

Thank you for your file.

We ran your mysqlpump on our server, both with latest version (8.0.28) and we had no problems:

./mysqlpump  --exclude-databases=information_schema,mysql  --databases=txxxx -u... -p...  --set-gtid-purged=OFF  --skip-definer --exclude-tables=t_tonghuajilu_huadan,property_follow,t_keyuan --default-parallelism=8    > mysqlpback.sql
mysqlpump: [Warning] Using a password on the command line interface can be insecure.
Dump progress: 1/1 tables, 0/201 rows
Dump completed in 445

File mysqlpback.sql was created just fine, without any problems.

Can't repeat.
[29 Jan 2022 15:33] xincheng xie
Hi,The file I uploaded is an example of this table. You can create points up to 90W lines
[31 Jan 2022 13:31] MySQL Verification Team
It still works for me with 8.0.28.

Hence, this bug is closed as "Can't repeat".