Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotLinkingJiraYet fail test if subprocess aborts or segfaults #1112

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jiridanek
Copy link
Contributor

No description provided.

@jiridanek
Copy link
Contributor Author

just a note to myself, two segfaults reported by ctest without any details or backtraces

https://travis-ci.com/github/apache/qpid-dispatch/jobs/497981423#L4673
https://travis-ci.com/github/apache/qpid-dispatch/jobs/497981421#L10288

@jiridanek
Copy link
Contributor Author

The problem with this is that the router not always segfaults or aborts, sometimes it just exits. Some tests do expect a !=0 ecode exit. The code has to look for expected ecode in the event handler, compare those two, and somehow print output (so it does not get lost) and either kill the test, or continue from the next testcase with restored routers.

@jiridanek jiridanek force-pushed the jd_2021_04_08_detect_dead_child branch 2 times, most recently from 9ca5b63 to d96009d Compare April 19, 2021 16:40
TODO:
* does this actually do the right thing?
* is it necessary to instrument `unordered_move_stack` function?

When there is a read or write to the poisoned area, the error message looks like

```
==15792==ERROR: AddressSanitizer: use-after-poison on address 0x611000034dd8 at pc 0x7fdaa75fc713 bp 0x7fff2d0c8d80 sp 0x7fff2d0c8d78
14: WRITE of size 8 at 0x611000034dd8 thread T0
14:     #0 0x7fdaa75fc712 in qd_hash_internal_remove_item /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug-asan/../src/hash.c:131:30
14:     #1 0x7fdaa75fb51d in qd_hash_free /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug-asan/../src/hash.c:146:13
[...]
```
@jiridanek jiridanek force-pushed the jd_2021_04_08_detect_dead_child branch from d96009d to 0bb3c7a Compare April 24, 2021 06:59
@jiridanek jiridanek added this to the 1.17.0 milestone Apr 24, 2021
@jiridanek jiridanek modified the milestones: 1.17.0, 1.18.0 Jul 23, 2021
@jiridanek jiridanek modified the milestones: 1.18.0, 1.19.0 Oct 31, 2021
@jiridanek
Copy link
Contributor Author

I was thinking about few more things. First, reporting/dealing with leaked threads, https://issues.apache.org/jira/browse/DISPATCH-2323?focusedCommentId=17484381&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17484381

and with adding rr --chaos, https://groups.google.com/g/mozilla.dev.platform/c/wJJUkf0GESE, which requires dealing with rr's inability (or unwillingness) to forward signals it receives to the inferior process under debugging. Solving this does not sound hard and should be interesting. (Btw, I first saw https://issues.apache.org/jira/browse/DISPATCH-2318 under rr chaos)

@jiridanek jiridanek modified the milestones: 1.19.0, 1.20.0 Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant