[ 
https://issues.apache.org/jira/browse/PROTON-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314883#comment-17314883
 ] 

Jiri Daněk edited comment on PROTON-2230 at 4/5/21, 1:56 PM:
-------------------------------------------------------------

A variation on the previous failure, with a slightly different stacktrace, and 
this time from ASAN 
https://travis-ci.com/github/apache/qpid-proton/jobs/496100667#L2194

{noformat}
test 6
      Start  6: c-threaderciser
6: Test command: /opt/pyenv/shims/python3 
"/home/travis/build/apache/qpid-proton/scripts/env.py" "--" 
"UBSAN_OPTIONS=suppressions=/home/travis/build/apache/qpid-proton/tests/ubsan.supp"
 
"LSAN_OPTIONS=suppressions=/home/travis/build/apache/qpid-proton/tests/lsan.supp"
 "/home/travis/build/apache/qpid-proton/build/c/tests/c-threaderciser"
6: Test timeout computed to be: 360
6: threaderciser start: threads=8, time=1, actions=[listen, close-listen, 
connect, close-connect, wake, timeout, cancel-timeout]
6: =================================================================
6: ==13373==ERROR: AddressSanitizer: heap-use-after-free on address 
0x61a00000fcb5 at pc 0x7f9dfbf9c054 bp 0x7f9df60fbc80 sp 0x7f9df60fbc78
6: READ of size 1 at 0x61a00000fcb5 thread T4
6:     #0 0x7f9dfbf9c053 in schedule 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:292:13
6:     #1 0x7f9dfbf9cb87 in unassign_thread 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:479:18
6:     #2 0x7f9dfbfb731c in listener_done 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:1820:7
6:     #3 0x7f9dfbfb731c in pn_proactor_done 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:2688:5
6:     #4 0x406d62 in proactor_thread 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:479:5
6:     #5 0x7f9dfbd8b608 in start_thread 
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
6:     #6 0x7f9dfbcb2292 in clone 
/build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
6: 
6: 0x61a00000fcb5 is located 53 bytes inside of 1408-byte region 
[0x61a00000fc80,0x61a000010200)
6: freed by thread T6 here:
6:     #0 0x7f9dfc0c3d4d in free 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xbbd4d)
6:     #1 0x7f9dfbfb2a16 in listener_process 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:1736:9
6:     #2 0x7f9dfbfb2a16 in process 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:2229:13
6:     #3 0x7f9dfbfb2a16 in next_event_batch 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:2423:33
6:     #4 0x406d21 in proactor_thread 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:474:32
6:     #5 0x7f9dfbd8b608 in start_thread 
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
6: 
6: previously allocated by thread T5 here:
6:     #0 0x7f9dfc0c4142 in calloc 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xbc142)
6:     #1 0x7f9dfbfa1aaf in pn_listener 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:1474:38
6:     #2 0x4067a1 in listener_ctx_new 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:265:22
6:     #3 0x4067a1 in lpool_listen 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:283:23
6:     #4 0x407793 in global_do_stuff 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:380:19
6:     #5 0x406ba7 in user_thread 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:398:5
6:     #6 0x7f9dfbd8b608 in start_thread 
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
6: 
6: Thread T4 created by T0 here:
6:     #0 0x7f9dfc0aea2a in pthread_create 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xa6a2a)
6:     #1 0x4061cf in main 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:573:5
6:     #2 0x7f9dfbbb70b2 in __libc_start_main 
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
6: 
6: Thread T6 created by T0 here:
6:     #0 0x7f9dfc0aea2a in pthread_create 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xa6a2a)
6:     #1 0x4061cf in main 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:573:5
6:     #2 0x7f9dfbbb70b2 in __libc_start_main 
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
6: 
6: Thread T5 created by T0 here:
6:     #0 0x7f9dfc0aea2a in pthread_create 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xa6a2a)
6:     #1 0x4061a9 in main 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:572:5
6:     #2 0x7f9dfbbb70b2 in __libc_start_main 
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
6: 
6: SUMMARY: AddressSanitizer: heap-use-after-free 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:292:13 in schedule
6: Shadow bytes around the buggy address:
6:   0x0c347fff9f40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6: =>0x0c347fff9f90: fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fa0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fd0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fe0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6: Shadow byte legend (one shadow byte represents 8 application bytes):
6:   Addressable:           00
6:   Partially addressable: 01 02 03 04 05 06 07 
6:   Heap left redzone:       fa
6:   Freed heap region:       fd
6:   Stack left redzone:      f1
6:   Stack mid redzone:       f2
6:   Stack right redzone:     f3
6:   Stack after return:      f5
6:   Stack use after scope:   f8
6:   Global redzone:          f9
6:   Global init order:       f6
6:   Poisoned by user:        f7
6:   Container overflow:      fc
6:   Array cookie:            ac
6:   Intra object redzone:    bb
6:   ASan internal:           fe
6:   Left alloca redzone:     ca
6:   Right alloca redzone:    cb
6:   Shadow gap:              cc
6: ==13373==ABORTING
 6/47 Test  #6: c-threaderciser ..................***Failed    0.18 sec
{noformat}


was (Author: jdanek):
A variation on the previous failure, with a slightly different stacktrace 
https://travis-ci.com/github/apache/qpid-proton/jobs/496100667#L2194

{noformat}
test 6
      Start  6: c-threaderciser
6: Test command: /opt/pyenv/shims/python3 
"/home/travis/build/apache/qpid-proton/scripts/env.py" "--" 
"UBSAN_OPTIONS=suppressions=/home/travis/build/apache/qpid-proton/tests/ubsan.supp"
 
"LSAN_OPTIONS=suppressions=/home/travis/build/apache/qpid-proton/tests/lsan.supp"
 "/home/travis/build/apache/qpid-proton/build/c/tests/c-threaderciser"
6: Test timeout computed to be: 360
6: threaderciser start: threads=8, time=1, actions=[listen, close-listen, 
connect, close-connect, wake, timeout, cancel-timeout]
6: =================================================================
6: ==13373==ERROR: AddressSanitizer: heap-use-after-free on address 
0x61a00000fcb5 at pc 0x7f9dfbf9c054 bp 0x7f9df60fbc80 sp 0x7f9df60fbc78
6: READ of size 1 at 0x61a00000fcb5 thread T4
6:     #0 0x7f9dfbf9c053 in schedule 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:292:13
6:     #1 0x7f9dfbf9cb87 in unassign_thread 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:479:18
6:     #2 0x7f9dfbfb731c in listener_done 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:1820:7
6:     #3 0x7f9dfbfb731c in pn_proactor_done 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:2688:5
6:     #4 0x406d62 in proactor_thread 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:479:5
6:     #5 0x7f9dfbd8b608 in start_thread 
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
6:     #6 0x7f9dfbcb2292 in clone 
/build/glibc-eX1tMB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
6: 
6: 0x61a00000fcb5 is located 53 bytes inside of 1408-byte region 
[0x61a00000fc80,0x61a000010200)
6: freed by thread T6 here:
6:     #0 0x7f9dfc0c3d4d in free 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xbbd4d)
6:     #1 0x7f9dfbfb2a16 in listener_process 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:1736:9
6:     #2 0x7f9dfbfb2a16 in process 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:2229:13
6:     #3 0x7f9dfbfb2a16 in next_event_batch 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:2423:33
6:     #4 0x406d21 in proactor_thread 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:474:32
6:     #5 0x7f9dfbd8b608 in start_thread 
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
6: 
6: previously allocated by thread T5 here:
6:     #0 0x7f9dfc0c4142 in calloc 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xbc142)
6:     #1 0x7f9dfbfa1aaf in pn_listener 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:1474:38
6:     #2 0x4067a1 in listener_ctx_new 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:265:22
6:     #3 0x4067a1 in lpool_listen 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:283:23
6:     #4 0x407793 in global_do_stuff 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:380:19
6:     #5 0x406ba7 in user_thread 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:398:5
6:     #6 0x7f9dfbd8b608 in start_thread 
/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477:8
6: 
6: Thread T4 created by T0 here:
6:     #0 0x7f9dfc0aea2a in pthread_create 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xa6a2a)
6:     #1 0x4061cf in main 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:573:5
6:     #2 0x7f9dfbbb70b2 in __libc_start_main 
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
6: 
6: Thread T6 created by T0 here:
6:     #0 0x7f9dfc0aea2a in pthread_create 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xa6a2a)
6:     #1 0x4061cf in main 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:573:5
6:     #2 0x7f9dfbbb70b2 in __libc_start_main 
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
6: 
6: Thread T5 created by T0 here:
6:     #0 0x7f9dfc0aea2a in pthread_create 
(/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/libclang_rt.asan-x86_64.so+0xa6a2a)
6:     #1 0x4061a9 in main 
/home/travis/build/apache/qpid-proton/c/tests/threaderciser.c:572:5
6:     #2 0x7f9dfbbb70b2 in __libc_start_main 
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
6: 
6: SUMMARY: AddressSanitizer: heap-use-after-free 
/home/travis/build/apache/qpid-proton/c/src/proactor/epoll.c:292:13 in schedule
6: Shadow bytes around the buggy address:
6:   0x0c347fff9f40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6:   0x0c347fff9f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
6: =>0x0c347fff9f90: fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fa0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fd0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6:   0x0c347fff9fe0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
6: Shadow byte legend (one shadow byte represents 8 application bytes):
6:   Addressable:           00
6:   Partially addressable: 01 02 03 04 05 06 07 
6:   Heap left redzone:       fa
6:   Freed heap region:       fd
6:   Stack left redzone:      f1
6:   Stack mid redzone:       f2
6:   Stack right redzone:     f3
6:   Stack after return:      f5
6:   Stack use after scope:   f8
6:   Global redzone:          f9
6:   Global init order:       f6
6:   Poisoned by user:        f7
6:   Container overflow:      fc
6:   Array cookie:            ac
6:   Intra object redzone:    bb
6:   ASan internal:           fe
6:   Left alloca redzone:     ca
6:   Right alloca redzone:    cb
6:   Shadow gap:              cc
6: ==13373==ABORTING
 6/47 Test  #6: c-threaderciser ..................***Failed    0.18 sec
{noformat}

> Valgrind and Sanitizer issues in c-threaderciser test
> -----------------------------------------------------
>
>                 Key: PROTON-2230
>                 URL: https://issues.apache.org/jira/browse/PROTON-2230
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.31.0
>            Reporter: Jiri Daněk
>            Priority: Major
>
> As described in PROTON-2225, the test is not passing cleanly under Valgrind 
> and Sanitizers. Currently, the issues are suppressed and the entries in 
> suppression file are marked with TODO comments.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to