Skip to content

Commit a40bf40

Browse files
committed
MDEV-39831 mtr: under rr use LSAN_OPTIONS=report_objects
When we have a rr recording of the process, a memory location is a useful thing to have in the err log of leaks. The output comes out like: Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x55b08dbccdb8 in malloc (/build/sql/mariadbd+0x1b89db8) (BuildId: 4d72569bed63ce1fbf55d51e4d4a84b610efd87d) #1 0x7b3fe387a1b1 (<unknown module>) #2 0x7b3fe37c492f (<unknown module>) #3 0x7b3fe3058407 (<unknown module>) #4 0x7b3fe2f09493 (<unknown module>) Objects leaked above: 0x7b7feafe0990 (40 bytes) Now once the location is resolved we can check that we resolving the right object leak.
1 parent 01bec43 commit a40bf40

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

mysql-test/lib/My/Debugger.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ my %debuggers = (
8484
push @::global_suppressions, qr/InnoDB: native AIO failed/;
8585
::mtr_error('rr requires kernel.perf_event_paranoid <= 1')
8686
if ::mtr_grab_file('/proc/sys/kernel/perf_event_paranoid') > 1;
87+
$ENV{LSAN_OPTIONS}= "report_objects=1:" . ($ENV{LSAN_OPTIONS} || '');
8788
}
8889
},
8990
valgdb => {

0 commit comments

Comments
 (0)