CI test failures in various NesterServer tests
Bug #1517781 reported by
Alexandros Frantzis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Alexandros Frantzis | ||
mir (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When running the NestedServer tests repeatedly we get failures in various tests. The failures are of two sorts:
1. Test hangs forever
2. terminate called after throwing an instance of 'boost:
what(): Failed to trigger thread shutdown: Bad file descriptor
Examples from CI:
http://
http://
Related branches
lp:~afrantzis/mir/fix-1517781-double-close
- PS Jenkins bot (community): Approve (continuous-integration)
- Alberto Aguirre (community): Approve
- Alan Griffiths: Approve
-
Diff: 49 lines (+6/-7)2 files modifiedinclude/test/mir_test_framework/async_server_runner.h (+1/-3)
tests/mir_test_framework/async_server_runner.cpp (+5/-4)
tags: | added: testsfail |
Changed in mir: | |
status: | New → In Progress |
Changed in mir: | |
milestone: | none → 0.18.0 |
tags: | added: nested |
Changed in mir: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The problem is a double close of an fd in our test framework.
The AsyncServerRunner is creating a client socket which it then passes to the client. However, the server keeps ownership of the socket fd, and the client also thinks it owns the passed fd, so eventually both the server and client close the same fd number.
Between the two close operations, our events dispatchers may create an eventfd or epollfd (depending on how threads are scheduled), getting the fd number of the recently closed socket. When the second close operation happens it ends up closing the eventfd/epollfd instead, wreaking havoc on the unsuspecting distpatchers.