Will provide all explanation below. First of all i tried to run pquery as usual, with default MYSAFE:
[root@centos7_vm percona-qa]# ./pquery-run.sh
[11:51:05] [0] Workdir: /home/logs/pquery/568480 | Rundir: /dev/shm/568480 | Basedir: /opt/mysql-5.7D
[11:51:05] [0] Valgrind run: TRUE | pquery timeout: 195 | SQL file used: /home/fake/percona-qa/pquery/5.7.7.sql
[11:51:05] [0] MYSAFE: --no-defaults --event-scheduler=ON --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY
[11:51:29] [0] Assert! The text '[ERROR] Aborting' was found in the error log. This may be an issue with one of the startup parameters. Saving trial for further analysis, and dumping error log ERRORs here for quick analysis. You likely have a problem in one of the startup parameters set in MYEXTRA (or MYSAFE)...
2015-07-16T06:51:29.480516Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2015-07-16T06:51:29.481811Z 0 [ERROR] Aborting
Then if you add --user=mysql to pquery-run.sh it will not start at all. Here is output from error log:
==2899== possibly lost: 2,881 bytes in 77 blocks
==2899== still reachable: 0 bytes in 0 blocks
==2899== suppressed: 0 bytes in 0 blocks
==2899== Rerun with --leak-check=full to see details of leaked memory
==2899==
==2899== For counts of detected and suppressed errors, rerun with: -v
==2899== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==2899== could not unlink /tmp/vgdb-pipe-from-vgdb-to-2899-by-root-on-centos7_vm
==2899== could not unlink /tmp/vgdb-pipe-to-vgdb-from-2899-by-root-on-centos7_vm
==2899== could not unlink /tmp/vgdb-pipe-shared-mem-vgdb-2899-by-root-on-centos7_vm
The solution was for me, adding --user=root to pquery-run.sh file:
[11:54:59] [0] Waiting for mysqld (pid: 3348) to fully start (note this is slow for Valgrind runs, and can easily take 35-90 seconds even on an high end server)...
[11:56:04] [0] Server started ok. Client: /opt/mysql-5.7D/bin/mysql -uroot -S/dev/shm/211332/1/socket.sock
[11:56:04] [0] Starting pquery (log stored in /dev/shm/211332/1/pquery.log)...
[11:56:04] [0] pquery running (Max duration: 195s)...
Diff:
-MYSAFE="--no-defaults --event-scheduler=ON --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY" # See http://bugs.mysql.com/?id=73916 re: testing env setup
+MYSAFE="--no-defaults --event-scheduler=ON --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-preload_buffer_size=1M --maximum-query_alloc_block_size=1M --maximum-query_prealloc_size=1M --maximum-range_alloc_block_size=1M --maximum-read_buffer_size=1M --maximum-read_rnd_buffer_size=1M --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --user=root" # See http://bugs.mysql.com/?id=73916 re: testing env setup
Thank you for the bug report.
Maybe one fix would be to
if [ "$(whoami)" == "rooot" ]; then "--user= root ${MYEXTRA}"
MYEXTRA=
fi
@Shahriyar @Ramesh - you agree? Thoughts?