[MDEV-23787] mtr --rr fixes Created: 2020-09-22  Updated: 2020-10-06  Resolved: 2020-10-06

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.2.35, 10.3.26, 10.4.16, 10.5.7

Type: Bug Priority: Major
Reporter: Aleksey Midenkov Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-23777 mtr --rr leaves a broken trace in som... Open
relates to MDEV-23788 Document MTR rr Open

 Description   

1. rr record -h randomizes number of processors:

{10.5} midenok@dull:build$ rr record -h nproc
rr: Saving execution to trace directory `/home/midenok/.local/share/rr/nproc-0'.
8
{10.5} midenok@dull:build$ rr record -h nproc
rr: Saving execution to trace directory `/home/midenok/.local/share/rr/nproc-1'.
6
{10.5} midenok@dull:build$ rr record -h nproc
rr: Saving execution to trace directory `/home/midenok/.local/share/rr/nproc-2'.
3
{10.5} midenok@dull:build$ rr record -h nproc
rr: Saving execution to trace directory `/home/midenok/.local/share/rr/nproc-3'.
5

mtr option --rr --rr-arg=-h produces check-testcase failure:

--- /dev/shm/10.5m/mysql-test/var/2/tmp/check-mysqld_1.result	2020-09-17 12:39:40.051012859 +0300
+++ /dev/shm/10.5m/mysql-test/var/2/tmp/check-mysqld_1.reject	2020-09-17 12:42:01.852733184 +0300
@@ -646,7 +646,7 @@
 THREAD_POOL_OVERSUBSCRIBE	3
 THREAD_POOL_PRIORITY	auto
 THREAD_POOL_PRIO_KICKUP_TIMER	1000
-THREAD_POOL_SIZE	7
+THREAD_POOL_SIZE	2
 THREAD_POOL_STALL_LIMIT	500
 THREAD_STACK	299008
 TIME_FORMAT	%H:%i:%s

The simplest fix could be just apply --no-check-testcases for --rr.

The another fix is to disable THREAD_POOL_SIZE variable for check-test case here:

mtr_check.sql

  SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
    WHERE variable_name NOT IN ('timestamp')
     AND variable_name not like "Last_IO_Err*"
     AND variable_name != 'INNODB_IBUF_MAX_SIZE'
     AND variable_name != 'INNODB_USE_NATIVE_AIO'
     AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
     AND variable_name not like 'GTID%POS'
     AND variable_name != 'GTID_BINLOG_STATE'
   ORDER BY variable_name;

2. check for `perf_event_paranoid = 1` for user-friendly error message.


Generated at Thu Feb 08 09:25:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.