Bug #86770 segfault on mysqlpump
Submitted: 21 Jun 2017 7:50 Modified: 23 Jun 2017 11:14
Reporter: Tomer Sagi Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqlpump Command-line Client Severity:S3 (Non-critical)
Version:5.7.18 OS:Ubuntu (16.04)
Assigned to: CPU Architecture:Any

[21 Jun 2017 7:50] Tomer Sagi
Description:
When trying to use mysqlpump it crashes for no apparent reason claiming that no database has been specified. 

How to repeat:
mysqlpump -u bu -p ultranet --result-file=dump.sql

result:
Enter password:
Dump progress: 0/7 tables, 250/178628 rows
mysqlpump: [ERROR] (1046) No database selected
Dump process encountered error and will not continue.
mysqlpump: [ERROR] (1046) No database selected
Dump process encountered error and will not continue.
Segmentation fault (core dumped)

dump.sql contains what seems to be a valid dump that ends abruptly in the middle of the first table.
[22 Jun 2017 19:12] MySQL Verification Team
Looks like the segmentation fault happens when the connection failed (i.e: wrong password):

miguel@ubu1604:~$ mysqlpump -uroot -p --result-file=dump.sql
Enter password: 
Dump progress: 0/11 tables, 250/2773 rows
Dump completed in 437 milliseconds
miguel@ubu1604:~$ mysqlpump -uroot -p --result-file=dump.sql
Enter password: 
mysqlpump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) while connecting to the MySQL server
mysqlpump: [ERROR] (11) 
Dump process encountered error and will not continue.
Segmentation fault (core dumped)
miguel@ubu1604:~$
[23 Jun 2017 11:22] MySQL Verification Team
Also, 

https://bugs.mysql.com/bug.php?id=86121
https://bugs.mysql.com/bug.php?id=83145