monitor: Search the frames with a pager
Subsystems (2)
Luiz Augusto von Dentz
maintainerv2 cover monitor: Search the frames with a pager
From: Luiz Augusto von Dentz <[email protected]>
A frame spans several lines, and what identifies one is spread between its header and its contents: the header says which controller and when, the body says what happened. Searching a trace a line at a time finds the line reporting an error without any of that context.
This series makes the frames searchable as whole entries:
$ btmon # then press Ctrl-R $ btmon -r hcidump.log $ btmon -r hcidump.log --print0 | fzf --read0
Patches 1 to 3 are unrelated fixes noticed on the way: a channel leaks its latency plots, the channel latency is the only one of the three not reporting its deviation, and a count of control messages is printed with a stray space at the end of the line.
Patch 4 sends the decoding output through one function so that a frame can be observed as a whole. It is a pure redirection and the output is unchanged.
Patch 5 separates the frames with a NUL when something is going to read them as records, asked for by --print0 or by --read0 already being in PAGER. Nothing is separated otherwise, so a pager reading lines and redirected output are both untouched.
Patches 6 and 7 hand the frames seen so far to the pager on Ctrl-R while capturing. The capture is never paused for this, as anything not read in time is dropped by the kernel, and whatever arrives while the pager is up is printed once it closes so the trace on the terminal has no gap.
Patches 8 and 9 use fzf when PAGER is not set and it is installed, since it suits a trace far better than a plain pager, giving it --ansi, --read0 and --tac wherever it is used.
Recordings of both, which expire after a week:
reading a file https://asciinema.org/a/FEetnoeF5H6NNOmZ
a running capture https://asciinema.org/a/pGZpLhPlJFPyO4I3
The first one searches a 39 frame trace of two LE connections:
'ATT: every ATT frame 19 of 39 'SMP: the pairing exchange 4 'L2CAP: the signalling 2 '0x0025 every frame touching that GATT handle 5 'ATT: 'Write two terms, both must match 2 'ATT: !'Error everything ATT except the failures 15 'Handle\ 65 just the second connection 4 '#20 one frame, by its number 1
A leading quote is an exact match, a space separates terms that must all match, and ! inverts one. Matching itself has no regex, but --delimiter is one, and with a newline as the delimiter every line of a frame becomes a field, so a search can be aimed at the header or at the contents:
whole frame header only body only
'Handle\ 64 21 21 0 '#20 1 1 0 '0x0025 5 0 5
'ATT: 19 0 19
A frame number or a connection only ever appears in the header, and a GATT handle or a protocol only inside.
The second recording shows Ctrl-R during a capture: the frames seen so far are handed over, the capture keeps running underneath, and what arrived meanwhile is printed on return.
Changes in v2:
- Added the three unrelated fixes as patches 1 to 3. The trailing space is its own patch so that patch 4 stays a pure redirection.
- Rewrapped the lines that went over 80 columns, which the rename to display_printf() pushed past the limit.
- Dropped the NULL initialiser on the static output stream, removed the trailing semicolon from the print_space() macro and used ARRAY_SIZE().
Luiz Augusto von Dentz (9):
monitor/analyze: Free the channel latency plots monitor/l2cap: Report the channel latency deviation monitor/analyze: Drop a trailing space before a newline
monitor: Route the decoding output through a single function
monitor: Separate the frames for a pager reading records
monitor: Hand the captured frames to the pager on Ctrl-R doc/btmon: Document searching the frames
monitor: Prefer fzf as the pager when one is not set doc/btmon: Document the pager choice
Makefile.tools | 1 + doc/btmon.rst | 64 ++++++ monitor/analyze.c | 47 ++-- monitor/avctp.c | 68 +++--- monitor/control.c | 176 ++++++++------- monitor/display.c | 139 +++++++++++- monitor/display.h | 14 +- monitor/find.c | 534 ++++++++++++++++++++++++++++++++++++++++++++++ monitor/find.h | 19 ++ monitor/l2cap.c | 41 ++-- monitor/lmp.c | 4 +- monitor/main.c | 28 ++- monitor/packet.c | 19 +- monitor/rfcomm.c | 6 +- tools/l2test.c | 10 + 15 files changed, 994 insertions(+), 176 deletions(-) create mode 100644 monitor/find.c create mode 100644 monitor/find.h
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 1/9 monitor/analyze: Free the channel latency plots
From: Luiz Augusto von Dentz <[email protected]>
A channel keeps a plot of its latencies for as long as it exists, but destroying one frees only the channel itself, leaking both plots and everything queued on them. A connection already frees its own.
--- monitor/analyze.c | 2 ++ monitor/l2cap.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
monitor/analyze.c +2 -0
@@ -298,6 +298,8 @@ static void chan_destroy(void *data)print_stats (&chan->tx,"TX" ); done: +queue_destroy (chan->rx.plot, free); +queue_destroy (chan->tx.plot, free);free (chan); }
monitor/l2cap.c +4 -2
@@ -2913,9 +2913,11 @@ void l2cap_dequeue_frame(struct timeval *delta, struct packet_conn_data *conn) frame->cid, frame->psm,mode2str (frame->mode), frame->mode, frame->chan); -print_field ("Channel Latency: %lld msec (%lld-%lld msec ~%lld msec)" , +print_field ("Channel Latency: %lld msec (%lld-%lld msec ~%lld msec " +"+/- %lld msec)" ,TV_MSEC (*delta),TV_MSEC (chan->tx_l.min), -TV_MSEC (chan->tx_l.max),TV_MSEC (chan->tx_l.med)); +TV_MSEC (chan->tx_l.max),TV_MSEC (chan->tx_l.med), +packet_latency_stddev (&chan->tx_l));free (frame); }
Signature · 1 line
2.55.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1168850/
---Test result---
Test Summary:
CheckPatch FAIL 3.57 seconds GitLint PASS 2.60 seconds BuildEll PASS 20.42 seconds BluezMake PASS 389.64 seconds MakeCheck PASS 14.27 seconds MakeDistcheck PASS 139.79 seconds CheckValgrind PASS 231.00 seconds CheckSmatch WARNING 287.76 seconds bluezmakeextell PASS 93.23 seconds TestFunctional FAIL 1170.91 seconds IncrementalBuild PASS 434.48 seconds ScanBuild PASS 1120.58 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v2,4/9] monitor: Route the decoding output through a single function WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __printf(1, 2) over __attribute__((format(printf, 1, 2))) #1116: FILE: monitor/display.h:24:
+ __attribute__((format(printf, 1, 2)));
/home/runner/work/bluez/bluez/src/patch/14829901.patch total: 0 errors, 1 warnings, 1158 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluez/bluez/src/patch/14829901.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:monitor/packet.c:2289:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3924:52: warning: array of flexible structuresmonitor/bt.h:3912:40: warning: array of flexible structures
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_bap::test_bap_unicast_set_transport_created[hosts8-vm3-sc]: failed on teardown with "pytest_bluezenv.plugin.CoredumpWarning: Core dump: test-bluezenv-hosts8.0-bluetoothd-1789755547-52.core
/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory.
[New LWP 52]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/runner/work/bluez/bluez/src/src/src/bluetoothd --nodetach -f /run/bluetoo'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
Thread 1 (Thread 0x7f4254179900 (LWP 52)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {4412750543122677053}}
ret = <optimized out>
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
No locals.
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100
No locals.
#3 0x00007f42548d4b7e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#4 0x00007f42548b78ec in __GI_abort () at ./stdlib/abort.c:77
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0, 135524771696288, 9377323413854622976, 140733244855936, 140733244856224, 140733244856080, 22, 139922860018640, 0, 140733244856016, 139922876864022, 139922850713600, 4096, 0, 9377323413854622976, 139922851356696}}, sa_flags = 1438646272, sa_restorer = 0x16}
#5 0x00007f42554dfa0f in __sanitizer::Abort () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp:165
No locals.
#6 0x00007f4255605c2d in __sanitizer::Die () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:58
No locals.
#7 0x00007f42555da93c in __asan::ScopedInErrorReport::~ScopedInErrorReport (this=0x7fff03115846) at ../../../../src/libsanitizer/asan/asan_report.cpp:221
buffer_copy = {buffer_ = {<__sanitizer::InternalMmapVectorNoCtor<char, false>> = {data_ = 0x7f4253d01000 '=' <repeats 65 times>, "\n==52==ERROR: AddressSanitizer: heap-use-after-free on address 0x7cb2535e040b at pc 0x7f425558f445 bp 0x7fff03116d40 sp 0x7fff031164e8\n"..., capacity_bytes_ = 4096, size_ = 3838}, <No data fields>}}
buffer_copy = <optimized out>
l = <optimized out>
#8 0x00007f42555d9e02 in __asan::ReportGenericError (pc=139922876462149, bp=140733244861760, sp=sp@entry=140733244859624, addr=addr@entry=137105344693259, is_write=is_write@entry=false, access_size=6, fatal=false, exp=<optimized out>) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = {error_report_lock_ = {<No data fields>}, static current_error_ = {kind = __asan::kErrorKindGeneric, {Base = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, DeadlySignal = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, signal = {siginfo = 0xffffffff00000002, context = 0x7cb2535e040b, addr = 0, pc = 0, sp = 11849814771261, bp = 137105344693259, is_memory_access = 11, write_flag = __sanitizer::SignalContext::Unknown, is_true_faulting_addr = false}}, DoubleFree = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, second_free_stack = 0xffffffff00000002, addr_description = {addr = 137105344693259, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1597, free_stack_id = 2759, chunk_access = {bad_addr = 137105344693259, offset = 11, chunk_begin = 137105344693248, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}}, NewDeleteTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, free_stack = 0xffffffff00000002, addr_description = {addr = 137105344693259, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1597, free_stack_id = 2759, chunk_access = {bad_addr = 137105344693259, offset = 11, chunk_begin = 137105344693248, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, delete_size = 135524778155552, delete_alignment = 140733244857552}, FreeNotMalloced = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, free_stack = 0xffffffff00000002, addr_description = {data = {kind = 1398670347, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11849814771261, alloc_stack_id = 1398670347, free_stack_id = 31922, chunk_access = {bad_addr = 11, offset = 137105344693248, chunk_begin = 752, chunk_size = 140733244858376, user_requested_alignment = 3616, access_type = 1, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11849814771261, frame_pc = 137105344693259, access_size = 11, frame_descr = 0x7cb2535e0400 "\307\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11849814771261, size_with_redzone = 137105344693259, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7cb2535e0400 "\307\n", has_dynamic_init = 752, gcc_location = 0x7fff03116008, odr_indicator = 135524778155552}, {beg = 140733244857552, size = 139922875759391, size_with_redzone = 1, name = 0x7b4252429e20 "\240feS\242{", module_name = 0x7fff03116520 "0e\021\003\377\177", has_dynamic_init = 139922876716498, gcc_location = 0x7f4253dc30d0, odr_indicator = 128900488496}, {beg = 140733244857600, size = 3, size_with_redzone = 139922876716560, name = 0x7f4254925b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x557d32b2056b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140733244860384, gcc_location = 0x7fff03115dc0, odr_indicator = 2}, {beg = 139922877431744, size = 135937114072528, size_with_redzone = 140733244857744, name = 0x7f42554e9738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 135937114072528, gcc_location = 0x7f4253dc30d0, odr_indicator = 140733244857776}}, reg_sites = {1399154144, 31650, 81, 0}, access_size = 140733244859936, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}}, AllocTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, dealloc_stack = 0xffffffff00000002, alloc_type = 1398670347, dealloc_type = 31922, addr_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 0, kind = (__asan::kShadowKindGap | unknown: 0x3c), shadow_byte = 6 '\006'}, heap = {addr = 0, alloc_tid = 11849814771261, free_tid = 137105344693259, alloc_stack_id = 11, free_stack_id = 0, chunk_access = {bad_addr = 137105344693248, offset = 752, chunk_begin = 140733244858376, chunk_size = 135524778155552, user_requested_alignment = 3280, access_type = 1, alloc_type = 1}}, stack = {addr = 0, tid = 11849814771261, offset = 137105344693259, frame_pc = 11, access_size = 137105344693248, frame_descr = 0x2f0 <error: Cannot access memory at address 0x2f0>}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 11849814771261, size = 137105344693259, size_with_redzone = 11, name = 0x7cb2535e0400 "\307\n", module_name = 0x2f0 <error: Cannot access memory at address 0x2f0>, has_dynamic_init = 140733244858376, gcc_location = 0x7b4252429e20, odr_indicator = 140733244857552}, {beg = 139922875759391, size = 1, size_with_redzone = 135524778155552, name = 0x7fff03116520 "0e\021\003\377\177", module_name = 0x7f42555cd5d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", has_dynamic_init = 139922851508432, gcc_location = 0x1e03115d30, odr_indicator = 140733244857600}, {beg = 3, size = 139922876716560, size_with_redzone = 139922863446927, name = 0x557d32b2056b <bt_log_vprintf+171> "\205\300\017\210=\001", module_name = 0x7fff031167e0 "\204i\021\003\377\177", has_dynamic_init = 140733244857792, gcc_location = 0x2, odr_indicator = 139922877431744}, {beg = 135937114072528, size = 140733244857744, size_with_redzone = 139922875782968, name = 0x3e <error: Cannot access memory at address 0x3e>, module_name = 0x7ba2536565d0 "\003\021", has_dynamic_init = 139922851508432, gcc_location = 0x7fff03115db0, odr_indicator = 135937114072544}}, reg_sites = {81, 0, 51471904, 32767}, access_size = 139922876462149, size = 64 '@'}, wild = {addr = 0, access_size = 11849814771261}}}}}, MallocUsableSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, addr_description = {data = {kind = 1398670347, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11849814771261, alloc_stack_id = 1398670347, free_stack_id = 31922, chunk_access = {bad_addr = 11, offset = 137105344693248, chunk_begin = 752, chunk_size = 140733244858376, user_requested_alignment = 3616, access_type = 1, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11849814771261, frame_pc = 137105344693259, access_size = 11, frame_descr = 0x7cb2535e0400 "\307\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11849814771261, size_with_redzone = 137105344693259, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7cb2535e0400 "\307\n", has_dynamic_init = 752, gcc_location = 0x7fff03116008, odr_indicator = 135524778155552}, {beg = 140733244857552, size = 139922875759391, size_with_redzone = 1, name = 0x7b4252429e20 "\240feS\242{", module_name = 0x7fff03116520 "0e\021\003\377\177", has_dynamic_init = 139922876716498, gcc_location = 0x7f4253dc30d0, odr_indicator = 128900488496}, {beg = 140733244857600, size = 3, size_with_redzone = 139922876716560, name = 0x7f4254925b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x557d32b2056b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140733244860384, gcc_location = 0x7fff03115dc0, odr_indicator = 2}, {beg = 139922877431744, size = 135937114072528, size_with_redzone = 140733244857744, name = 0x7f42554e9738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 135937114072528, gcc_location = 0x7f4253dc30d0, odr_indicator = 140733244857776}}, reg_sites = {1399154144, 31650, 81, 0}, access_size = 140733244859936, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}}, SanitizerGetAllocatedSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, addr_description = {data = {kind = 1398670347, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11849814771261, alloc_stack_id = 1398670347, free_stack_id = 31922, chunk_access = {bad_addr = 11, offset = 137105344693248, chunk_begin = 752, chunk_size = 140733244858376, user_requested_alignment = 3616, access_type = 1, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11849814771261, frame_pc = 137105344693259, access_size = 11, frame_descr = 0x7cb2535e0400 "\307\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11849814771261, size_with_redzone = 137105344693259, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7cb2535e0400 "\307\n", has_dynamic_init = 752, gcc_location = 0x7fff03116008, odr_indicator = 135524778155552}, {beg = 140733244857552, size = 139922875759391, size_with_redzone = 1, name = 0x7b4252429e20 "\240feS\242{", module_name = 0x7fff03116520 "0e\021\003\377\177", has_dynamic_init = 139922876716498, gcc_location = 0x7f4253dc30d0, odr_indicator = 128900488496}, {beg = 140733244857600, size = 3, size_with_redzone = 139922876716560, name = 0x7f4254925b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x557d32b2056b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140733244860384, gcc_location = 0x7fff03115dc0, odr_indicator = 2}, {beg = 139922877431744, size = 135937114072528, size_with_redzone = 140733244857744, name = 0x7f42554e9738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 135937114072528, gcc_location = 0x7f4253dc30d0, odr_indicator = 140733244857776}}, reg_sites = {1399154144, 31650, 81, 0}, access_size = 140733244859936, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}}, CallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, count = 137105344693259, size = 0}, ReallocArrayOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, count = 137105344693259, size = 0}, PvallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, size = 137105344693259}, InvalidAllocationAlignment = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, alignment = 137105344693259}, InvalidAlignedAllocAlignment = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, size = 137105344693259, alignment = 0}, InvalidPosixMemalignAlignment = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, alignment = 137105344693259}, AllocationSizeTooBig = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, user_size = 137105344693259, total_size = 0, max_size = 0}, RssLimitExceeded = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002}, OutOfMemory = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, requested_size = 137105344693259}, StringFunctionMemoryRangesOverlap = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, length1 = 137105344693259, length2 = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 11849814771261, kind = (__asan::kShadowKindGap | __asan::kShadowKindHigh | unknown: 0x8), shadow_byte = 4 '\004'}, heap = {addr = 11849814771261, alloc_tid = 137105344693259, free_tid = 11, alloc_stack_id = 1398670336, free_stack_id = 31922, chunk_access = {bad_addr = 752, offset = 140733244858376, chunk_begin = 135524778155552, chunk_size = 140733244857552, user_requested_alignment = 2847, access_type = 3, alloc_type = 0}}, stack = {addr = 11849814771261, tid = 137105344693259, offset = 11, frame_pc = 137105344693248, access_size = 752, frame_descr = 0x7fff03116008 "\231\326\246TB\177"}, global = {addr = 11849814771261, static kMaxGlobals = 4, globals = {{beg = 137105344693259, size = 11, size_with_redzone = 137105344693248, name = 0x2f0 <error: Cannot access memory at address 0x2f0>, module_name = 0x7fff03116008 "\231\326\246TB\177", has_dynamic_init = 135524778155552, gcc_location = 0x7fff03115cd0, odr_indicator = 139922875759391}, {beg = 1, size = 135524778155552, size_with_redzone = 140733244859680, name = 0x7f42555cd5d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x7f4253dc30d0 "", has_dynamic_init = 128900488496, gcc_location = 0x7fff03115d00, odr_indicator = 3}, {beg = 139922876716560, size = 139922863446927, size_with_redzone = 93996209800555, name = 0x7fff031167e0 "\204i\021\003\377\177", module_name = 0x7fff03115dc0 "\030", has_dynamic_init = 2, gcc_location = 0x7f425567bfc0 <__asan::instance>, odr_indicator = 135937114072528}, {beg = 140733244857744, size = 139922875782968, size_with_redzone = 62, name = 0x7ba2536565d0 "\003\021", module_name = 0x7f4253dc30d0 "", has_dynamic_init = 140733244857776, gcc_location = 0x7ba2536565e0, odr_indicator = 81}}, reg_sites = {51471904, 32767, 1431893061, 32578}, access_size = 140733244861760, size = 232 '\350'}, wild = {addr = 11849814771261, access_size = 137105344693259}}}}, addr2_description = {data = {kind = 6, {shadow = {addr = 139922877142935, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 139922877142935, alloc_tid = 139922877447424, free_tid = 140733244861312, alloc_stack_id = 1432147410, free_stack_id = 32578, chunk_access = {bad_addr = 8315162673665959470, offset = 130735371371, chunk_begin = 140733244859232, chunk_size = 3, user_requested_alignment = 1552, access_type = 1, alloc_type = 3}}, stack = {addr = 139922877142935, tid = 139922877447424, offset = 140733244861312, frame_pc = 139922876716498, access_size = 8315162673665959470, frame_descr = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>}, global = {addr = 139922877142935, static kMaxGlobals = 4, globals = {{beg = 139922877447424, size = 140733244861312, size_with_redzone = 139922876716498, name = 0x736564656572662e <error: Cannot access memory at address 0x736564656572662e>, module_name = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>, has_dynamic_init = 140733244859232, gcc_location = 0x3, odr_indicator = 139922876716560}, {beg = 139922863446927, size = 93996209800555, size_with_redzone = 140733244862016, name = 0x7fff031163e0 "", module_name = 0x7f4255675f78 "\001", has_dynamic_init = 140733244859424, gcc_location = 0x557d32c615a0, odr_indicator = 139922855401656}, {beg = 65535, size = 140733244859344, size_with_redzone = 139922876547929, name = 0x40 <error: Cannot access memory at address 0x40>, module_name = 0x7b4252655a00 "\0166\340E", has_dynamic_init = 140733244859392, gcc_location = 0x7f42554f074a <__asan_stack_malloc_0(__sanitizer::uptr)+234>, odr_indicator = 140733244859392}, {beg = 139922876972925, size = 140733244859424, size_with_redzone = 139922876816742, name = 0x7fff031164a0 "", module_name = 0x2 <error: Cannot access memory at address 0x2>, has_dynamic_init = 139922877431744, gcc_location = 0x7b825364c600, odr_indicator = 140733244859504}}, reg_sites = {1431213880, 32578, 40, 0}, access_size = 139922876922397, size = 208 '\320'}, wild = {addr = 139922877142935, access_size = 139922877447424}}}}, function = 0x7fff03116490 "@m\021\003\377\177"}, StringFunctionSizeOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, addr_description = {data = {kind = 1398670347, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11849814771261, alloc_stack_id = 1398670347, free_stack_id = 31922, chunk_access = {bad_addr = 11, offset = 137105344693248, chunk_begin = 752, chunk_size = 140733244858376, user_requested_alignment = 3616, access_type = 1, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11849814771261, frame_pc = 137105344693259, access_size = 11, frame_descr = 0x7cb2535e0400 "\307\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11849814771261, size_with_redzone = 137105344693259, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7cb2535e0400 "\307\n", has_dynamic_init = 752, gcc_location = 0x7fff03116008, odr_indicator = 135524778155552}, {beg = 140733244857552, size = 139922875759391, size_with_redzone = 1, name = 0x7b4252429e20 "\240feS\242{", module_name = 0x7fff03116520 "0e\021\003\377\177", has_dynamic_init = 139922876716498, gcc_location = 0x7f4253dc30d0, odr_indicator = 128900488496}, {beg = 140733244857600, size = 3, size_with_redzone = 139922876716560, name = 0x7f4254925b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x557d32b2056b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140733244860384, gcc_location = 0x7fff03115dc0, odr_indicator = 2}, {beg = 139922877431744, size = 135937114072528, size_with_redzone = 140733244857744, name = 0x7f42554e9738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 135937114072528, gcc_location = 0x7f4253dc30d0, odr_indicator = 140733244857776}}, reg_sites = {1399154144, 31650, 81, 0}, access_size = 140733244859936, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}, size = 140733244861760}, BadParamsToAnnotateContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, beg = 137105344693259, end = 0, old_mid = 0, new_mid = 11849814771261}, BadParamsToAnnotateDoubleEndedContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, storage_beg = 137105344693259, storage_end = 0, old_container_beg = 0, old_container_end = 11849814771261, new_container_beg = 137105344693259, new_container_end = 11}, BadParamsToCopyContiguousContainerAnnotations = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, old_storage_beg = 137105344693259, old_storage_end = 0, new_storage_beg = 0, new_storage_end = 11849814771261}, ODRViolation = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, global1 = {beg = 18446744069414584322, size = 137105344693259, size_with_redzone = 0, name = 0x0, module_name = 0xac70000063d <error: Cannot access memory at address 0xac70000063d>, has_dynamic_init = 137105344693259, gcc_location = 0xb, odr_indicator = 137105344693248}, global2 = {beg = 752, size = 140733244858376, size_with_redzone = 135524778155552, name = 0x7fff03115cd0 " e\021\003\377\177", module_name = 0x7f42554e3b1f <__asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*)+47> "H\205\300t\f\311\303f.\017\037\204", has_dynamic_init = 1, gcc_location = 0x7b4252429e20, odr_indicator = 140733244859680}, stack_id1 = 1432147410, stack_id2 = 32578}, InvalidPointerPair = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, pc = 18446744069414584322, bp = 137105344693259, sp = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 11849814771261, kind = (__asan::kShadowKindGap | __asan::kShadowKindHigh | unknown: 0x8), shadow_byte = 4 '\004'}, heap = {addr = 11849814771261, alloc_tid = 137105344693259, free_tid = 11, alloc_stack_id = 1398670336, free_stack_id = 31922, chunk_access = {bad_addr = 752, offset = 140733244858376, chunk_begin = 135524778155552, chunk_size = 140733244857552, user_requested_alignment = 2847, access_type = 3, alloc_type = 0}}, stack = {addr = 11849814771261, tid = 137105344693259, offset = 11, frame_pc = 137105344693248, access_size = 752, frame_descr = 0x7fff03116008 "\231\326\246TB\177"}, global = {addr = 11849814771261, static kMaxGlobals = 4, globals = {{beg = 137105344693259, size = 11, size_with_redzone = 137105344693248, name = 0x2f0 <error: Cannot access memory at address 0x2f0>, module_name = 0x7fff03116008 "\231\326\246TB\177", has_dynamic_init = 135524778155552, gcc_location = 0x7fff03115cd0, odr_indicator = 139922875759391}, {beg = 1, size = 135524778155552, size_with_redzone = 140733244859680, name = 0x7f42555cd5d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x7f4253dc30d0 "", has_dynamic_init = 128900488496, gcc_location = 0x7fff03115d00, odr_indicator = 3}, {beg = 139922876716560, size = 139922863446927, size_with_redzone = 93996209800555, name = 0x7fff031167e0 "\204i\021\003\377\177", module_name = 0x7fff03115dc0 "\030", has_dynamic_init = 2, gcc_location = 0x7f425567bfc0 <__asan::instance>, odr_indicator = 135937114072528}, {beg = 140733244857744, size = 139922875782968, size_with_redzone = 62, name = 0x7ba2536565d0 "\003\021", module_name = 0x7f4253dc30d0 "", has_dynamic_init = 140733244857776, gcc_location = 0x7ba2536565e0, odr_indicator = 81}}, reg_sites = {51471904, 32767, 1431893061, 32578}, access_size = 140733244861760, size = 232 '\350'}, wild = {addr = 11849814771261, access_size = 137105344693259}}}}, addr2_description = {data = {kind = 6, {shadow = {addr = 139922877142935, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 139922877142935, alloc_tid = 139922877447424, free_tid = 140733244861312, alloc_stack_id = 1432147410, free_stack_id = 32578, chunk_access = {bad_addr = 8315162673665959470, offset = 130735371371, chunk_begin = 140733244859232, chunk_size = 3, user_requested_alignment = 1552, access_type = 1, alloc_type = 3}}, stack = {addr = 139922877142935, tid = 139922877447424, offset = 140733244861312, frame_pc = 139922876716498, access_size = 8315162673665959470, frame_descr = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>}, global = {addr = 139922877142935, static kMaxGlobals = 4, globals = {{beg = 139922877447424, size = 140733244861312, size_with_redzone = 139922876716498, name = 0x736564656572662e <error: Cannot access memory at address 0x736564656572662e>, module_name = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>, has_dynamic_init = 140733244859232, gcc_location = 0x3, odr_indicator = 139922876716560}, {beg = 139922863446927, size = 93996209800555, size_with_redzone = 140733244862016, name = 0x7fff031163e0 "", module_name = 0x7f4255675f78 "\001", has_dynamic_init = 140733244859424, gcc_location = 0x557d32c615a0, odr_indicator = 139922855401656}, {beg = 65535, size = 140733244859344, size_with_redzone = 139922876547929, name = 0x40 <error: Cannot access memory at address 0x40>, module_name = 0x7b4252655a00 "\0166\340E", has_dynamic_init = 140733244859392, gcc_location = 0x7f42554f074a <__asan_stack_malloc_0(__sanitizer::uptr)+234>, odr_indicator = 140733244859392}, {beg = 139922876972925, size = 140733244859424, size_with_redzone = 139922876816742, name = 0x7fff031164a0 "", module_name = 0x2 <error: Cannot access memory at address 0x2>, has_dynamic_init = 139922877431744, gcc_location = 0x7b825364c600, odr_indicator = 140733244859504}}, reg_sites = {1431213880, 32578, 40, 0}, access_size = 139922876922397, size = 208 '\320'}, wild = {addr = 139922877142935, access_size = 139922877447424}}}}}, Generic = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 137105344693259, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 137105344693259, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1597, free_stack_id = 2759, chunk_access = {bad_addr = 137105344693259, offset = 11, chunk_begin = 137105344693248, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 137105344693259, tid = 0, offset = 0, frame_pc = 11849814771261, access_size = 137105344693259, frame_descr = 0xb <error: Cannot access memory at address 0xb>}, global = {addr = 137105344693259, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 11849814771261, name = 0x7cb2535e040b "B", module_name = 0xb <error: Cannot access memory at address 0xb>, has_dynamic_init = 137105344693248, gcc_location = 0x2f0, odr_indicator = 140733244858376}, {beg = 135524778155552, size = 140733244857552, size_with_redzone = 139922875759391, name = 0x1 <error: Cannot access memory at address 0x1>, module_name = 0x7b4252429e20 "\240feS\242{", has_dynamic_init = 140733244859680, gcc_location = 0x7f42555cd5d2 <___interceptor_malloc(__sanitizer::uptr)+130>, odr_indicator = 139922851508432}, {beg = 128900488496, size = 140733244857600, size_with_redzone = 3, name = 0x7f42555cd610 <___interceptor_malloc(__sanitizer::uptr)+192> "D\213\215\314\367\377\377E\205\311tTH\211m\330A\203\371\001t*E\017\276\3061\311H\211\352H\211\306H\215\275\320\367\377\377\350\"\004\001", module_name = 0x7f4254925b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", has_dynamic_init = 93996209800555, gcc_location = 0x7fff031167e0, odr_indicator = 140733244857792}, {beg = 2, size = 139922877431744, size_with_redzone = 135937114072528, name = 0x7fff03115d90 "@m\021\003\377\177", module_name = 0x7f42554e9738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", has_dynamic_init = 62, gcc_location = 0x7ba2536565d0, odr_indicator = 139922851508432}}, reg_sites = {51469744, 32767, 1399154144, 31650}, access_size = 81, size = 32 ' '}, wild = {addr = 137105344693259, access_size = 0}}}}, pc = 139922876462149, bp = 140733244861760, sp = 140733244859624, access_size = 6, bug_descr = 0x7f4255635797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}}}, halt_on_error_ = true}
error = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\377\177\000\000\002\000\000\000bluetoothd[5\000\025\3022\366\361\"\202nal] org\020c\021\003\377\177\000\000\300X\021\003\377\177\000\000.|\233TB\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@a\021\003\377\177\000\000\211]\222TB\177\000\000\374X\021\003\377\177\000\000\374X\021\003\377\177\000\000\374`\021\003\377\177\000\000N\000\000\000\000\000\000\000\006\000\000\000B\177\000\000\002\000\000\000bluetoothd[52]: [signal] org.fre"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 137105344693259, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 137105344693259, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1597, free_stack_id = 2759, chunk_access = {bad_addr = 137105344693259, offset = 11, chunk_begin = 137105344693248, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 137105344693259, tid = 0, offset = 0, frame_pc = 11849814771261, access_size = 137105344693259, frame_descr = 0xb <error: Cannot access memory at address 0xb>}, global = {addr = 137105344693259, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 11849814771261, name = 0x7cb2535e040b "B", module_name = 0xb <error: Cannot access memory at address 0xb>, has_dynamic_init = 137105344693248, gcc_location = 0x2f0, odr_indicator = 140733244858376}, {beg = 135524778155552, size = 140733244857552, size_with_redzone = 139922875759391, name = 0x1 <error: Cannot access memory at address 0x1>, module_name = 0x7b4252429e20 "\240feS\242{", has_dynamic_init = 140733244859680, gcc_location = 0x7f42555cd5d2 <___interceptor_malloc(__sanitizer::uptr)+130>, odr_indicator = 139922851508432}, {beg = 128900488496, size = 140733244857600, size_with_redzone = 3, name = 0x7f42555cd610 <___interceptor_malloc(__sanitizer::uptr)+192> "D\213\215\314\367\377\377E\205\311tTH\211m\330A\203\371\001t*E\017\276\3061\311H\211\352H\211\306H\215\275\320\367\377\377\350\"\004\001", module_name = 0x7f4254925b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", has_dynamic_init = 93996209800555, gcc_location = 0x7fff031167e0, odr_indicator = 140733244857792}, {beg = 2, size = 139922877431744, size_with_redzone = 135937114072528, name = 0x7fff03115d90 "@m\021\003\377\177", module_name = 0x7f42554e9738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", has_dynamic_init = 62, gcc_location = 0x7ba2536565d0, odr_indicator = 139922851508432}}, reg_sites = {51469744, 32767, 1399154144, 31650}, access_size = 81, size = 32 ' '}, wild = {addr = 137105344693259, access_size = 0}}}}, pc = 139922876462149, bp = 140733244861760, sp = 140733244859624, access_size = 6, bug_descr = 0x7f4255635797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}
#9 0x00007f42555d9f8d in __asan::ReportGenericError (pc=<optimized out>, bp=bp@entry=140733244861760, sp=sp@entry=140733244859624, addr=addr@entry=137105344693259, is_write=is_write@entry=false, access_size=access_size@entry=6, exp=<optimized out>, fatal=false) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = <optimized out>
error = <optimized out>
enable_fp = <optimized out>
#10 0x00007f425558f468 in MemcmpInterceptorCommon (ctx=ctx@entry=0x7fff03116d50, real_fn=<optimized out>, a1=a1@entry=0x7cb2535e040b, a2=a2@entry=0x7b425238ad20, size=size@entry=6) at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:848
bp = 140733244861760
pc = <optimized out>
local_stack = 136761747308608
sp = 140733244859624
_ctx = 0x7fff03116d50
suppressed = <optimized out>
__offset = 137105344693259
__size = 6
__bad = <optimized out>
result = <optimized out>
#11 0x00007f425558f835 in ___interceptor_memcmp (a1=0x7cb2535e040b, a2=0x7b425238ad20, size=6) at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:880
ctx = 0x7fff03116d50
_ctx = {interceptor_name = 0x7f42556396b6 "memcmp"}
#12 ___interceptor_memcmp (a1=0x7cb2535e040b, a2=0x7b425238ad20, size=6) at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:875
ctx = <optimized out>
_ctx = <optimized out>
#13 0x0000557d32a04038 in bacmp (ba1=0x7cb2535e040b, ba2=0x7b425238ad20) at ./lib/bluetooth/bluetooth.h:438
No locals.
#14 device_addr_type_cmp (a=0x7cb2535e0400, b=0x7b425238ad20) at src/device.c:5657
dev = 0x7cb2535e0400
addr = 0x7b425238ad20
cmp = <optimized out>
#15 0x00007f42553094c2 in g_slist_find_custom () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#16 0x0000557d329836f4 in btd_adapter_find_device (adapter=<optimized out>, dst=dst@entry=0x7b825360ec98, bdaddr_type=1 '\001') at src/adapter.c:1055
addr = <optimized out>
device = <optimized out>
list = <optimized out>
#17 0x0000557d32925c07 in att_disconnected (err=<optimized out>, user_data=0x7b825360ec90) at src/gatt-database.c:335
state = 0x7b825360ec90
device = <optimized out>
__func__ = "att_disconnected"
#18 0x0000557d3293cb34 in btd_gatt_database_att_disconnected (database=<optimized out>, device=<optimized out>) at src/gatt-database.c:4238
server = <optimized out>
att = <optimized out>
state = <optimized out>
addr = <optimized out>
type = <optimized out>
__func__ = "btd_gatt_database_att_disconnected"
#19 0x0000557d329e60e6 in gatt_server_cleanup (device=device@entry=0x7cb2535e0080) at src/device.c:842
No locals.
#20 0x0000557d329fa7dc in attio_cleanup (device=0x7cb2535e0080) at src/device.c:862
No locals.
#21 0x0000557d329fae27 in device_free (user_data=0x7cb2535e0080) at src/device.c:918
device = 0x7cb2535e0080
__func__ = "device_free"
#22 0x0000557d32a78a3a in remove_interface (data=0x7bb2535eb000, name=name@entry=0x557d32c85a60 "org.bluez.Device1") at gdbus/object.c:742
iface = 0x7ba2535fe380
#23 0x0000557d32a7b5fc in g_dbus_unregister_interface (connection=<optimized out>, path=<optimized out>, name=<optimized out>) at gdbus/object.c:1499
data = <optimized out>
#24 0x0000557d329b61b3 in adapter_remove (adapter=adapter@entry=0x7c72535e0200) at src/adapter.c:7307
l = 0x7b625360b3f0 = {0x7cb2535e0080}
db = <optimized out>
ranging_manager = <optimized out>
__func__ = "adapter_remove"
#25 0x0000557d329b6d48 in adapter_cleanup () at src/adapter.c:11263
adapter = 0x7c72535e0200
#26 0x0000557d327682f0 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:1723
context = <optimized out>
err = <optimized out>
sdp_mtu = 0
sdp_flags = <optimized out>
gdbus_flags = <optimized out>
__func__ = "main""
FAIL functional.test_bap::test_bap_unicast_set_transport_created[hosts8-vm3-legacy]: failed on setup with "pytest_bluezenv.rpc.RemoteTimeoutError: Connection recv timed out"
FAIL functional.test_bap::test_bap_unicast_set_transport_created[hosts8-vm3-legacy]: failed on teardown with "pytest_bluezenv.plugin.CoredumpWarning: Core dump: test-bluezenv-hosts8.0-bluetoothd-1789755568-71.core
/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory.
[New LWP 71]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/runner/work/bluez/bluez/src/src/src/bluetoothd --nodetach -f /run/bluetoo'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
Thread 1 (Thread 0x7f89ef0fe900 (LWP 71)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {4412750543122677053}}
ret = <optimized out>
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
No locals.
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100
No locals.
#3 0x00007f89ef859b7e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#4 0x00007f89ef83c8ec in __GI_abort () at ./stdlib/abort.c:77
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0, 0, 0, 140732296284720, 140732296285008, 140732296284864, 22, 140230402661328, 0, 140732296284800, 140230419506710, 140230389817344, 4096, 0, 10074738043712474368, 140230393999384}}, sa_flags = -256356352, sa_restorer = 0x16}
#5 0x00007f89f0464a0f in __sanitizer::Abort () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp:165
No locals.
#6 0x00007f89f058ac2d in __sanitizer::Die () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:58
No locals.
#7 0x00007f89f055f93c in __asan::ScopedInErrorReport::~ScopedInErrorReport (this=0x7ffeca874bf6) at ../../../../src/libsanitizer/asan/asan_report.cpp:221
buffer_copy = {buffer_ = {<__sanitizer::InternalMmapVectorNoCtor<char, false>> = {data_ = 0x7f89ee916000 '=' <repeats 65 times>, "\n==71==ERROR: AddressSanitizer: heap-use-after-free on address 0x7cf9ee5e0208 at pc 0x561a6399ce9c bp 0x7ffeca875870 sp 0x7ffeca875860\n"..., capacity_bytes_ = 4096, size_ = 3419}, <No data fields>}}
buffer_copy = <optimized out>
l = <optimized out>
#8 0x00007f89f055ee02 in __asan::ReportGenericError (pc=94671340162716, bp=140732296288368, sp=sp@entry=140732296288352, addr=137412887839240, is_write=is_write@entry=false, access_size=8, fatal=true, exp=<optimized out>) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = {error_report_lock_ = {<No data fields>}, static current_error_ = {kind = __asan::kErrorKindGeneric, {Base = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, DeadlySignal = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, signal = {siginfo = 0x7ffe00000002, context = 0x7cf9ee5e0208, addr = 0, pc = 0, sp = 11072425690612, bp = 137412887839240, is_memory_access = 136, write_flag = __sanitizer::SignalContext::Unknown, is_true_faulting_addr = 128}}, DoubleFree = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, second_free_stack = 0x7ffe00000002, addr_description = {addr = 137412887839240, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1524, free_stack_id = 2578, chunk_access = {bad_addr = 137412887839240, offset = 392, chunk_begin = 137412887838848, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}}, NewDeleteTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, free_stack = 0x7ffe00000002, addr_description = {addr = 137412887839240, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1524, free_stack_id = 2578, chunk_access = {bad_addr = 137412887839240, offset = 392, chunk_begin = 137412887838848, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, delete_size = 140230418402079, delete_alignment = 1}, FreeNotMalloced = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, free_stack = 0x7ffe00000002, addr_description = {data = {kind = 3999138312, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11072425690612, alloc_stack_id = 3999138312, free_stack_id = 31993, chunk_access = {bad_addr = 392, offset = 137412887838848, chunk_begin = 752, chunk_size = 140732296290312, user_requested_alignment = 2847, access_type = 0, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11072425690612, frame_pc = 137412887839240, access_size = 392, frame_descr = 0x7cf9ee5e0080 "\022\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11072425690612, size_with_redzone = 137412887839240, name = 0x188 <error: Cannot access memory at address 0x188>, module_name = 0x7cf9ee5e0080 "\022\n", has_dynamic_init = 752, gcc_location = 0x7ffeca876008, odr_indicator = 140230418402079}, {beg = 1, size = 136656973750016, size_with_redzone = 140732296288448, name = 0x7f89f05525d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x3 <error: Cannot access memory at address 0x3>, has_dynamic_init = 132855922688, gcc_location = 0x7ffeca8750a0, odr_indicator = 2}, {beg = 140230419359248, size = 94671340721814, size_with_redzone = 140732296286544, name = 0x7 <error: Cannot access memory at address 0x7>, module_name = 0x7f89f0600fc0 <__asan::instance> "", has_dynamic_init = 135969779897408, gcc_location = 0x7ffeca875120, odr_indicator = 140230419459430}, {beg = 140732296286592, size = 6, size_with_redzone = 140230420074432, name = 0x7c49ee617ef0 "\003\021", module_name = 0x7ffeca875150 "\b", has_dynamic_init = 140230418425656, gcc_location = 0x78, odr_indicator = 136656973823728}}, reg_sites = {3397865792, 32766, 4019437934, 32649}, access_size = 0, size = 156 '\234'}, wild = {addr = 0, access_size = 0}}}}}, AllocTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, dealloc_stack = 0x7ffe00000002, alloc_type = 3999138312, dealloc_type = 31993, addr_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 0, kind = (unknown: 0xf4), shadow_byte = 5 '\005'}, heap = {addr = 0, alloc_tid = 11072425690612, free_tid = 137412887839240, alloc_stack_id = 392, free_stack_id = 0, chunk_access = {bad_addr = 137412887838848, offset = 752, chunk_begin = 140732296290312, chunk_size = 140230418402079, user_requested_alignment = 1, access_type = 0, alloc_type = 0}}, stack = {addr = 0, tid = 11072425690612, offset = 137412887839240, frame_pc = 392, access_size = 137412887838848, frame_descr = 0x2f0 <error: Cannot access memory at address 0x2f0>}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 11072425690612, size = 137412887839240, size_with_redzone = 392, name = 0x7cf9ee5e0080 "\022\n", module_name = 0x2f0 <error: Cannot access memory at address 0x2f0>, has_dynamic_init = 140732296290312, gcc_location = 0x7f89f0468b1f <__asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*)+47>, odr_indicator = 1}, {beg = 136656973750016, size = 140732296288448, size_with_redzone = 140230419359186, name = 0x3 <error: Cannot access memory at address 0x3>, module_name = 0x1eeed48000 <error: Cannot access memory at address 0x1eeed48000>, has_dynamic_init = 140732296286368, gcc_location = 0x2, odr_indicator = 140230419359248}, {beg = 94671340721814, size = 140732296286544, size_with_redzone = 7, name = 0x7f89f0600fc0 <__asan::instance> "", module_name = 0x7ba9ee6e5440 "\003\021", has_dynamic_init = 140732296286496, gcc_location = 0x7f89f056ad66 <__sanitizer::RunFreeHooks(void*)+86>, odr_indicator = 140732296286592}, {beg = 6, size = 140230420074432, size_with_redzone = 136656973823728, name = 0x7ffeca875150 "\b", module_name = 0x7f89f046e738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", has_dynamic_init = 120, gcc_location = 0x7c49ee617ef0, odr_indicator = 140732296286528}}, reg_sites = {4019437934, 32649, 0, 0}, access_size = 94671340162716, size = 112 'p'}, wild = {addr = 0, access_size = 11072425690612}}}}}, MallocUsableSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, addr_description = {data = {kind = 3999138312, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11072425690612, alloc_stack_id = 3999138312, free_stack_id = 31993, chunk_access = {bad_addr = 392, offset = 137412887838848, chunk_begin = 752, chunk_size = 140732296290312, user_requested_alignment = 2847, access_type = 0, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11072425690612, frame_pc = 137412887839240, access_size = 392, frame_descr = 0x7cf9ee5e0080 "\022\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11072425690612, size_with_redzone = 137412887839240, name = 0x188 <error: Cannot access memory at address 0x188>, module_name = 0x7cf9ee5e0080 "\022\n", has_dynamic_init = 752, gcc_location = 0x7ffeca876008, odr_indicator = 140230418402079}, {beg = 1, size = 136656973750016, size_with_redzone = 140732296288448, name = 0x7f89f05525d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x3 <error: Cannot access memory at address 0x3>, has_dynamic_init = 132855922688, gcc_location = 0x7ffeca8750a0, odr_indicator = 2}, {beg = 140230419359248, size = 94671340721814, size_with_redzone = 140732296286544, name = 0x7 <error: Cannot access memory at address 0x7>, module_name = 0x7f89f0600fc0 <__asan::instance> "", has_dynamic_init = 135969779897408, gcc_location = 0x7ffeca875120, odr_indicator = 140230419459430}, {beg = 140732296286592, size = 6, size_with_redzone = 140230420074432, name = 0x7c49ee617ef0 "\003\021", module_name = 0x7ffeca875150 "\b", has_dynamic_init = 140230418425656, gcc_location = 0x78, odr_indicator = 136656973823728}}, reg_sites = {3397865792, 32766, 4019437934, 32649}, access_size = 0, size = 156 '\234'}, wild = {addr = 0, access_size = 0}}}}}, SanitizerGetAllocatedSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, addr_description = {data = {kind = 3999138312, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11072425690612, alloc_stack_id = 3999138312, free_stack_id = 31993, chunk_access = {bad_addr = 392, offset = 137412887838848, chunk_begin = 752, chunk_size = 140732296290312, user_requested_alignment = 2847, access_type = 0, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11072425690612, frame_pc = 137412887839240, access_size = 392, frame_descr = 0x7cf9ee5e0080 "\022\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11072425690612, size_with_redzone = 137412887839240, name = 0x188 <error: Cannot access memory at address 0x188>, module_name = 0x7cf9ee5e0080 "\022\n", has_dynamic_init = 752, gcc_location = 0x7ffeca876008, odr_indicator = 140230418402079}, {beg = 1, size = 136656973750016, size_with_redzone = 140732296288448, name = 0x7f89f05525d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x3 <error: Cannot access memory at address 0x3>, has_dynamic_init = 132855922688, gcc_location = 0x7ffeca8750a0, odr_indicator = 2}, {beg = 140230419359248, size = 94671340721814, size_with_redzone = 140732296286544, name = 0x7 <error: Cannot access memory at address 0x7>, module_name = 0x7f89f0600fc0 <__asan::instance> "", has_dynamic_init = 135969779897408, gcc_location = 0x7ffeca875120, odr_indicator = 140230419459430}, {beg = 140732296286592, size = 6, size_with_redzone = 140230420074432, name = 0x7c49ee617ef0 "\003\021", module_name = 0x7ffeca875150 "\b", has_dynamic_init = 140230418425656, gcc_location = 0x78, odr_indicator = 136656973823728}}, reg_sites = {3397865792, 32766, 4019437934, 32649}, access_size = 0, size = 156 '\234'}, wild = {addr = 0, access_size = 0}}}}}, CallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, count = 137412887839240, size = 0}, ReallocArrayOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, count = 137412887839240, size = 0}, PvallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, size = 137412887839240}, InvalidAllocationAlignment = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, alignment = 137412887839240}, InvalidAlignedAllocAlignment = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, size = 137412887839240, alignment = 0}, InvalidPosixMemalignAlignment = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, alignment = 137412887839240}, AllocationSizeTooBig = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, user_size = 137412887839240, total_size = 0, max_size = 0}, RssLimitExceeded = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002}, OutOfMemory = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, requested_size = 137412887839240}, StringFunctionMemoryRangesOverlap = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, length1 = 137412887839240, length2 = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 11072425690612, kind = (unknown: 0x8), shadow_byte = 2 '\002'}, heap = {addr = 11072425690612, alloc_tid = 137412887839240, free_tid = 392, alloc_stack_id = 3999137920, free_stack_id = 31993, chunk_access = {bad_addr = 752, offset = 140732296290312, chunk_begin = 140230418402079, chunk_size = 1, user_requested_alignment = 3840, access_type = 1, alloc_type = 1}}, stack = {addr = 11072425690612, tid = 137412887839240, offset = 392, frame_pc = 137412887838848, access_size = 752, frame_descr = 0x7ffeca876008 ""}, global = {addr = 11072425690612, static kMaxGlobals = 4, globals = {{beg = 137412887839240, size = 392, size_with_redzone = 137412887838848, name = 0x2f0 <error: Cannot access memory at address 0x2f0>, module_name = 0x7ffeca876008 "", has_dynamic_init = 140230418402079, gcc_location = 0x1, odr_indicator = 136656973750016}, {beg = 140732296288448, size = 140230419359186, size_with_redzone = 3, name = 0x1eeed48000 <error: Cannot access memory at address 0x1eeed48000>, module_name = 0x7ffeca8750a0 "\020&U\360\211\177", has_dynamic_init = 2, gcc_location = 0x7f89f0552610 <___interceptor_malloc(__sanitizer::uptr)+192>, odr_indicator = 94671340721814}, {beg = 140732296286544, size = 7, size_with_redzone = 140230420074432, name = 0x7ba9ee6e5440 "\003\021", module_name = 0x7ffeca875120 "@Q\207\312\376\177", has_dynamic_init = 140230419459430, gcc_location = 0x7ffeca875180, odr_indicator = 6}, {beg = 140230420074432, size = 136656973823728, size_with_redzone = 140732296286544, name = 0x7f89f046e738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x78 <error: Cannot access memory at address 0x78>, has_dynamic_init = 136656973823728, gcc_location = 0x7ffeca875140, odr_indicator = 140230406685038}}, reg_sites = {0, 0, 1671024284, 22042}, access_size = 140732296288368, size = 96 '`'}, wild = {addr = 11072425690612, access_size = 137412887839240}}}}, addr2_description = {data = {kind = 8, {shadow = {addr = 140230419785623, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 140230419785623, alloc_tid = 140230416334080, free_tid = 140732296288016, alloc_stack_id = 4031899859, free_stack_id = 32649, chunk_access = {bad_addr = 140732296288016, offset = 4029274680, chunk_begin = 140732296288112, chunk_size = 140230416301654, user_requested_alignment = 384, access_type = 0, alloc_type = 0}}, stack = {addr = 140230419785623, tid = 140230416334080, offset = 140732296288016, frame_pc = 140230419146963, access_size = 140732296288016, frame_descr = 0xf029da38 <error: Cannot access memory at address 0xf029da38>}, global = {addr = 140230419785623, static kMaxGlobals = 4, globals = {{beg = 140230416334080, size = 140732296288016, size_with_redzone = 140230419146963, name = 0x7ffeca875710 "\200\001^\356\231|", module_name = 0xf029da38 <error: Cannot access memory at address 0xf029da38>, has_dynamic_init = 140732296288112, gcc_location = 0x7f89f0267e56, odr_indicator = 137000570978688}, {beg = 140230416301604, size = 140732296288064, size_with_redzone = 6953256225440, name = 0x23 <error: Cannot access memory at address 0x23>, module_name = 0x2e357977 <error: Cannot access memory at address 0x2e357977>, has_dynamic_init = 140732296288096, gcc_location = 0x7be9ee5e0aa0, odr_indicator = 140732296288128}, {beg = 136656973823744, size = 137000570978688, size_with_redzone = 136107218249744, name = 0x561a63b7d780 <watch_destroy> "\363\017\036\372SH\211\373H\203\354\020H\205\377\017\2049\002", module_name = 0x7f89f02ccdce "I\211\305L9\360tJH\205\300tUH\213E\310dH+\004%(", has_dynamic_init = 136656973823744, gcc_location = 0x7f89f02ccdce, odr_indicator = 94671342131072}, {beg = 0, size = 140732296288224, size_with_redzone = 140230416715214, name = 0x7c89ee5e0f40 "\001", module_name = 0x7bc9ee5f84d0 "\002", has_dynamic_init = 44, gcc_location = 0x0, odr_indicator = 136107217880280}}, reg_sites = {3999606824, 31689, 3999237360, 31689}, access_size = 94671342132942, size = 16 '\020'}, wild = {addr = 140230419785623, access_size = 140230416334080}}}}, function = 0x8bd0a8df5c988d00 <error: Cannot access memory at address 0x8bd0a8df5c988d00>}, StringFunctionSizeOverflow = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, addr_description = {data = {kind = 3999138312, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11072425690612, alloc_stack_id = 3999138312, free_stack_id = 31993, chunk_access = {bad_addr = 392, offset = 137412887838848, chunk_begin = 752, chunk_size = 140732296290312, user_requested_alignment = 2847, access_type = 0, alloc_type = 2}}, stack = {addr = 0, tid = 0, offset = 11072425690612, frame_pc = 137412887839240, access_size = 392, frame_descr = 0x7cf9ee5e0080 "\022\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11072425690612, size_with_redzone = 137412887839240, name = 0x188 <error: Cannot access memory at address 0x188>, module_name = 0x7cf9ee5e0080 "\022\n", has_dynamic_init = 752, gcc_location = 0x7ffeca876008, odr_indicator = 140230418402079}, {beg = 1, size = 136656973750016, size_with_redzone = 140732296288448, name = 0x7f89f05525d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x3 <error: Cannot access memory at address 0x3>, has_dynamic_init = 132855922688, gcc_location = 0x7ffeca8750a0, odr_indicator = 2}, {beg = 140230419359248, size = 94671340721814, size_with_redzone = 140732296286544, name = 0x7 <error: Cannot access memory at address 0x7>, module_name = 0x7f89f0600fc0 <__asan::instance> "", has_dynamic_init = 135969779897408, gcc_location = 0x7ffeca875120, odr_indicator = 140230419459430}, {beg = 140732296286592, size = 6, size_with_redzone = 140230420074432, name = 0x7c49ee617ef0 "\003\021", module_name = 0x7ffeca875150 "\b", has_dynamic_init = 140230418425656, gcc_location = 0x78, odr_indicator = 136656973823728}}, reg_sites = {3397865792, 32766, 4019437934, 32649}, access_size = 0, size = 156 '\234'}, wild = {addr = 0, access_size = 0}}}}, size = 140732296288368}, BadParamsToAnnotateContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, beg = 137412887839240, end = 0, old_mid = 0, new_mid = 11072425690612}, BadParamsToAnnotateDoubleEndedContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, storage_beg = 137412887839240, storage_end = 0, old_container_beg = 0, old_container_end = 11072425690612, new_container_beg = 137412887839240, new_container_end = 392}, BadParamsToCopyContiguousContainerAnnotations = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, stack = 0x7ffe00000002, old_storage_beg = 137412887839240, old_storage_end = 0, new_storage_beg = 0, new_storage_end = 11072425690612}, ODRViolation = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, global1 = {beg = 140728898420738, size = 137412887839240, size_with_redzone = 0, name = 0x0, module_name = 0xa12000005f4 <error: Cannot access memory at address 0xa12000005f4>, has_dynamic_init = 137412887839240, gcc_location = 0x188, odr_indicator = 137412887838848}, global2 = {beg = 752, size = 140732296290312, size_with_redzone = 140230418402079, name = 0x1 <error: Cannot access memory at address 0x1>, module_name = 0x7c49ee605f00 "\200\a^\356\371|", has_dynamic_init = 140732296288448, gcc_location = 0x7f89f05525d2 <___interceptor_malloc(__sanitizer::uptr)+130>, odr_indicator = 3}, stack_id1 = 4006903808, stack_id2 = 30}, InvalidPointerPair = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, pc = 140728898420738, bp = 137412887839240, sp = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 11072425690612, kind = (unknown: 0x8), shadow_byte = 2 '\002'}, heap = {addr = 11072425690612, alloc_tid = 137412887839240, free_tid = 392, alloc_stack_id = 3999137920, free_stack_id = 31993, chunk_access = {bad_addr = 752, offset = 140732296290312, chunk_begin = 140230418402079, chunk_size = 1, user_requested_alignment = 3840, access_type = 1, alloc_type = 1}}, stack = {addr = 11072425690612, tid = 137412887839240, offset = 392, frame_pc = 137412887838848, access_size = 752, frame_descr = 0x7ffeca876008 ""}, global = {addr = 11072425690612, static kMaxGlobals = 4, globals = {{beg = 137412887839240, size = 392, size_with_redzone = 137412887838848, name = 0x2f0 <error: Cannot access memory at address 0x2f0>, module_name = 0x7ffeca876008 "", has_dynamic_init = 140230418402079, gcc_location = 0x1, odr_indicator = 136656973750016}, {beg = 140732296288448, size = 140230419359186, size_with_redzone = 3, name = 0x1eeed48000 <error: Cannot access memory at address 0x1eeed48000>, module_name = 0x7ffeca8750a0 "\020&U\360\211\177", has_dynamic_init = 2, gcc_location = 0x7f89f0552610 <___interceptor_malloc(__sanitizer::uptr)+192>, odr_indicator = 94671340721814}, {beg = 140732296286544, size = 7, size_with_redzone = 140230420074432, name = 0x7ba9ee6e5440 "\003\021", module_name = 0x7ffeca875120 "@Q\207\312\376\177", has_dynamic_init = 140230419459430, gcc_location = 0x7ffeca875180, odr_indicator = 6}, {beg = 140230420074432, size = 136656973823728, size_with_redzone = 140732296286544, name = 0x7f89f046e738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x78 <error: Cannot access memory at address 0x78>, has_dynamic_init = 136656973823728, gcc_location = 0x7ffeca875140, odr_indicator = 140230406685038}}, reg_sites = {0, 0, 1671024284, 22042}, access_size = 140732296288368, size = 96 '`'}, wild = {addr = 11072425690612, access_size = 137412887839240}}}}, addr2_description = {data = {kind = 8, {shadow = {addr = 140230419785623, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 140230419785623, alloc_tid = 140230416334080, free_tid = 140732296288016, alloc_stack_id = 4031899859, free_stack_id = 32649, chunk_access = {bad_addr = 140732296288016, offset = 4029274680, chunk_begin = 140732296288112, chunk_size = 140230416301654, user_requested_alignment = 384, access_type = 0, alloc_type = 0}}, stack = {addr = 140230419785623, tid = 140230416334080, offset = 140732296288016, frame_pc = 140230419146963, access_size = 140732296288016, frame_descr = 0xf029da38 <error: Cannot access memory at address 0xf029da38>}, global = {addr = 140230419785623, static kMaxGlobals = 4, globals = {{beg = 140230416334080, size = 140732296288016, size_with_redzone = 140230419146963, name = 0x7ffeca875710 "\200\001^\356\231|", module_name = 0xf029da38 <error: Cannot access memory at address 0xf029da38>, has_dynamic_init = 140732296288112, gcc_location = 0x7f89f0267e56, odr_indicator = 137000570978688}, {beg = 140230416301604, size = 140732296288064, size_with_redzone = 6953256225440, name = 0x23 <error: Cannot access memory at address 0x23>, module_name = 0x2e357977 <error: Cannot access memory at address 0x2e357977>, has_dynamic_init = 140732296288096, gcc_location = 0x7be9ee5e0aa0, odr_indicator = 140732296288128}, {beg = 136656973823744, size = 137000570978688, size_with_redzone = 136107218249744, name = 0x561a63b7d780 <watch_destroy> "\363\017\036\372SH\211\373H\203\354\020H\205\377\017\2049\002", module_name = 0x7f89f02ccdce "I\211\305L9\360tJH\205\300tUH\213E\310dH+\004%(", has_dynamic_init = 136656973823744, gcc_location = 0x7f89f02ccdce, odr_indicator = 94671342131072}, {beg = 0, size = 140732296288224, size_with_redzone = 140230416715214, name = 0x7c89ee5e0f40 "\001", module_name = 0x7bc9ee5f84d0 "\002", has_dynamic_init = 44, gcc_location = 0x0, odr_indicator = 136107217880280}}, reg_sites = {3999606824, 31689, 3999237360, 31689}, access_size = 94671342132942, size = 16 '\020'}, wild = {addr = 140230419785623, access_size = 140230416334080}}}}}, Generic = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 137412887839240, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 137412887839240, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1524, free_stack_id = 2578, chunk_access = {bad_addr = 137412887839240, offset = 392, chunk_begin = 137412887838848, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 137412887839240, tid = 0, offset = 0, frame_pc = 11072425690612, access_size = 137412887839240, frame_descr = 0x188 <error: Cannot access memory at address 0x188>}, global = {addr = 137412887839240, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 11072425690612, name = 0x7cf9ee5e0208 "", module_name = 0x188 <error: Cannot access memory at address 0x188>, has_dynamic_init = 137412887838848, gcc_location = 0x2f0, odr_indicator = 140732296290312}, {beg = 140230418402079, size = 1, size_with_redzone = 136656973750016, name = 0x7ffeca8758c0 "\320Q\204c\032V", module_name = 0x7f89f05525d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", has_dynamic_init = 3, gcc_location = 0x1eeed48000, odr_indicator = 140732296286368}, {beg = 2, size = 140230419359248, size_with_redzone = 94671340721814, name = 0x7ffeca875150 "\b", module_name = 0x7 <error: Cannot access memory at address 0x7>, has_dynamic_init = 140230420074432, gcc_location = 0x7ba9ee6e5440, odr_indicator = 140732296286496}, {beg = 140230419459430, size = 140732296286592, size_with_redzone = 6, name = 0x7f89f0600fc0 <__asan::instance> "", module_name = 0x7c49ee617ef0 "\003\021", has_dynamic_init = 140732296286544, gcc_location = 0x7f89f046e738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248>, odr_indicator = 120}}, reg_sites = {3999366896, 31817, 3397865792, 32766}, access_size = 140230406685038, size = 0 '\000'}, wild = {addr = 137412887839240, access_size = 0}}}}, pc = 94671340162716, bp = 140732296288368, sp = 140732296288352, access_size = 8, bug_descr = 0x7f89f05ba797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}}}, halt_on_error_ = true}
error = {<__asan::ErrorBase> = {scariness = {score = 51, descr = "8-byte-read-heap-use-after-free\000\211{\000\000\377\000\000\000\000\000\000\000\240G\307c\032V\000\000f\255V\360\211\177\000\000\340L\207\312\376\177\000\000\002\000\000\000\000\000\000\000\300\017`\360\211\177\000\000\220\375^\356\t|\000\000\260L\207\312\376\177\000\0008\347F\360\211\177\000\000^\000\000\000\000\000\000\000\220\375^\356\t|\000\000\320\200\324\356\211\177\000\000\320L\207\312\376\177\000\000\240\375^\356\t|\000\000q\000\000\000\000\000\000\000@U\207\312\376\177\000\000^\000\000\000\000\000\000\000\000U\207\312\376\177\000\000\301\023U\360\211\177\000\000\"j\300c\032V\000\000\270\377\377\377"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 137412887839240, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 137412887839240, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1524, free_stack_id = 2578, chunk_access = {bad_addr = 137412887839240, offset = 392, chunk_begin = 137412887838848, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 137412887839240, tid = 0, offset = 0, frame_pc = 11072425690612, access_size = 137412887839240, frame_descr = 0x188 <error: Cannot access memory at address 0x188>}, global = {addr = 137412887839240, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 11072425690612, name = 0x7cf9ee5e0208 "", module_name = 0x188 <error: Cannot access memory at address 0x188>, has_dynamic_init = 137412887838848, gcc_location = 0x2f0, odr_indicator = 140732296290312}, {beg = 140230418402079, size = 1, size_with_redzone = 136656973750016, name = 0x7ffeca8758c0 "\320Q\204c\032V", module_name = 0x7f89f05525d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", has_dynamic_init = 3, gcc_location = 0x1eeed48000, odr_indicator = 140732296286368}, {beg = 2, size = 140230419359248, size_with_redzone = 94671340721814, name = 0x7ffeca875150 "\b", module_name = 0x7 <error: Cannot access memory at address 0x7>, has_dynamic_init = 140230420074432, gcc_location = 0x7ba9ee6e5440, odr_indicator = 140732296286496}, {beg = 140230419459430, size = 140732296286592, size_with_redzone = 6, name = 0x7f89f0600fc0 <__asan::instance> "", module_name = 0x7c49ee617ef0 "\003\021", has_dynamic_init = 140732296286544, gcc_location = 0x7f89f046e738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248>, odr_indicator = 120}}, reg_sites = {3999366896, 31817, 3397865792, 32766}, access_size = 140230406685038, size = 0 '\000'}, wild = {addr = 137412887839240, access_size = 0}}}}, pc = 94671340162716, bp = 140732296288368, sp = 140732296288352, access_size = 8, bug_descr = 0x7f89f05ba797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}
#9 0x00007f89f055ef8d in __asan::ReportGenericError (pc=<optimized out>, bp=bp@entry=140732296288368, sp=sp@entry=140732296288352, addr=<optimized out>, is_write=is_write@entry=false, access_size=access_size@entry=8, exp=<optimized out>, fatal=true) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = <optimized out>
error = <optimized out>
enable_fp = <optimized out>
#10 0x00007f89f05603f9 in __asan::__asan_report_load8 (addr=<optimized out>) at ../../../../src/libsanitizer/asan/asan_rtl.cpp:131
bp = 140732296288368
pc = <optimized out>
local_stack = 140732296288480
sp = 140732296288352
#11 0x0000561a6399ce9c in device_get_adapter (device=<optimized out>) at src/device.c:6917
No locals.
#12 0x0000561a6384520f in find_cig_session (data=0x7c49ee60ad00, match_data=0x7b89ed483f30) at profiles/audio/bap.c:2500
session = 0x7c49ee60ad00
info = 0x7b89ed483f30
#13 0x0000561a63a24071 in queue_find (queue=<optimized out>, function=function@entry=0x561a638451d0 <find_cig_session>, match_data=match_data@entry=0x7b89ed483f30) at src/shared/queue.c:230
entry = 0x7ba9ee698b10
#14 0x0000561a6384bcd4 in find_cig_enumerate (data=0x7c49ee605f00) at profiles/audio/bap.c:2539
info = <optimized out>
#15 bap_update_cigs_cb (user_data=0x7c49ee605f00) at profiles/audio/bap.c:2688
data = 0x7c49ee605f00
cigs = <optimized out>
unset = <optimized out>
#16 0x00007f89f026ab9b in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#17 0x00007f89f026c1d7 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#18 0x00007f89f026c577 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#19 0x0000561a63b7ffa9 in mainloop_run () at src/shared/mainloop-glib.c:65
No locals.
#20 0x0000561a63b808db in mainloop_run_with_signal (func=func@entry=0x561a639e59d0 <signal_callback>, user_data=user_data@entry=0x0) at src/shared/mainloop-notify.c:196
data = 0x7bb9ee5e3490
io = 0x7bc9ee5f9b10
ret = <optimized out>
#21 0x0000561a636fe2cb in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:1713
context = <optimized out>
err = <optimized out>
sdp_mtu = 0
sdp_flags = <optimized out>
gdbus_flags = <optimized out>
__func__ = "main""
FAIL functional.test_bap::test_bap_unicast_set_transport_acquire[hosts8-vm3]: failed on teardown with "pytest_bluezenv.plugin.CoredumpWarning: Core dump: test-bluezenv-hosts8.0-bluetoothd-1789755623-90.core
/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory.
[New LWP 90]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/runner/work/bluez/bluez/src/src/src/bluetoothd --nodetach -f /run/bluetoo'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
Thread 1 (Thread 0x7f9774748900 (LWP 90)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {4412750543122677053}}
ret = <optimized out>
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
No locals.
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100
No locals.
#3 0x00007f9774ea3b7e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#4 0x00007f9774e868ec in __GI_abort () at ./stdlib/abort.c:77
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0, 135890387078816, 15754315135776397312, 140723325968256, 140723325968544, 140723325968400, 22, 140288475200464, 0, 140723325968336, 140288492045846, 140288466092032, 4096, 0, 15754315135776397312, 140288466538520}}, sa_flags = 1981607936, sa_restorer = 0x16}
#5 0x00007f9775aaea0f in __sanitizer::Abort () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp:165
No locals.
#6 0x00007f9775bd4c2d in __sanitizer::Die () at ../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:58
No locals.
#7 0x00007f9775ba993c in __asan::ScopedInErrorReport::~ScopedInErrorReport (this=0x7ffcb3db2146) at ../../../../src/libsanitizer/asan/asan_report.cpp:221
buffer_copy = {buffer_ = {<__sanitizer::InternalMmapVectorNoCtor<char, false>> = {data_ = 0x7f9774300000 '=' <repeats 65 times>, "\n==90==ERROR: AddressSanitizer: heap-use-after-free on address 0x7d0773be040b at pc 0x7f9775b5e445 bp 0x7ffcb3db3640 sp 0x7ffcb3db2de8\n"..., capacity_bytes_ = 4096, size_ = 3838}, <No data fields>}}
buffer_copy = <optimized out>
l = <optimized out>
#8 0x00007f9775ba8e02 in __asan::ReportGenericError (pc=140288491643973, bp=140723325974080, sp=sp@entry=140723325971944, addr=addr@entry=137470960075787, is_write=is_write@entry=false, access_size=6, fatal=false, exp=<optimized out>) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = {error_report_lock_ = {<No data fields>}, static current_error_ = {kind = __asan::kErrorKindGeneric, {Base = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, DeadlySignal = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, signal = {siginfo = 0xffffffff00000002, context = 0x7d0773be040b, addr = 0, pc = 0, sp = 11901354378792, bp = 137470960075787, is_memory_access = 11, write_flag = __sanitizer::SignalContext::Unknown, is_true_faulting_addr = false}}, DoubleFree = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, second_free_stack = 0xffffffff00000002, addr_description = {addr = 137470960075787, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1576, free_stack_id = 2771, chunk_access = {bad_addr = 137470960075787, offset = 11, chunk_begin = 137470960075776, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}}, NewDeleteTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, free_stack = 0xffffffff00000002, addr_description = {addr = 137470960075787, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1576, free_stack_id = 2771, chunk_access = {bad_addr = 137470960075787, offset = 11, chunk_begin = 137470960075776, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, delete_size = 135890393569056, delete_alignment = 140723325969872}, FreeNotMalloced = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, free_stack = 0xffffffff00000002, addr_description = {data = {kind = 1941832715, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11901354378792, alloc_stack_id = 1941832715, free_stack_id = 32007, chunk_access = {bad_addr = 11, offset = 137470960075776, chunk_begin = 752, chunk_size = 140723325984776, user_requested_alignment = 1824, access_type = 1, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 11901354378792, frame_pc = 137470960075787, access_size = 11, frame_descr = 0x7d0773be0400 "\323\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11901354378792, size_with_redzone = 137470960075787, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7d0773be0400 "\323\n", has_dynamic_init = 752, gcc_location = 0x7ffcb3db6008, odr_indicator = 135890393569056}, {beg = 140723325969872, size = 140288490941215, size_with_redzone = 1, name = 0x7b9772a31720 "@\201\305s\367{", module_name = 0x7ffcb3db2e20 "0.\333\263\374\177", has_dynamic_init = 140288491898322, gcc_location = 0x7f97743920d0, odr_indicator = 131866502704}, {beg = 140723325969920, size = 3, size_with_redzone = 140288491898384, name = 0x7f9774ef4b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x55e7f6f9256b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140723325972704, gcc_location = 0x7ffcb3db26c0, odr_indicator = 2}, {beg = 140288492613568, size = 136302729461872, size_with_redzone = 140723325970064, name = 0x7f9775ab8738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 136302729461872, gcc_location = 0x7f97743920d0, odr_indicator = 140723325970096}}, reg_sites = {1942323328, 31735, 81, 0}, access_size = 140723325972256, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}}, AllocTypeMismatch = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, dealloc_stack = 0xffffffff00000002, alloc_type = 1941832715, dealloc_type = 32007, addr_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 0, kind = (unknown: 0x28), shadow_byte = 6 '\006'}, heap = {addr = 0, alloc_tid = 11901354378792, free_tid = 137470960075787, alloc_stack_id = 11, free_stack_id = 0, chunk_access = {bad_addr = 137470960075776, offset = 752, chunk_begin = 140723325984776, chunk_size = 135890393569056, user_requested_alignment = 1488, access_type = 2, alloc_type = 0}}, stack = {addr = 0, tid = 11901354378792, offset = 137470960075787, frame_pc = 11, access_size = 137470960075776, frame_descr = 0x2f0 <error: Cannot access memory at address 0x2f0>}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 11901354378792, size = 137470960075787, size_with_redzone = 11, name = 0x7d0773be0400 "\323\n", module_name = 0x2f0 <error: Cannot access memory at address 0x2f0>, has_dynamic_init = 140723325984776, gcc_location = 0x7b9772a31720, odr_indicator = 140723325969872}, {beg = 140288490941215, size = 1, size_with_redzone = 135890393569056, name = 0x7ffcb3db2e20 "0.\333\263\374\177", module_name = 0x7f9775b9c5d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", has_dynamic_init = 140288466690256, gcc_location = 0x1eb3db2630, odr_indicator = 140723325969920}, {beg = 3, size = 140288491898384, size_with_redzone = 140288478628751, name = 0x55e7f6f9256b <bt_log_vprintf+171> "\205\300\017\210=\001", module_name = 0x7ffcb3db30e0 "\2042\333\263\374\177", has_dynamic_init = 140723325970112, gcc_location = 0x2, odr_indicator = 140288492613568}, {beg = 136302729461872, size = 140723325970064, size_with_redzone = 140288490964792, name = 0x3e <error: Cannot access memory at address 0x3e>, module_name = 0x7bf773c58070 "\003\021", has_dynamic_init = 140288466690256, gcc_location = 0x7ffcb3db26b0, odr_indicator = 136302729461888}}, reg_sites = {81, 0, 3017486112, 32764}, access_size = 140288491643973, size = 64 '@'}, wild = {addr = 0, access_size = 11901354378792}}}}}, MallocUsableSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, addr_description = {data = {kind = 1941832715, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11901354378792, alloc_stack_id = 1941832715, free_stack_id = 32007, chunk_access = {bad_addr = 11, offset = 137470960075776, chunk_begin = 752, chunk_size = 140723325984776, user_requested_alignment = 1824, access_type = 1, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 11901354378792, frame_pc = 137470960075787, access_size = 11, frame_descr = 0x7d0773be0400 "\323\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11901354378792, size_with_redzone = 137470960075787, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7d0773be0400 "\323\n", has_dynamic_init = 752, gcc_location = 0x7ffcb3db6008, odr_indicator = 135890393569056}, {beg = 140723325969872, size = 140288490941215, size_with_redzone = 1, name = 0x7b9772a31720 "@\201\305s\367{", module_name = 0x7ffcb3db2e20 "0.\333\263\374\177", has_dynamic_init = 140288491898322, gcc_location = 0x7f97743920d0, odr_indicator = 131866502704}, {beg = 140723325969920, size = 3, size_with_redzone = 140288491898384, name = 0x7f9774ef4b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x55e7f6f9256b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140723325972704, gcc_location = 0x7ffcb3db26c0, odr_indicator = 2}, {beg = 140288492613568, size = 136302729461872, size_with_redzone = 140723325970064, name = 0x7f9775ab8738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 136302729461872, gcc_location = 0x7f97743920d0, odr_indicator = 140723325970096}}, reg_sites = {1942323328, 31735, 81, 0}, access_size = 140723325972256, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}}, SanitizerGetAllocatedSizeNotOwned = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, addr_description = {data = {kind = 1941832715, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11901354378792, alloc_stack_id = 1941832715, free_stack_id = 32007, chunk_access = {bad_addr = 11, offset = 137470960075776, chunk_begin = 752, chunk_size = 140723325984776, user_requested_alignment = 1824, access_type = 1, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 11901354378792, frame_pc = 137470960075787, access_size = 11, frame_descr = 0x7d0773be0400 "\323\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11901354378792, size_with_redzone = 137470960075787, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7d0773be0400 "\323\n", has_dynamic_init = 752, gcc_location = 0x7ffcb3db6008, odr_indicator = 135890393569056}, {beg = 140723325969872, size = 140288490941215, size_with_redzone = 1, name = 0x7b9772a31720 "@\201\305s\367{", module_name = 0x7ffcb3db2e20 "0.\333\263\374\177", has_dynamic_init = 140288491898322, gcc_location = 0x7f97743920d0, odr_indicator = 131866502704}, {beg = 140723325969920, size = 3, size_with_redzone = 140288491898384, name = 0x7f9774ef4b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x55e7f6f9256b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140723325972704, gcc_location = 0x7ffcb3db26c0, odr_indicator = 2}, {beg = 140288492613568, size = 136302729461872, size_with_redzone = 140723325970064, name = 0x7f9775ab8738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 136302729461872, gcc_location = 0x7f97743920d0, odr_indicator = 140723325970096}}, reg_sites = {1942323328, 31735, 81, 0}, access_size = 140723325972256, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}}, CallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, count = 137470960075787, size = 0}, ReallocArrayOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, count = 137470960075787, size = 0}, PvallocOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, size = 137470960075787}, InvalidAllocationAlignment = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, alignment = 137470960075787}, InvalidAlignedAllocAlignment = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, size = 137470960075787, alignment = 0}, InvalidPosixMemalignAlignment = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, alignment = 137470960075787}, AllocationSizeTooBig = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, user_size = 137470960075787, total_size = 0, max_size = 0}, RssLimitExceeded = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002}, OutOfMemory = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, requested_size = 137470960075787}, StringFunctionMemoryRangesOverlap = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, length1 = 137470960075787, length2 = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 11901354378792, kind = (__asan::kShadowKindGap | __asan::kShadowKindHigh | unknown: 0x8), shadow_byte = 4 '\004'}, heap = {addr = 11901354378792, alloc_tid = 137470960075787, free_tid = 11, alloc_stack_id = 1941832704, free_stack_id = 32007, chunk_access = {bad_addr = 752, offset = 140723325984776, chunk_begin = 135890393569056, chunk_size = 140723325969872, user_requested_alignment = 2847, access_type = 2, alloc_type = 0}}, stack = {addr = 11901354378792, tid = 137470960075787, offset = 11, frame_pc = 137470960075776, access_size = 752, frame_descr = 0x7ffcb3db6008 <error: Cannot access memory at address 0x7ffcb3db6008>}, global = {addr = 11901354378792, static kMaxGlobals = 4, globals = {{beg = 137470960075787, size = 11, size_with_redzone = 137470960075776, name = 0x2f0 <error: Cannot access memory at address 0x2f0>, module_name = 0x7ffcb3db6008 <error: Cannot access memory at address 0x7ffcb3db6008>, has_dynamic_init = 135890393569056, gcc_location = 0x7ffcb3db25d0, odr_indicator = 140288490941215}, {beg = 1, size = 135890393569056, size_with_redzone = 140723325972000, name = 0x7f9775b9c5d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x7f97743920d0 "", has_dynamic_init = 131866502704, gcc_location = 0x7ffcb3db2600, odr_indicator = 3}, {beg = 140288491898384, size = 140288478628751, size_with_redzone = 94454769329515, name = 0x7ffcb3db30e0 "\2042\333\263\374\177", module_name = 0x7ffcb3db26c0 "\030", has_dynamic_init = 2, gcc_location = 0x7f9775c4afc0 <__asan::instance>, odr_indicator = 136302729461872}, {beg = 140723325970064, size = 140288490964792, size_with_redzone = 62, name = 0x7bf773c58070 "\003\021", module_name = 0x7f97743920d0 "", has_dynamic_init = 140723325970096, gcc_location = 0x7bf773c58080, odr_indicator = 81}}, reg_sites = {3017486112, 32764, 1974854725, 32663}, access_size = 140723325974080, size = 232 '\350'}, wild = {addr = 11901354378792, access_size = 137470960075787}}}}, addr2_description = {data = {kind = 6, {shadow = {addr = 140288492324759, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 140288492324759, alloc_tid = 140288492633344, free_tid = 140723325973632, alloc_stack_id = 1975109074, free_stack_id = 32663, chunk_access = {bad_addr = 8315162673665959470, offset = 130735371371, chunk_begin = 140723325971552, chunk_size = 3, user_requested_alignment = 1552, access_type = 0, alloc_type = 3}}, stack = {addr = 140288492324759, tid = 140288492633344, offset = 140723325973632, frame_pc = 140288491898322, access_size = 8315162673665959470, frame_descr = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>}, global = {addr = 140288492324759, static kMaxGlobals = 4, globals = {{beg = 140288492633344, size = 140723325973632, size_with_redzone = 140288491898322, name = 0x736564656572662e <error: Cannot access memory at address 0x736564656572662e>, module_name = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>, has_dynamic_init = 140723325971552, gcc_location = 0x3, odr_indicator = 140288491898384}, {beg = 140288478628751, size = 94454769329515, size_with_redzone = 140723325974336, name = 0x7ffcb3db2ce0 "", module_name = 0x7f9775c44f78 "\001", has_dynamic_init = 140723325971744, gcc_location = 0x55e7f70d35a0, odr_indicator = 140288470583480}, {beg = 65535, size = 140723325971664, size_with_redzone = 140288491729753, name = 0x40 <error: Cannot access memory at address 0x40>, module_name = 0x7b9772c61e00 "\0166\340E", has_dynamic_init = 140723325971712, gcc_location = 0x7f9775abf74a <__asan_stack_malloc_0(__sanitizer::uptr)+234>, odr_indicator = 140723325971712}, {beg = 140288492154749, size = 140723325971744, size_with_redzone = 140288491998566, name = 0x7ffcb3db2da0 "", module_name = 0x2 <error: Cannot access memory at address 0x2>, has_dynamic_init = 140288492613568, gcc_location = 0x7bd773c4cf40, odr_indicator = 140723325971824}}, reg_sites = {1974175544, 32663, 40, 0}, access_size = 140288492104221, size = 208 '\320'}, wild = {addr = 140288492324759, access_size = 140288492633344}}}}, function = 0x7ffcb3db2d90 "@6\333\263\374\177"}, StringFunctionSizeOverflow = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, addr_description = {data = {kind = 1941832715, {shadow = {addr = 0, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 0, alloc_tid = 0, free_tid = 11901354378792, alloc_stack_id = 1941832715, free_stack_id = 32007, chunk_access = {bad_addr = 11, offset = 137470960075776, chunk_begin = 752, chunk_size = 140723325984776, user_requested_alignment = 1824, access_type = 1, alloc_type = 0}}, stack = {addr = 0, tid = 0, offset = 11901354378792, frame_pc = 137470960075787, access_size = 11, frame_descr = 0x7d0773be0400 "\323\n"}, global = {addr = 0, static kMaxGlobals = 4, globals = {{beg = 0, size = 11901354378792, size_with_redzone = 137470960075787, name = 0xb <error: Cannot access memory at address 0xb>, module_name = 0x7d0773be0400 "\323\n", has_dynamic_init = 752, gcc_location = 0x7ffcb3db6008, odr_indicator = 135890393569056}, {beg = 140723325969872, size = 140288490941215, size_with_redzone = 1, name = 0x7b9772a31720 "@\201\305s\367{", module_name = 0x7ffcb3db2e20 "0.\333\263\374\177", has_dynamic_init = 140288491898322, gcc_location = 0x7f97743920d0, odr_indicator = 131866502704}, {beg = 140723325969920, size = 3, size_with_redzone = 140288491898384, name = 0x7f9774ef4b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", module_name = 0x55e7f6f9256b <bt_log_vprintf+171> "\205\300\017\210=\001", has_dynamic_init = 140723325972704, gcc_location = 0x7ffcb3db26c0, odr_indicator = 2}, {beg = 140288492613568, size = 136302729461872, size_with_redzone = 140723325970064, name = 0x7f9775ab8738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", module_name = 0x3e <error: Cannot access memory at address 0x3e>, has_dynamic_init = 136302729461872, gcc_location = 0x7f97743920d0, odr_indicator = 140723325970096}}, reg_sites = {1942323328, 31735, 81, 0}, access_size = 140723325972256, size = 69 'E'}, wild = {addr = 0, access_size = 0}}}}, size = 140723325974080}, BadParamsToAnnotateContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, beg = 137470960075787, end = 0, old_mid = 0, new_mid = 11901354378792}, BadParamsToAnnotateDoubleEndedContiguousContainer = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, storage_beg = 137470960075787, storage_end = 0, old_container_beg = 0, old_container_end = 11901354378792, new_container_beg = 137470960075787, new_container_end = 11}, BadParamsToCopyContiguousContainerAnnotations = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, stack = 0xffffffff00000002, old_storage_beg = 137470960075787, old_storage_end = 0, new_storage_beg = 0, new_storage_end = 11901354378792}, ODRViolation = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, global1 = {beg = 18446744069414584322, size = 137470960075787, size_with_redzone = 0, name = 0x0, module_name = 0xad300000628 <error: Cannot access memory at address 0xad300000628>, has_dynamic_init = 137470960075787, gcc_location = 0xb, odr_indicator = 137470960075776}, global2 = {beg = 752, size = 140723325984776, size_with_redzone = 135890393569056, name = 0x7ffcb3db25d0 " .\333\263\374\177", module_name = 0x7f9775ab2b1f <__asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*)+47> "H\205\300t\f\311\303f.\017\037\204", has_dynamic_init = 1, gcc_location = 0x7b9772a31720, odr_indicator = 140723325972000}, stack_id1 = 1975109074, stack_id2 = 32663}, InvalidPointerPair = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, pc = 18446744069414584322, bp = 137470960075787, sp = 0, addr1_description = {data = {kind = __asan::kAddressKindWild, {shadow = {addr = 11901354378792, kind = (__asan::kShadowKindGap | __asan::kShadowKindHigh | unknown: 0x8), shadow_byte = 4 '\004'}, heap = {addr = 11901354378792, alloc_tid = 137470960075787, free_tid = 11, alloc_stack_id = 1941832704, free_stack_id = 32007, chunk_access = {bad_addr = 752, offset = 140723325984776, chunk_begin = 135890393569056, chunk_size = 140723325969872, user_requested_alignment = 2847, access_type = 2, alloc_type = 0}}, stack = {addr = 11901354378792, tid = 137470960075787, offset = 11, frame_pc = 137470960075776, access_size = 752, frame_descr = 0x7ffcb3db6008 <error: Cannot access memory at address 0x7ffcb3db6008>}, global = {addr = 11901354378792, static kMaxGlobals = 4, globals = {{beg = 137470960075787, size = 11, size_with_redzone = 137470960075776, name = 0x2f0 <error: Cannot access memory at address 0x2f0>, module_name = 0x7ffcb3db6008 <error: Cannot access memory at address 0x7ffcb3db6008>, has_dynamic_init = 135890393569056, gcc_location = 0x7ffcb3db25d0, odr_indicator = 140288490941215}, {beg = 1, size = 135890393569056, size_with_redzone = 140723325972000, name = 0x7f9775b9c5d2 <___interceptor_malloc(__sanitizer::uptr)+130> "H\213U\350dH+\024%(", module_name = 0x7f97743920d0 "", has_dynamic_init = 131866502704, gcc_location = 0x7ffcb3db2600, odr_indicator = 3}, {beg = 140288491898384, size = 140288478628751, size_with_redzone = 94454769329515, name = 0x7ffcb3db30e0 "\2042\333\263\374\177", module_name = 0x7ffcb3db26c0 "\030", has_dynamic_init = 2, gcc_location = 0x7f9775c4afc0 <__asan::instance>, odr_indicator = 136302729461872}, {beg = 140723325970064, size = 140288490964792, size_with_redzone = 62, name = 0x7bf773c58070 "\003\021", module_name = 0x7f97743920d0 "", has_dynamic_init = 140723325970096, gcc_location = 0x7bf773c58080, odr_indicator = 81}}, reg_sites = {3017486112, 32764, 1974854725, 32663}, access_size = 140723325974080, size = 232 '\350'}, wild = {addr = 11901354378792, access_size = 137470960075787}}}}, addr2_description = {data = {kind = 6, {shadow = {addr = 140288492324759, kind = __asan::kShadowKindLow, shadow_byte = 253 '\375'}, heap = {addr = 140288492324759, alloc_tid = 140288492633344, free_tid = 140723325973632, alloc_stack_id = 1975109074, free_stack_id = 32663, chunk_access = {bad_addr = 8315162673665959470, offset = 130735371371, chunk_begin = 140723325971552, chunk_size = 3, user_requested_alignment = 1552, access_type = 0, alloc_type = 3}}, stack = {addr = 140288492324759, tid = 140288492633344, offset = 140723325973632, frame_pc = 140288491898322, access_size = 8315162673665959470, frame_descr = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>}, global = {addr = 140288492324759, static kMaxGlobals = 4, globals = {{beg = 140288492633344, size = 140723325973632, size_with_redzone = 140288491898322, name = 0x736564656572662e <error: Cannot access memory at address 0x736564656572662e>, module_name = 0x1e706f746b <error: Cannot access memory at address 0x1e706f746b>, has_dynamic_init = 140723325971552, gcc_location = 0x3, odr_indicator = 140288491898384}, {beg = 140288478628751, size = 94454769329515, size_with_redzone = 140723325974336, name = 0x7ffcb3db2ce0 "", module_name = 0x7f9775c44f78 "\001", has_dynamic_init = 140723325971744, gcc_location = 0x55e7f70d35a0, odr_indicator = 140288470583480}, {beg = 65535, size = 140723325971664, size_with_redzone = 140288491729753, name = 0x40 <error: Cannot access memory at address 0x40>, module_name = 0x7b9772c61e00 "\0166\340E", has_dynamic_init = 140723325971712, gcc_location = 0x7f9775abf74a <__asan_stack_malloc_0(__sanitizer::uptr)+234>, odr_indicator = 140723325971712}, {beg = 140288492154749, size = 140723325971744, size_with_redzone = 140288491998566, name = 0x7ffcb3db2da0 "", module_name = 0x2 <error: Cannot access memory at address 0x2>, has_dynamic_init = 140288492613568, gcc_location = 0x7bd773c4cf40, odr_indicator = 140723325971824}}, reg_sites = {1974175544, 32663, 40, 0}, access_size = 140288492104221, size = 208 '\320'}, wild = {addr = 140288492324759, access_size = 140288492633344}}}}}, Generic = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 137470960075787, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 137470960075787, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1576, free_stack_id = 2771, chunk_access = {bad_addr = 137470960075787, offset = 11, chunk_begin = 137470960075776, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 137470960075787, tid = 0, offset = 0, frame_pc = 11901354378792, access_size = 137470960075787, frame_descr = 0xb <error: Cannot access memory at address 0xb>}, global = {addr = 137470960075787, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 11901354378792, name = 0x7d0773be040b "B", module_name = 0xb <error: Cannot access memory at address 0xb>, has_dynamic_init = 137470960075776, gcc_location = 0x2f0, odr_indicator = 140723325984776}, {beg = 135890393569056, size = 140723325969872, size_with_redzone = 140288490941215, name = 0x1 <error: Cannot access memory at address 0x1>, module_name = 0x7b9772a31720 "@\201\305s\367{", has_dynamic_init = 140723325972000, gcc_location = 0x7f9775b9c5d2 <___interceptor_malloc(__sanitizer::uptr)+130>, odr_indicator = 140288466690256}, {beg = 131866502704, size = 140723325969920, size_with_redzone = 3, name = 0x7f9775b9c610 <___interceptor_malloc(__sanitizer::uptr)+192> "D\213\215\314\367\377\377E\205\311tTH\211m\330A\203\371\001t*E\017\276\3061\311H\211\352H\211\306H\215\275\320\367\377\377\350\"\004\001", module_name = 0x7f9774ef4b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", has_dynamic_init = 94454769329515, gcc_location = 0x7ffcb3db30e0, odr_indicator = 140723325970112}, {beg = 2, size = 140288492613568, size_with_redzone = 136302729461872, name = 0x7ffcb3db2690 "@6\333\263\374\177", module_name = 0x7f9775ab8738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", has_dynamic_init = 62, gcc_location = 0x7bf773c58070, odr_indicator = 140288466690256}}, reg_sites = {3017483952, 32764, 1942323328, 31735}, access_size = 81, size = 32 ' '}, wild = {addr = 137470960075787, access_size = 0}}}}, pc = 140288491643973, bp = 140723325974080, sp = 140723325971944, access_size = 6, bug_descr = 0x7f9775c04797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}}}, halt_on_error_ = true}
error = {<__asan::ErrorBase> = {scariness = {score = 48, descr = "6-byte-read-heap-use-after-free\000\374\177\000\000\002\000\000\000bluetoothd[9\000\030\203c%\222\242\332nal] org\020,\333\263\374\177\000\000\300!\333\263\374\177\000\000.l\370t\227\177\000\000\001\000\000\000\000\000\000\000=\000\000\000\000\000\000\000@*\333\263\374\177\000\000\211M\357t\227\177\000\000\374!\333\263\374\177\000\000\374!\333\263\374\177\000\000\374)\333\263\374\177\000\000N\000\000\000\000\000\000\000\006\000\000\000\227\177\000\000\002\000\000\000bluetoothd[90]: [signal] org.fre"...}, tid = 0}, addr_description = {data = {kind = __asan::kAddressKindHeap, {shadow = {addr = 137470960075787, kind = __asan::kShadowKindLow, shadow_byte = 0 '\000'}, heap = {addr = 137470960075787, alloc_tid = 0, free_tid = 0, alloc_stack_id = 1576, free_stack_id = 2771, chunk_access = {bad_addr = 137470960075787, offset = 11, chunk_begin = 137470960075776, chunk_size = 752, user_requested_alignment = 8, access_type = 2, alloc_type = 1}}, stack = {addr = 137470960075787, tid = 0, offset = 0, frame_pc = 11901354378792, access_size = 137470960075787, frame_descr = 0xb <error: Cannot access memory at address 0xb>}, global = {addr = 137470960075787, static kMaxGlobals = 4, globals = {{beg = 0, size = 0, size_with_redzone = 11901354378792, name = 0x7d0773be040b "B", module_name = 0xb <error: Cannot access memory at address 0xb>, has_dynamic_init = 137470960075776, gcc_location = 0x2f0, odr_indicator = 140723325984776}, {beg = 135890393569056, size = 140723325969872, size_with_redzone = 140288490941215, name = 0x1 <error: Cannot access memory at address 0x1>, module_name = 0x7b9772a31720 "@\201\305s\367{", has_dynamic_init = 140723325972000, gcc_location = 0x7f9775b9c5d2 <___interceptor_malloc(__sanitizer::uptr)+130>, odr_indicator = 140288466690256}, {beg = 131866502704, size = 140723325969920, size_with_redzone = 3, name = 0x7f9775b9c610 <___interceptor_malloc(__sanitizer::uptr)+192> "D\213\215\314\367\377\377E\205\311tTH\211m\330A\203\371\001t*E\017\276\3061\311H\211\352H\211\306H\215\275\320\367\377\377\350\"\004\001", module_name = 0x7f9774ef4b8f <__vasprintf_internal+255> "I\211\004$H\205\300t(H\213\265\330\376\377\377L\211\352H\211\307\350\366\032\371\377H\211\301\353\212\350\254\346\n", has_dynamic_init = 94454769329515, gcc_location = 0x7ffcb3db30e0, odr_indicator = 140723325970112}, {beg = 2, size = 140288492613568, size_with_redzone = 136302729461872, name = 0x7ffcb3db2690 "@6\333\263\374\177", module_name = 0x7f9775ab8738 <__sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, __asan::AsanChunk*, unsigned long)+248> "H\203;", has_dynamic_init = 62, gcc_location = 0x7bf773c58070, odr_indicator = 140288466690256}}, reg_sites = {3017483952, 32764, 1942323328, 31735}, access_size = 81, size = 32 ' '}, wild = {addr = 137470960075787, access_size = 0}}}}, pc = 140288491643973, bp = 140723325974080, sp = 140723325971944, access_size = 6, bug_descr = 0x7f9775c04797 "heap-use-after-free", is_write = false, shadow_val = 253 '\375'}
#9 0x00007f9775ba8f8d in __asan::ReportGenericError (pc=<optimized out>, bp=bp@entry=140723325974080, sp=sp@entry=140723325971944, addr=addr@entry=137470960075787, is_write=is_write@entry=false, access_size=access_size@entry=6, exp=<optimized out>, fatal=false) at ../../../../src/libsanitizer/asan/asan_report.cpp:536
in_report = <optimized out>
error = <optimized out>
enable_fp = <optimized out>
#10 0x00007f9775b5e468 in MemcmpInterceptorCommon (ctx=ctx@entry=0x7ffcb3db3650, real_fn=<optimized out>, a1=a1@entry=0x7d0773be040b, a2=a2@entry=0x7b977298de60, size=size@entry=6) at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:848
bp = 140723325974080
pc = <optimized out>
local_stack = 137127362691136
sp = 140723325971944
_ctx = 0x7ffcb3db3650
suppressed = <optimized out>
__offset = 137470960075787
__size = 6
__bad = <optimized out>
result = <optimized out>
#11 0x00007f9775b5e835 in ___interceptor_memcmp (a1=0x7d0773be040b, a2=0x7b977298de60, size=6) at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:880
ctx = 0x7ffcb3db3650
_ctx = {interceptor_name = 0x7f9775c086b6 "memcmp"}
#12 ___interceptor_memcmp (a1=0x7d0773be040b, a2=0x7b977298de60, size=6) at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:875
ctx = <optimized out>
_ctx = <optimized out>
#13 0x000055e7f6e76038 in bacmp (ba1=0x7d0773be040b, ba2=0x7b977298de60) at ./lib/bluetooth/bluetooth.h:438
No locals.
#14 device_addr_type_cmp (a=0x7d0773be0400, b=0x7b977298de60) at src/device.c:5657
dev = 0x7d0773be0400
addr = 0x7b977298de60
cmp = <optimized out>
#15 0x00007f97758d84c2 in g_slist_find_custom () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#16 0x000055e7f6df56f4 in btd_adapter_find_device (adapter=<optimized out>, dst=dst@entry=0x7bd773c23958, bdaddr_type=1 '\001') at src/adapter.c:1055
addr = <optimized out>
device = <optimized out>
list = <optimized out>
#17 0x000055e7f6d97c07 in att_disconnected (err=<optimized out>, user_data=0x7bd773c23950) at src/gatt-database.c:335
state = 0x7bd773c23950
device = <optimized out>
__func__ = "att_disconnected"
#18 0x000055e7f6daeb34 in btd_gatt_database_att_disconnected (database=<optimized out>, device=<optimized out>) at src/gatt-database.c:4238
server = <optimized out>
att = <optimized out>
state = <optimized out>
addr = <optimized out>
type = <optimized out>
__func__ = "btd_gatt_database_att_disconnected"
#19 0x000055e7f6e580e6 in gatt_server_cleanup (device=device@entry=0x7d0773be0080) at src/device.c:842
No locals.
#20 0x000055e7f6e6c7dc in attio_cleanup (device=0x7d0773be0080) at src/device.c:862
No locals.
#21 0x000055e7f6e6ce27 in device_free (user_data=0x7d0773be0080) at src/device.c:918
device = 0x7d0773be0080
__func__ = "device_free"
#22 0x000055e7f6eeaa3a in remove_interface (data=0x7c0773beac80, name=name@entry=0x55e7f70f7a60 "org.bluez.Device1") at gdbus/object.c:742
iface = 0x7bf773bfe560
#23 0x000055e7f6eed5fc in g_dbus_unregister_interface (connection=<optimized out>, path=<optimized out>, name=<optimized out>) at gdbus/object.c:1499
data = <optimized out>
#24 0x000055e7f6e281b3 in adapter_remove (adapter=adapter@entry=0x7cc773be0200) at src/adapter.c:7307
l = 0x7bb773c0b2f0 = {0x7d0773be0080}
db = <optimized out>
ranging_manager = <optimized out>
__func__ = "adapter_remove"
#25 0x000055e7f6e28d48 in adapter_cleanup () at src/adapter.c:11263
adapter = 0x7cc773be0200
#26 0x000055e7f6bda2f0 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:1723
context = <optimized out>
err = <optimized out>
sdp_mtu = 0
sdp_flags = <optimized out>
gdbus_flags = <optimized out>
__func__ = "main""https://github.com/bluez/bluez/pull/2549
---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz
maintainerPATCH v2 2/9 monitor/l2cap: Report the channel latency deviation
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
The channel latency is reported as a range and a moving average, while the two latency lines either side of it also report the standard deviation, which is what tells a channel that is consistently slow apart from one that is unstable.
Report it here as well, so that all three read the same way:
Channel Latency: 108 msec (48-108 msec ~79 msec +/- 27 msec)
--- monitor/analyze.c | 2 -- 1 file changed, 2 deletions(-)
monitor/analyze.c +0 -2
@@ -298,8 +298,6 @@ static void chan_destroy(void *data)print_stats (&chan->tx,"TX" ); done: -queue_destroy (chan->rx.plot, free); -queue_destroy (chan->tx.plot, free);free (chan); }
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 3/9 monitor/analyze: Drop a trailing space before a newline
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
The count of control messages is printed with a space between the text and the newline, which puts a stray character at the end of the line.
--- monitor/analyze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
monitor/analyze.c +1 -1
@@ -500,7 +500,7 @@ static void dev_destroy(void *data)printf (" %lu vendor diagnostics\n" , dev->vendor_diag);printf (" %lu system notes\n" , dev->system_note);printf (" %lu user logs\n" , dev->user_log); -printf (" %lu control messages \n" , dev->ctrl_msg); +printf (" %lu control messages\n" , dev->ctrl_msg);printf (" %lu unknown opcodes\n" , dev->unknown);if (dev->num_cmd_rsp)
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 4/9 monitor: Route the decoding output through a single function
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
The decoding output is written straight to stdout, partly through the print_indent() macro and partly through some 167 direct printf() calls, several of which build a single line across multiple calls. There is no point at which the output of a frame can be observed as a whole.
Send all of it through display_printf(), which writes to a redirectable stream, so that a caller can capture a frame and decide what to do with it rather than having it go straight to the terminal. Capturing at the stream level keeps the partially built lines working without having to find and restructure them.
This is a pure redirection and the output is unchanged. The messages jlink emits while connecting are left alone, as they are not part of the decoding.
l2test uses the printing helpers from the header without linking the monitor, so it gains its own display_printf() next to the use_color() it already defines for the same reason.
--- monitor/analyze.c | 47 +++++++------- monitor/avctp.c | 68 ++++++++++---------- monitor/control.c | 161 +++++++++++++++++++++++++--------------------- monitor/display.c | 20 ++++++ monitor/display.h | 11 +++- monitor/l2cap.c | 35 +++++----- monitor/lmp.c | 4 +- monitor/main.c | 12 ++-- monitor/packet.c | 19 +++--- monitor/rfcomm.c | 6 +- tools/l2test.c | 10 +++ 11 files changed, 225 insertions(+), 168 deletions(-)
monitor/analyze.c +25 -22
@@ -277,11 +277,11 @@ static void chan_destroy(void *data) fixed =fixed_channel_name (chan->cid);if (fixed) -printf (" Found %s L2CAP channel with CID %u (%s)\n" , +display_printf (" Found %s L2CAP channel with CID %u (%s)\n" , chan->out ?"TX" :"RX" , chan->cid, fixed);else -printf (" Found %s L2CAP channel with CID %u\n" , +display_printf (" Found %s L2CAP channel with CID %u\n" , chan->out ?"TX" :"RX" , chan->cid);if (chan->psm)
@@ -298,6 +298,8 @@ static void chan_destroy(void *data)print_stats (&chan->tx,"TX" ); done: +queue_destroy (chan->rx.plot, free); +queue_destroy (chan->tx.plot, free);free (chan); }
@@ -370,7 +372,8 @@ static void conn_destroy(void *data)break ; } -printf (" Found %s connection with handle %u\n" , str, conn->handle); +display_printf (" Found %s connection with handle %u\n" , str, + conn->handle);packet_print_addr ("Address" , conn->bdaddr, conn->bdaddr_type);if (!conn->setup_seen)print_field ("Connection setup missing" );
@@ -482,29 +485,29 @@ static void dev_destroy(void *data)break ; } -printf ("Found %s controller with index %u\n" , str, dev->index); -printf (" BD_ADDR %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X" , +display_printf ("Found %s controller with index %u\n" , str, dev->index); +display_printf (" BD_ADDR %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X" , dev->bdaddr[5 ], dev->bdaddr[4 ], dev->bdaddr[3 ], dev->bdaddr[2 ], dev->bdaddr[1 ], dev->bdaddr[0 ]);if (dev->manufacturer !=0xffff ) -printf (" (%s)" ,bt_compidtostr (dev->manufacturer)); -printf ("\n" ); +display_printf (" (%s)" ,bt_compidtostr (dev->manufacturer)); +display_printf ("\n" ); -printf (" %lu commands\n" , dev->num_cmd); -printf (" %lu events\n" , dev->num_evt); -printf (" %lu ACL packets\n" , dev->num_acl); -printf (" %lu SCO packets\n" , dev->num_sco); -printf (" %lu ISO packets\n" , dev->num_iso); -printf (" %lu vendor packets\n" , dev->num_vendor); -printf (" %lu vendor diagnostics\n" , dev->vendor_diag); -printf (" %lu system notes\n" , dev->system_note); -printf (" %lu user logs\n" , dev->user_log); -printf (" %lu control messages\n" , dev->ctrl_msg); -printf (" %lu unknown opcodes\n" , dev->unknown); +display_printf (" %lu commands\n" , dev->num_cmd); +display_printf (" %lu events\n" , dev->num_evt); +display_printf (" %lu ACL packets\n" , dev->num_acl); +display_printf (" %lu SCO packets\n" , dev->num_sco); +display_printf (" %lu ISO packets\n" , dev->num_iso); +display_printf (" %lu vendor packets\n" , dev->num_vendor); +display_printf (" %lu vendor diagnostics\n" , dev->vendor_diag); +display_printf (" %lu system notes\n" , dev->system_note); +display_printf (" %lu user logs\n" , dev->user_log); +display_printf (" %lu control messages\n" , dev->ctrl_msg); +display_printf (" %lu unknown opcodes\n" , dev->unknown);if (dev->num_cmd_rsp) - printf(" Command latency: %lld-%lld msec " + display_printf(" Command latency: %lld-%lld msec " "(~%lld msec +/- %lld msec)\n", TV_MSEC(dev->cmd_latency.min), TV_MSEC(dev->cmd_latency.max),
@@ -513,12 +516,12 @@ static void dev_destroy(void *data)/* Whatever is left never got a Command Complete or Command Status */ if (!queue_isempty (dev->cmd_list)) -printf (" Commands without response: %u\n" , +display_printf (" Commands without response: %u\n" ,queue_length (dev->cmd_list));queue_destroy (dev->cmd_list, free);queue_destroy (dev->conn_list, conn_destroy); -printf ("\n" ); +display_printf ("\n" );free (dev); }
@@ -1639,7 +1642,7 @@ void analyze_trace(const char *path) num_packets++; } -printf ("Trace contains %lu packets\n\n" , num_packets); +display_printf ("Trace contains %lu packets\n\n" , num_packets);queue_destroy (dev_list, dev_destroy);
monitor/avctp.c +34 -34
213 lines not on this page · raw message
monitor/control.c +87 -74
543 lines not on this page · raw message
monitor/display.c +20 -0
@@ -15,6 +15,7 @@#define _GNU_SOURCE#include <stdio.h> +#include <stdarg.h> #include <errno.h> #include <unistd.h> #include <stdlib.h>
@@ -28,6 +29,25 @@#include "display.h" static pid_t pager_pid =0 ; +static FILE *display_out; + +/* +* Redirect the decoding output, so that a caller can capture a frame and +* decide what to do with it. Passing NULL restores the normal output. +*/ +void display_set_output (FILE *fp) +{ + display_out = fp; +} + +void display_printf (const char *fmt, ...) +{ +va_list ap; + +va_start (ap, fmt); +vfprintf (display_out ? display_out : stdout, fmt, ap); +va_end (ap); +}int default_pager_num_columns =FALLBACK_TERMINAL_WIDTH ;enum monitor_color setting_monitor_color =COLOR_AUTO ;
monitor/display.h +10 -1
@@ -12,9 +12,18 @@#include <stdbool.h> #include <inttypes.h> #include <ctype.h> +#include <stdio.h> bool use_color (void ); +/* +* All decoding output goes through here so that it can be captured, for +* example to match a whole frame against a query before showing it. +*/ +void display_printf (const char *fmt, ...) + __attribute__((format (printf,1 ,2 ))); +void display_set_output (FILE *fp); +enum monitor_color {COLOR_AUTO ,COLOR_ALWAYS ,COLOR_NEVER };void set_monitor_color (enum monitor_color );
@@ -44,7 +53,7 @@ void set_monitor_color(enum monitor_color); #define print_indent(indent, color1, prefix, title, color2, fmt, args...) \ do { \ - printf("%*c%s%s%s%s" fmt "%s\n", (indent), ' ', \ + display_printf("%*c%s%s%s%s" fmt "%s\n", (indent), ' ', \ use_color() ? (color1) : "", prefix, title, \ use_color() ? (color2) : "", ## args, \ use_color() ? COLOR_OFF : ""); \
monitor/l2cap.c +18 -17
@@ -443,73 +443,74 @@ static char *mode2str(uint8_t mode)static void l2cap_ctrl_ext_parse (struct l2cap_frame *frame,uint32_t ctrl) { -printf (" %s:" , +display_printf (" %s:" , ctrl &L2CAP_EXT_CTRL_FRAME_TYPE ?"S-frame" :"I-frame" );if (ctrl &L2CAP_EXT_CTRL_FRAME_TYPE ) { -printf (" %s" , +display_printf (" %s" ,supervisory2str ((ctrl &L2CAP_EXT_CTRL_SUPERVISE_MASK ) >>L2CAP_EXT_CTRL_SUPER_SHIFT ));if (ctrl &L2CAP_EXT_CTRL_POLL ) -printf (" P-bit" ); +display_printf (" P-bit" ); }else {uint8_t sar = (ctrl &L2CAP_EXT_CTRL_SAR_MASK ) >>L2CAP_EXT_CTRL_SAR_SHIFT ; -printf (" %s" ,sar2str (sar)); +display_printf (" %s" ,sar2str (sar));if (sar ==L2CAP_SAR_START ) {uint16_t len;if (!l2cap_frame_get_le16 (frame, &len))return ; -printf (" (len %d)" , len); +display_printf (" (len %d)" , len); } -printf (" TxSeq %d" , (ctrl &L2CAP_EXT_CTRL_TXSEQ_MASK ) >> +display_printf (" TxSeq %d" , + (ctrl &L2CAP_EXT_CTRL_TXSEQ_MASK ) >>L2CAP_EXT_CTRL_TXSEQ_SHIFT ); } -printf (" ReqSeq %d" , (ctrl &L2CAP_EXT_CTRL_REQSEQ_MASK ) >> +display_printf (" ReqSeq %d" , (ctrl &L2CAP_EXT_CTRL_REQSEQ_MASK ) >>L2CAP_EXT_CTRL_REQSEQ_SHIFT );if (ctrl &L2CAP_EXT_CTRL_FINAL ) -printf (" F-bit" ); +display_printf (" F-bit" ); }static void l2cap_ctrl_parse (struct l2cap_frame *frame,uint32_t ctrl) { -printf (" %s:" , +display_printf (" %s:" , ctrl &L2CAP_CTRL_FRAME_TYPE ?"S-frame" :"I-frame" );if (ctrl &0x01 ) { -printf (" %s" , +display_printf (" %s" ,supervisory2str ((ctrl &L2CAP_CTRL_SUPERVISE_MASK ) >>L2CAP_CTRL_SUPER_SHIFT ));if (ctrl &L2CAP_CTRL_POLL ) -printf (" P-bit" ); +display_printf (" P-bit" ); }else {uint8_t sar; sar = (ctrl &L2CAP_CTRL_SAR_MASK ) >>L2CAP_CTRL_SAR_SHIFT ; -printf (" %s" ,sar2str (sar)); +display_printf (" %s" ,sar2str (sar));if (sar ==L2CAP_SAR_START ) {uint16_t len;if (!l2cap_frame_get_le16 (frame, &len))return ; -printf (" (len %d)" , len); +display_printf (" (len %d)" , len); } -printf (" TxSeq %d" , (ctrl &L2CAP_CTRL_TXSEQ_MASK ) >> +display_printf (" TxSeq %d" , (ctrl &L2CAP_CTRL_TXSEQ_MASK ) >>L2CAP_CTRL_TXSEQ_SHIFT ); } -printf (" ReqSeq %d" , (ctrl &L2CAP_CTRL_REQSEQ_MASK ) >> +display_printf (" ReqSeq %d" , (ctrl &L2CAP_CTRL_REQSEQ_MASK ) >>L2CAP_CTRL_REQSEQ_SHIFT );if (ctrl &L2CAP_CTRL_FINAL ) -printf (" F-bit" ); +display_printf (" F-bit" ); }#define MAX_INDEX 16
@@ -2732,7 +2733,7 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid,l2cap_ctrl_parse (&frame, ctrl16); } -printf ("\n" ); +display_printf ("\n" );break ; }
monitor/lmp.c +2 -2
@@ -913,12 +913,12 @@ void lmp_todo(void) {int i; -printf ("LMP operations with missing decodings:\n" ); +display_printf ("LMP operations with missing decodings:\n" );for (i =0 ; lmp_table[i].str; i++) {if (lmp_table[i].func)continue ; -printf ("\t%s\n" , lmp_table[i].str); +display_printf ("\t%s\n" , lmp_table[i].str); } }
monitor/main.c +6 -6
@@ -44,10 +44,10 @@ static void signal_callback(int signum, void *user_data)static void usage (void ) { -printf ("btmon - Bluetooth monitor\n" +display_printf ("btmon - Bluetooth monitor\n" "Usage:\n" ); -printf ("\tbtmon [options]\n" ); -printf ("options:\n" +display_printf ("\tbtmon [options]\n" ); +display_printf ("options:\n" "\t-r, --read <file> Read traces in btsnoop format\n" "\t-w, --write <file> Save traces in btsnoop format\n" "\t-a, --analyze <file> Analyze traces in btsnoop format\n"
@@ -244,7 +244,7 @@ int main(int argc, char *argv[])lmp_todo ();return EXIT_SUCCESS ;case 'v' : -printf ("%s\n" ,VERSION ); +display_printf ("%s\n" ,VERSION );return EXIT_SUCCESS ;case 'h' :usage ();
@@ -264,7 +264,7 @@ int main(int argc, char *argv[])return EXIT_FAILURE ; } -printf ("Bluetooth monitor ver %s\n" ,VERSION ); +display_printf ("Bluetooth monitor ver %s\n" ,VERSION );keys_setup ();
@@ -284,7 +284,7 @@ int main(int argc, char *argv[]) }if (writer_path && !control_writer (writer_path)) { -printf ("Failed to open '%s'\n" , writer_path); +display_printf ("Failed to open '%s'\n" , writer_path);return EXIT_FAILURE ; }
monitor/packet.c +10 -9
@@ -709,7 +709,7 @@ void packet_select_index(uint16_t index) index_filter = true; } -#define print_space (x) printf("%*c", (x), ' '); +#define print_space (x) display_printf("%*c", (x), ' ')void packet_set_fallback_manufacturer (uint16_t manufacturer) {
@@ -919,12 +919,13 @@ static void print_packet(struct timeval *tv, struct ucred *cred, char ident, }if (ts_len >0 ) { -printf ("%s" , line); +display_printf ("%s" , line);if (len < col)print_space (col - len - ts_len -1 ); -printf ("%s%s\n" ,use_color () ?COLOR_TIMESTAMP :"" , ts_str); +display_printf ("%s%s\n" ,use_color () ?COLOR_TIMESTAMP :"" , + ts_str); }else -printf ("%s\n" , line); +display_printf ("%s\n" , line); } static const struct {
@@ -18654,7 +18655,7 @@ void packet_todo(void) {int i; -printf ("HCI commands with missing decodings:\n" ); +display_printf ("HCI commands with missing decodings:\n" );for (i =0 ; opcode_table[i].str; i++) {if (opcode_table[i].bit <0 )
@@ -18663,22 +18664,22 @@ void packet_todo(void)if (opcode_table[i].cmd_func)continue ; -printf ("\t%s\n" , opcode_table[i].str); +display_printf ("\t%s\n" , opcode_table[i].str); } -printf ("HCI events with missing decodings:\n" ); +display_printf ("HCI events with missing decodings:\n" );for (i =0 ; event_table[i].str; i++) {if (event_table[i].func)continue ; -printf ("\t%s\n" , event_table[i].str); +display_printf ("\t%s\n" , event_table[i].str); }for (i =0 ; le_meta_event_table[i].str; i++) {if (le_meta_event_table[i].func)continue ; -printf ("\t%s\n" , le_meta_event_table[i].str); +display_printf ("\t%s\n" , le_meta_event_table[i].str); } }
monitor/rfcomm.c +3 -3
@@ -139,15 +139,15 @@ static inline bool mcc_test(struct rfcomm_frame *rfcomm_frame, uint8_t indent)struct l2cap_frame *frame = &rfcomm_frame->l2cap_frame;uint8_t data; -printf ("%*cTest Data: 0x " , indent,' ' ); +display_printf ("%*cTest Data: 0x " , indent,' ' );while (frame->size >1 ) {if (!l2cap_frame_get_u8 (frame, &data))return false; -printf ("%2.2x " , data); +display_printf ("%2.2x " , data); } -printf ("\n" ); +display_printf ("\n" );return true; }
tools/l2test.c +10 -0
@@ -16,6 +16,7 @@#define _GNU_SOURCE#include <stdio.h> +#include <stdarg.h> #include <stdbool.h> #include <errno.h> #include <ctype.h>
@@ -334,6 +335,15 @@ bool use_color(void)return false; } +void display_printf (const char *fmt, ...) +{ +va_list ap; + +va_start (ap, fmt); +vprintf (fmt, ap); +va_end (ap); +} +static const struct bitfield_data phy_table[] = { {0 ,"BR1M1SLOT" }, {1 ,"BR1M3SLOT" },
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 5/9 monitor: Separate the frames for a pager reading records
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
A frame spans several lines, so a pager that works on records rather than lines has no way of telling where one ends. Feeding a trace to fzf with --read0 makes the whole of it a single entry, and without --read0 each line becomes an entry of its own, so searching finds the line reporting an error without the header saying which controller, handle and time it belongs to.
Separate the frames with a NUL when the pager is going to read records, which is asked for either by --print0 or by --read0 already being in PAGER:
$ PAGER='fzf --read0' btmon -r hcidump.log $ btmon -r hcidump.log --print0 | fzf --read0
Nothing is separated unless it was asked for, so the output is unchanged for a pager reading lines, which would otherwise show the separator as a stray character between the frames.
--- Makefile.tools | 1 + monitor/control.c | 15 ++++++ monitor/find.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++ monitor/find.h | 19 +++++++ monitor/main.c | 15 +++++- 5 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 monitor/find.c create mode 100644 monitor/find.h
Makefile.tools +1 -0
@@ -58,6 +58,7 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \ monitor/jlink.h monitor/jlink.c \ monitor/tty.h monitor/emulator.h \ monitor/att.h monitor/att.c \ + monitor/find.h monitor/find.c \ src/log.h src/log.c \ src/textfile.h src/textfile.c \ src/settings.h src/settings.c
monitor/control.c +15 -0
@@ -39,6 +39,7 @@#include "src/shared/mainloop.h" #include "display.h" +#include "find.h" #include "packet.h" #include "hcidump.h" #include "ellisys.h"
@@ -973,8 +974,10 @@ static void data_callback(int fd, uint32_t events, void *user_data)switch (data->channel) {case HCI_CHANNEL_CONTROL : +find_frame_begin ();packet_control (tv, cred, index, opcode, data->buf, pktlen); +find_frame_end ();break ;case HCI_CHANNEL_MONITOR :if (pktlen > (len -MGMT_HDR_SIZE ))
@@ -984,8 +987,10 @@ static void data_callback(int fd, uint32_t events, void *user_data) data->buf, pktlen);ellisys_inject_hci (tv, index, opcode, data->buf, pktlen); +find_frame_begin ();packet_monitor (tv, cred, index, opcode, data->buf, pktlen); +find_frame_end ();break ; } }
@@ -1131,8 +1136,10 @@ static void kmsg_callback(int fd, uint32_t events, void *user_data)btsnoop_write_hci (btsnoop_file, &tv,HCI_DEV_NONE ,BTSNOOP_OPCODE_SYSTEM_NOTE ,0 , msg, len); +find_frame_begin ();packet_monitor (&tv,NULL ,HCI_DEV_NONE ,BTSNOOP_OPCODE_SYSTEM_NOTE , msg, len); +find_frame_end (); }static int open_kmsg (void )
@@ -1179,8 +1186,10 @@ static void client_callback(int fd, uint32_t events, void *user_data) opcode =le16_to_cpu (hdr->opcode); index =le16_to_cpu (hdr->index); +find_frame_begin ();packet_monitor (NULL ,NULL , index, opcode, data->buf +MGMT_HDR_SIZE , pktlen); +find_frame_end (); data->offset -= pktlen +MGMT_HDR_SIZE ;
@@ -1399,8 +1408,10 @@ static void process_data(struct control_data *data) hdr->ext_hdr + hdr->hdr_len, pktlen);ellisys_inject_hci (tv,0 , opcode, hdr->ext_hdr + hdr->hdr_len, pktlen); +find_frame_begin ();packet_monitor (tv,NULL ,0 , opcode, hdr->ext_hdr + hdr->hdr_len, pktlen); +find_frame_end (); data->offset -=2 + data_len;
@@ -1586,7 +1597,9 @@ void control_reader(const char *path, bool pager)if (opcode ==0xffff )continue ; +find_frame_begin ();packet_monitor (&tv,NULL , index, opcode, buf, pktlen); +find_frame_end ();ellisys_inject_hci (&tv, index, opcode, buf, pktlen); }break ;
@@ -1599,7 +1612,9 @@ void control_reader(const char *path, bool pager) buf, &pktlen))break ; +find_frame_begin ();packet_simulator (&tv, frequency, buf, pktlen); +find_frame_end (); }break ; }
monitor/find.c new file +128 -0
128 lines not on this page · raw message
monitor/find.h new file +19 -0
@@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2026 Intel Corporation +* +* +*/ + +#include <stdbool.h> + +void find_set_print0 (void ); +void find_setup (void ); + +void find_frame_begin (void ); +void find_frame_end (void ); + +void find_cleanup (void );
monitor/main.c +14 -1
@@ -31,6 +31,7 @@#include "ellisys.h" #include "control.h" #include "display.h" +#include "find.h" static void signal_callback (int signum,void *user_data) {
@@ -69,6 +70,8 @@ static void usage(void)"\t-I, --iso Dump ISO traffic\n" "\t-E, --ellisys [ip] Send Ellisys HCI Injection\n" "\t-P, --no-pager Disable pager usage\n" +"\t-0, --print0 Separate frames with a NUL, for a\n" +"\t pager reading records\n" "\t-J --jlink <device>,[<serialno>],[<interface>],[<speed>]\n" "\t Read data from RTT\n" "\t-R --rtt [<address>],[<area>],[<name>]\n"
@@ -98,6 +101,7 @@ static const struct option main_options[] = { { "iso", no_argument, NULL, 'I' }, { "ellisys", required_argument, NULL, 'E' }, { "no-pager", no_argument, NULL, 'P' }, + { "print0", no_argument, NULL, '0' }, { "jlink", required_argument, NULL, 'J' }, { "rtt", required_argument, NULL, 'R' }, { "columns", required_argument, NULL, 'C' },
@@ -133,7 +137,7 @@ int main(int argc, char *argv[])struct sockaddr_un addr; opt =getopt_long (argc, argv, -"r:w:a:s:p:i:d:B:V:MKNtTSAIE:PJ:R:C:c:vh" , +"r:w:a:s:p:i:d:B:V:MKNtTSAIE:P0J:R:C:c:vh" , main_options,NULL );if (opt <0 )break ;
@@ -217,6 +221,9 @@ int main(int argc, char *argv[])case 'P' : use_pager = false;break ; +case '0' : +find_set_print0 (); +break ;case 'J' : jlink = optarg;break ;
@@ -279,6 +286,8 @@ int main(int argc, char *argv[])if (ellisys_server)ellisys_enable (ellisys_server, ellisys_port); +find_setup (); +control_reader (reader_path, use_pager);return EXIT_SUCCESS ; }
@@ -300,8 +309,12 @@ int main(int argc, char *argv[])if (jlink &&control_rtt (jlink, rtt) <0 )return EXIT_FAILURE ; +find_setup (); + exit_status =mainloop_run_with_signal (signal_callback,NULL ); +find_cleanup (); +keys_cleanup ();return exit_status;
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 6/9 monitor: Hand the captured frames to the pager on Ctrl-R
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
Looking for something in a running capture means stopping it and reading back the log, losing whatever would have arrived meanwhile, or scrolling the terminal by hand while the trace keeps moving.
Collect the frames as they are printed and hand them to the pager on Ctrl-R, in the manner of the shell. The capture keeps running underneath, and closing the pager returns to it, printing whatever arrived while it was up so that the trace on the terminal has no gap.
The capture is never paused for this. Anything not read in time is dropped by the kernel, so the pager runs on its own and is only checked for having closed, rather than being waited for.
The frames are handed over as a file rather than through a pipe, so that filling it cannot block the monitor and cost the capture any packets, separated as they are elsewhere when the pager is going to read records.
Frames are only collected when the output is a terminal, so a capture that is piped or redirected behaves exactly as it always has. The terminal is switched to reading keys as they are typed, but signals are left enabled so that Ctrl-C still interrupts the capture as before.
A capture runs for as long as it is left running, so the frames are held in a ring and the oldest are dropped once it is full.
--- monitor/find.c | 520 +++++++++++++++++++++++++++++++++++++++++++------ monitor/find.h | 2 +- monitor/main.c | 5 +- 3 files changed, 463 insertions(+), 64 deletions(-)
monitor/find.c +459 -61
@@ -17,19 +17,434 @@#include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include <termios.h> +#include <signal.h> +#include <sys/epoll.h> +#include <sys/mman.h> +#include <sys/wait.h> +#include <sys/prctl.h> +#include "src/shared/mainloop.h" +#include "src/shared/util.h" #include "monitor/display.h" #include "monitor/find.h" +/* +* A capture runs for as long as it is left running, so the oldest frames +* are dropped once this many are held rather than letting the monitor be +* killed for using too much memory. +*/ +#define FIND_MAX_FRAMES 200000 + +/* How often the pager is checked for having been closed */ +#define FIND_POLL_MSEC 100 + +struct find_frame { +char *text; +size_t len; +uint64_t seq; +}; + +/* +* The frames are held in a ring, so that the oldest can be dropped once it +* is full without having to move the rest. +*/ +static struct find_frame *frames; +static unsigned int num_frames;/* Held right now */ +static unsigned int max_frames;/* Allocated */ +static unsigned int first_frame;/* Oldest, within the ring */ +static uint64_t next_seq; +static bool enabled; +static bool store;/* Keep the frames for handing to the pager */ static bool records;/* Separate the frames with a NUL */ static bool printed;/* Something has been written out already */ static bool print0; +static bool raw_mode; +static int poll_id =-1 ; +static struct termios saved_term; + +static pid_t pager_pid; +static int saved_stdout =-1 ; +static uint64_t pager_seq;/* Frames from here are yet to be printed */ static char *capture_buf;static size_t capture_len;static FILE *capture; +static struct find_frame *frame_at (unsigned int n) +{ +return &frames[(first_frame + n) % max_frames]; +} + +static void frame_free (struct find_frame *frame) +{ +free (frame->text); +memset (frame,0 ,sizeof (*frame)); +} + +/* Make room for one more frame, dropping the oldest once the ring is full */ +static struct find_frame *frame_next (void ) +{ +struct find_frame *frame; + +if (num_frames ==FIND_MAX_FRAMES ) { + frame = &frames[first_frame]; +frame_free (frame); + first_frame = (first_frame +1 ) % max_frames; +return frame; + } + +if (num_frames == max_frames) { +unsigned int size = max_frames ? max_frames *2 :1024 ; +void *tmp; + +if (size >FIND_MAX_FRAMES ) + size =FIND_MAX_FRAMES ; + + tmp =realloc (frames, size *sizeof (*frames)); +if (!tmp) +return NULL ; + + frames = tmp; + max_frames = size; + } + + frame = &frames[(first_frame + num_frames) % max_frames]; + num_frames++; + +return frame; +} + +void find_frame_begin (void ) +{ +if (!enabled) +return ; + + capture_buf =NULL ; + capture_len =0 ; + + capture =open_memstream (&capture_buf, &capture_len); +if (!capture) +return ; + +display_set_output (capture); +} + +void find_frame_end (void ) +{ +struct find_frame *frame; + +if (!enabled || !capture) +return ; + +display_set_output (NULL ); +fclose (capture); + capture =NULL ; + +/* A frame that was filtered out produces no output */ +if (!capture_len) { +free (capture_buf); + capture_buf =NULL ; +return ; + } + +/* +* Keep the trace on the terminal while the pager is not up. What +* arrives while it is up is printed once it closes, so that the +* trace on the terminal has no gap. +*/ +if (!pager_pid) { +const char nul ='\0' ; +size_t len = capture_len; + +/* +* Only what is read as records is written as records. While +* capturing this is the trace on the terminal, which keeps +* its newlines or the next frame carries on the same line. +* The pager is given its own copy. +*/ +if (records && !store) { +/* +* The newline ending the frame is what separates +* the lines within it, so leave it out of a record +* or it shows as a blank line at the end of the +* entry. +*/ +if (len && capture_buf[len -1 ] =='\n' ) + len--; + +if (printed) +fwrite (&nul,1 ,1 , stdout); + } + +fwrite (capture_buf,1 , len, stdout); +fflush (stdout); + printed = true; + } + +if (!store) { +free (capture_buf); + capture_buf =NULL ; +return ; + } + + frame =frame_next (); +if (!frame) { +free (capture_buf); + capture_buf =NULL ; +return ; + } + + frame->text = capture_buf; + frame->len = capture_len; + frame->seq = next_seq++; + capture_buf =NULL ; +} + +static void term_restore (void ); + +/* +* Leaving the terminal not echoing what is typed would make the shell +* unusable, so put it back however the monitor happens to be leaving. +* tcsetattr() may be called from a signal handler. +*/ +static void fatal_signal (int sig) +{ +term_restore (); + +signal (sig,SIG_DFL ); +raise (sig); +} + +static void term_hooks (void ) +{ +static const int fatal[] = {SIGSEGV ,SIGBUS ,SIGABRT ,SIGQUIT , +SIGHUP }; +struct sigaction sa; +unsigned int i; + +atexit (term_restore); + +memset (&sa,0 ,sizeof (sa)); + sa.sa_handler = fatal_signal; + sa.sa_flags =SA_RESETHAND ; + +for (i =0 ; i <ARRAY_SIZE (fatal); i++) +sigaction (fatal[i], &sa,NULL ); +} + +/* +* Read the keys as they are typed rather than a line at a time. Signals are +* left enabled so that Ctrl-C still interrupts the capture as it always has. +*/ +static void term_raw (void ) +{ +struct termios term; + +if (raw_mode) +return ; + +if (tcgetattr (STDIN_FILENO , &saved_term) <0 ) +return ; + + term = saved_term; + term.c_lflag &= ~(ICANON |ECHO ); + term.c_cc[VMIN ] =1 ; + term.c_cc[VTIME ] =0 ; + +if (tcsetattr (STDIN_FILENO ,TCSANOW , &term) <0 ) +return ; + + raw_mode = true; + +term_hooks (); +} + +static void term_restore (void ) +{ +if (!raw_mode) +return ; + +tcsetattr (STDIN_FILENO ,TCSANOW , &saved_term); + raw_mode = false; +} + +/* +* Hand the frames over as a file rather than through a pipe, so that +* filling it cannot block the monitor and cost the capture any packets. +* They are separated by a NUL so that a pager able to take records, such +* as fzf with --read0, sees a whole frame as one entry instead of matching +* the individual lines within it. +*/ +static int frames_to_file (void ) +{ +unsigned int i; +int fd; + + fd =memfd_create ("btmon-frames" ,MFD_CLOEXEC ); +if (fd <0 ) +return -1 ; + +for (i =0 ; i < num_frames; i++) { +const struct find_frame *frame =frame_at (i); +const char nul ='\0' ; +size_t len = frame->len; + +if (records) { +if (i &&write (fd, &nul,1 ) <0 ) +break ; + +/* Leave out the newline ending the frame */ +if (len && frame->text[len -1 ] =='\n' ) + len--; + } + +if (write (fd, frame->text, len) <0 ) +break ; + } + +if (lseek (fd,0 ,SEEK_SET ) <0 ) { +close (fd); +return -1 ; + } + +return fd; +} + +static void pager_close (void ) +{ +unsigned int i; + +if (!pager_pid) +return ; + + pager_pid =0 ; + +/* Put the monitor back in charge of the terminal */ +if (saved_stdout >=0 ) { +dup2 (saved_stdout,STDOUT_FILENO ); +close (saved_stdout); + saved_stdout =-1 ; + } + +term_raw (); + +/* Print whatever arrived while the pager was up */ +for (i =0 ; i < num_frames; i++) { +const struct find_frame *frame =frame_at (i); + +if (frame->seq >= pager_seq) +fwrite (frame->text,1 , frame->len, stdout); + } + +fflush (stdout); +} + +static void pager_open (void ) +{ +const char *pager; +int fd; + +if (pager_pid || !num_frames) +return ; + + fd =frames_to_file (); +if (fd <0 ) +return ; + + pager =getenv ("PAGER" ); +if (pager && (!*pager || !strcmp (pager,"cat" ))) + pager =NULL ; + +fflush (stdout); + +/* The pager reads the terminal from here on */ +term_restore (); +mainloop_remove_fd (STDIN_FILENO ); + + saved_stdout =dup (STDOUT_FILENO ); + + pager_pid =fork (); +if (pager_pid <0 ) { + pager_pid =0 ; +close (fd); +close (saved_stdout); + saved_stdout =-1 ; +term_raw (); +return ; + } + +if (!pager_pid) { +dup2 (fd,STDIN_FILENO ); +close (fd); + +if (prctl (PR_SET_PDEATHSIG ,SIGTERM ) <0 ) +_exit (EXIT_FAILURE ); + +if (pager) { +execlp (pager, pager,NULL ); +execl ("/bin/sh" ,"sh" ,"-c" , pager,NULL ); + } + +execlp ("pager" ,"pager" ,NULL ); +execlp ("less" ,"less" ,NULL ); +execlp ("more" ,"more" ,NULL ); + +_exit (EXIT_FAILURE ); + } + +close (fd); + + pager_seq = next_seq; +} + +static void key_callback (int fd,uint32_t events,void *user_data) +{ +char buf[32 ]; +ssize_t len, i; + +if (events & (EPOLLERR |EPOLLHUP )) { +mainloop_quit (); +return ; + } + + len =read (STDIN_FILENO , buf,sizeof (buf)); +if (len <=0 ) +return ; + +/* +* Anything else typed at a running capture is left alone, so that +* the terminal behaves as it did before. +*/ +for (i =0 ; i < len; i++) { +if (buf[i] ==0x12 ) {/* Ctrl-R */ +pager_open (); +return ; + } + } +} + +static void arm_keys (void ) +{ +mainloop_add_fd (STDIN_FILENO ,EPOLLIN , key_callback,NULL ,NULL ); +} + +/* +* The pager runs on its own so that the monitor keeps draining the socket +* while it is up, as anything not read in time is dropped by the kernel. +*/ +static void poll_callback (int id,void *user_data) +{ +if (pager_pid &&waitpid (pager_pid,NULL ,WNOHANG ) == pager_pid) { +pager_close (); +arm_keys (); + } + +mainloop_modify_timeout (id,FIND_POLL_MSEC ); +} +void find_set_print0 (void ) { print0 = true;
@@ -52,77 +467,60 @@ static bool want_records(void)return pager &&strstr (pager,"--read0" ); } -void find_setup (void ) +void find_setup (bool live) { records =want_records (); +if (live &&isatty (STDIN_FILENO ) &&isatty (STDOUT_FILENO )) { + enabled = true; + store = true; + +term_raw (); +arm_keys (); + + poll_id =mainloop_add_timeout (FIND_POLL_MSEC , poll_callback, +NULL ,NULL ); +return ; + } +/* -* Nothing is kept, but the output still has to be seen to know -* where one frame ends and the next begins. +* Nothing is kept when only the separators are wanted, but the +* output still has to be seen to know where a frame ends. */ if (records) enabled = true; } -void find_frame_begin (void ) -{ -if (!enabled) -return ; - - capture_buf =NULL ; - capture_len =0 ; - - capture =open_memstream (&capture_buf, &capture_len); -if (!capture) -return ; - -display_set_output (capture); -} - -void find_frame_end (void ) -{ -if (!enabled || !capture) -return ; - -display_set_output (NULL ); -fclose (capture); - capture =NULL ; - -/* A frame that was filtered out produces no output */ -if (!capture_len) { -free (capture_buf); - capture_buf =NULL ; -return ; - } - -if (records) { -const char nul ='\0' ; -size_t len = capture_len; - -/* -* The newline ending the frame is what separates the lines -* within it, so leave it out of a record or it shows as a -* blank line at the end of the entry. -*/ -if (len && capture_buf[len -1 ] =='\n' ) - len--; - -if (printed) -fwrite (&nul,1 ,1 , stdout); - -fwrite (capture_buf,1 , len, stdout); - }else { -fwrite (capture_buf,1 , capture_len, stdout); - } - -fflush (stdout); - printed = true; - -free (capture_buf); - capture_buf =NULL ; -} -void find_cleanup (void ) { +unsigned int i; + +if (pager_pid) { +kill (pager_pid,SIGTERM ); +waitpid (pager_pid,NULL ,0 ); + pager_pid =0 ; + } + +if (saved_stdout >=0 ) { +dup2 (saved_stdout,STDOUT_FILENO ); +close (saved_stdout); + saved_stdout =-1 ; + } + +term_restore (); + +if (poll_id >=0 ) { +mainloop_remove_timeout (poll_id); + poll_id =-1 ; + } + +for (i =0 ; i < num_frames; i++) +frame_free (frame_at (i)); + +free (frames); + frames =NULL ; + num_frames =0 ; + max_frames =0 ; + first_frame =0 ; enabled = false; }
monitor/find.h +1 -1
@@ -11,7 +11,7 @@#include <stdbool.h> void find_set_print0 (void ); -void find_setup (void ); +void find_setup (bool live);void find_frame_begin (void );void find_frame_end (void );
monitor/main.c +3 -2
@@ -286,7 +286,7 @@ int main(int argc, char *argv[])if (ellisys_server)ellisys_enable (ellisys_server, ellisys_port); -find_setup (); +find_setup (false);control_reader (reader_path, use_pager);return EXIT_SUCCESS ;
@@ -309,7 +309,8 @@ int main(int argc, char *argv[])if (jlink &&control_rtt (jlink, rtt) <0 )return EXIT_FAILURE ; -find_setup (); +/* Watch for the key that brings the pager up */ +find_setup (true); exit_status =mainloop_run_with_signal (signal_callback,NULL );
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 7/9 doc/btmon: Document searching the frames
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
Describe how the frames are separated for a pager reading records, how the ones seen so far are handed to the pager while capturing, and that they are only collected when the output is a terminal.
--- doc/btmon.rst | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
doc/btmon.rst +53 -0
@@ -96,6 +96,9 @@ OPTIONS -E IP, --ellisys IP Send Ellisys HCI Injection. -P, --no-pager Disable pager usage while reading the log file. +-0, --print0 Separate the frames with a NUL, so that a pager + or a tool reading records rather than lines sees + a whole frame as one entry. -J OPTIONS, --jlink OPTIONS Read data from RTT. Each options are comma(,) separated without spaces.
@@ -616,6 +619,56 @@ The kernel forwarded this as a MGMT Device Connected event. bluetoothd logged its ``connected_callback()``. Then data exchange began -- an L2CAP parameter update and ATT MTU negotiation over the new ACL connection. +SEARCHING THE FRAMES +==================== + +A frame spans several lines, so a pager that works on records rather than +lines has to be told where one ends. Asking for that with ``--print0``, or +by having ``--read0`` in ``PAGER``, separates the frames with a NUL so that +a whole frame is one entry:: + + $ PAGER='fzf --read0' btmon -r hcidump.log + $ btmon -r hcidump.log --print0 | fzf --read0 + +Without it each line becomes an entry of its own, so searching finds the +line reporting an error without the header saying which controller, handle +and time it belongs to. + +The newline that ends a frame is left out of a record, since it is what +separates the lines within one and would otherwise show as a blank line at +the end of every entry. + +Nothing is separated unless it was asked for, so a pager reading lines, +such as ``less``, is unaffected and never shows the separator. + +Searching a running capture +--------------------------- + +While capturing, the frames seen so far can be handed to a pager at any +time by pressing ``Ctrl-R``, in the manner of the shell. The capture keeps +running underneath, and closing the pager returns to it. + +.. code-block:: + + $ btmon # then press Ctrl-R + $ PAGER='fzf --read0' btmon # then press Ctrl-R + +Whatever arrives while the pager is up is printed once it closes, so the +trace on the terminal has no gap. The capture is never paused, as anything +not read in time would be dropped by the kernel. + +The pager is taken from ``PAGER``, falling back to ``less``. Setting it to +``cat`` or leaving it empty disables the pager, as elsewhere. + +Frames are only collected when the output is a terminal, so a capture that +is piped or redirected behaves exactly as it always has. The terminal is +switched to reading keys as they are typed, but signals are left enabled so +``Ctrl-C`` still interrupts the capture. + +They are held in memory and the oldest are dropped once 200000 are held, so +that a capture left running does not risk the monitor being killed for +using too much memory. + ANALYZE MODE ============
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 8/9 monitor: Prefer fzf as the pager when one is not set
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
A trace is a poor fit for a plain pager. Every frame spans several lines and what identifies one is spread between its header and its contents, so finding something means paging through by hand.
Use fzf when PAGER is not set and it is installed, asking it for whole frames, for the colours to be rendered rather than shown as escape sequences, and for the most recent frame first:
fzf --ansi --read0 --tac
PAGER is still honoured when set, and setting it to cat or leaving it empty still turns the pager off. The choice is shared with the frames seen so far being handed over while capturing, so both arrive at the same pager.
Frames are separated only when a pager that reads records is going to read them, so redirected output and a pager that reads lines are both left exactly as they were.
--- monitor/display.c | 119 ++++++++++++++++++++++++++++++++++++++++++++-- monitor/display.h | 3 ++ monitor/find.c | 20 +++++--- monitor/find.h | 2 +- monitor/main.c | 4 +- 5 files changed, 134 insertions(+), 14 deletions(-)
monitor/display.c +114 -5
@@ -20,6 +20,8 @@#include <unistd.h> #include <stdlib.h> #include <string.h> +#include <ctype.h> +#include <limits.h> #include <signal.h> #include <sys/wait.h> #include <sys/prctl.h>
@@ -117,6 +119,114 @@ static void wait_for_terminate(pid_t pid) } } +/* Look for a command in PATH, so that it can be preferred if present */ +static bool have_command (const char *name) +{ +const char *path =getenv ("PATH" ); +char *dirs, *dir, *save =NULL ; +bool found = false; + +if (!path) +return false; + + dirs =strdup (path); +if (!dirs) +return false; + +for (dir =strtok_r (dirs,":" , &save); dir; + dir =strtok_r (NULL ,":" , &save)) { +char file[PATH_MAX ]; + +if (snprintf (file,sizeof (file),"%s/%s" , dir, name) <0 ) +continue ; + +if (!access (file,X_OK )) { + found = true; +break ; + } + } + +free (dirs); + +return found; +} + +bool pager_disabled (void ) +{ +const char *pager =getenv ("PAGER" ); + +return pager && (!*pager || !strcmp (pager,"cat" )); +} + +/* +* What a fuzzy finder needs to make sense of a trace: an entry has to be a +* whole frame rather than a line of one, the colours have to be rendered +* instead of shown, and the most recent frame is the one usually being +* looked for. +*/ +static const char *const fzf_options[] = { +"--ansi" , +"--read0" , +"--tac" , +NULL +}; + +#define FZF_COMMAND "fzf --ansi --read0 --tac" + +/* Match a whole option, so a longer one starting the same is not it */ +static bool has_option (const char *cmd,const char *opt) +{ +size_t len =strlen (opt); +const char *p = cmd; + +while ((p =strstr (p, opt))) { +char next = p[len]; + +if ((p == cmd ||isspace (p[-1 ])) && + (!next ||isspace (next) || next =='=' )) +return true; + + p += len; + } + +return false; +} + +const char *pager_command (void ) +{ +static char cmd[512 ]; +const char *pager =getenv ("PAGER" ); +size_t pos =0 ; +int i, n; + +if (!pager || !*pager) +return have_command ("fzf" ) ?FZF_COMMAND :NULL ; + +if (!strstr (pager,"fzf" )) +return pager; + + n =snprintf (cmd,sizeof (cmd),"%s" , pager); +if (n <0 || (size_t )n >=sizeof (cmd)) +return pager; + + pos = n; + +for (i =0 ; fzf_options[i]; i++) { +if (has_option (pager, fzf_options[i])) +continue ; + + n =snprintf (cmd + pos,sizeof (cmd) - pos," %s" , + fzf_options[i]); +/* Leave it as given rather than pass something truncated */ +if (n <0 || (size_t )n >=sizeof (cmd) - pos) +return pager; + + pos += n; + } + +return cmd; +} +void open_pager (void ) {const char *pager;
@@ -126,11 +236,10 @@ void open_pager(void)if (pager_pid >0 )return ; - pager =getenv ("PAGER" ); -if (pager) { -if (!*pager ||strcmp (pager,"cat" ) ==0 ) -return ; - } +if (pager_disabled ()) +return ; + + pager =pager_command ();if (!(isatty (STDOUT_FILENO ) >0 ))return ;
monitor/display.h +3 -0
@@ -135,5 +135,8 @@ static inline void print_hex_field(const char *label, const uint8_t *data,void set_default_pager_num_columns (int num_columns);int num_columns (void ); +bool pager_disabled (void ); +const char *pager_command (void ); +void open_pager (void );void close_pager (void );
monitor/find.c +14 -6
@@ -61,6 +61,7 @@ static bool store; /* Keep the frames for handing to the pager */static bool records;/* Separate the frames with a NUL */ static bool printed;/* Something has been written out already */ static bool print0; +static bool use_pager;static bool raw_mode;static int poll_id =-1 ;static struct termios saved_term;
@@ -347,16 +348,14 @@ static void pager_open(void)const char *pager;int fd; -if (pager_pid || !num_frames) +if (pager_pid || !num_frames || !use_pager ||pager_disabled ())return ; fd =frames_to_file ();if (fd <0 )return ; - pager =getenv ("PAGER" ); -if (pager && (!*pager || !strcmp (pager,"cat" ))) - pager =NULL ; + pager =pager_command ();fflush (stdout);
@@ -462,13 +461,22 @@ static bool want_records(void)if (print0)return true; - pager =getenv ("PAGER" ); +/* +* Only separate the frames if something is actually going to read +* them as records. Nothing does when the output is redirected or +* the pager has been turned off. +*/ +if (!use_pager ||pager_disabled () || !isatty (STDOUT_FILENO )) +return false; + + pager =pager_command ();return pager &&strstr (pager,"--read0" ); } -void find_setup (bool live) +void find_setup (bool live,bool pager) { + use_pager = pager; records =want_records ();if (live &&isatty (STDIN_FILENO ) &&isatty (STDOUT_FILENO )) {
monitor/find.h +1 -1
@@ -11,7 +11,7 @@#include <stdbool.h> void find_set_print0 (void ); -void find_setup (bool live); +void find_setup (bool live,bool pager);void find_frame_begin (void );void find_frame_end (void );
monitor/main.c +2 -2
@@ -286,7 +286,7 @@ int main(int argc, char *argv[])if (ellisys_server)ellisys_enable (ellisys_server, ellisys_port); -find_setup (false); +find_setup (false, use_pager);control_reader (reader_path, use_pager);return EXIT_SUCCESS ;
@@ -310,7 +310,7 @@ int main(int argc, char *argv[])return EXIT_FAILURE ;/* Watch for the key that brings the pager up */ -find_setup (true); +find_setup (true, use_pager); exit_status =mainloop_run_with_signal (signal_callback,NULL );
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH v2 9/9 doc/btmon: Document the pager choice
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
Describe that fzf is used when PAGER is not set, the options it is given, and that it needs --ansi to render the colours when named explicitly.
--- doc/btmon.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
doc/btmon.rst +14 -3
@@ -639,7 +639,9 @@ separates the lines within one and would otherwise show as a blank line at the end of every entry. Nothing is separated unless it was asked for, so a pager reading lines, -such as ``less``, is unaffected and never shows the separator. +such as ``less``, is unaffected and never shows the separator. Redirected +output is never separated either unless ``--print0`` says so, since nothing +is then reading it as records. Searching a running capture ---------------------------
@@ -657,8 +659,17 @@ Whatever arrives while the pager is up is printed once it closes, so the trace on the terminal has no gap. The capture is never paused, as anything not read in time would be dropped by the kernel. -The pager is taken from ``PAGER``, falling back to ``less``. Setting it to -``cat`` or leaving it empty disables the pager, as elsewhere. +The pager is taken from ``PAGER``. When that is not set and ``fzf`` is +installed it is used instead of the plain pager, as it suits a trace far +better. Wherever ``fzf`` is used it is given the options it needs, adding +whichever of them are missing:: + + fzf --ansi --read0 --tac + +``--read0`` is what makes an entry a whole frame rather than a single line +of one, ``--ansi`` renders the colours instead of showing the escape +sequences, and ``--tac`` puts the most recent frame first. Setting +``PAGER`` to ``cat`` or leaving it empty disables the pager, as elsewhere. Frames are only collected when the output is a terminal, so a capture that is piped or redirected behaves exactly as it always has. The terminal is
Signature · 1 line
2.55.0
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 8 lines · On Fri, 18 Sep 2026 12:13:59 -0400 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
A frame spans several lines, and what identifies one is spread between its header and its contents: the header says which controller and when, the body says what happened. Searching a trace a line at a time finds the line reporting an error without any of that context.
[...]
Here is the summary with links:
- [BlueZ,v2,1/9] monitor/analyze: Free the channel latency plots
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=482d95704cec - [BlueZ,v2,2/9] monitor/l2cap: Report the channel latency deviation https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=381c58534a2f - [BlueZ,v2,3/9] monitor/analyze: Drop a trailing space before a newline https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=dd86570d2338 - [BlueZ,v2,4/9] monitor: Route the decoding output through a single function https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=64bf1cefb3c3 - [BlueZ,v2,5/9] monitor: Separate the frames for a pager reading records https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=87051913982c - [BlueZ,v2,6/9] monitor: Hand the captured frames to the pager on Ctrl-R https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2f7263b64c56 - [BlueZ,v2,7/9] doc/btmon: Document searching the frames https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=97c101c2ef56 - [BlueZ,v2,8/9] monitor: Prefer fzf as the pager when one is not set https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ad10ff49729f - [BlueZ,v2,9/9] doc/btmon: Document the pager choice https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=17e624d1cd9a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html