mir_demo_server hangs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Robert Ancell |
Bug Description
I have a trivial test application that reliably hangs the mir_demo_server. All it does is connect, allocate a surface, release the surface and disconnect. It tries to do this 1000 times. After 501 times, the server hangs, and any subsequent connections made will block indefinitely.
The test application is available at:
The code is short, so I'll list it below as well:
<code>
#include <iostream>
#include <future>
#include "mir_toolkit/
#include <unistd.h>
void hang_mir_server()
{
std::cout << "Connecting...";
MirConnection *connection_ = mir_connect_
MirDisplayInfo display_info;
mir_
MirPixelFormat const pixel_format = display_
MirSurfaceP
{
640,
480,
};
std::cout << "Create Surface...";
MirSurface *surface_ = mir_connection_
std::cout << "Release Surface...";
mir_
MirPlatform
mir_
close(
std::cout << "Disconnecting...";
mir_
std::cout << "Done." << std::endl;
}
int main(int argc, char** argv)
{
for (int i = 0; i < 1000; i++)
{
std::cout << "Iteration " << i << ": ";
}
return 0;
}
</snip>
Related branches
- Alan Griffiths: Approve
- Alexandros Frantzis (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 36 lines (+8/-1)2 files modifiedsrc/server/graphics/gbm/gbm_buffer.cpp (+7/-1)
src/server/graphics/gbm/gbm_buffer.h (+1/-0)
Changed in mir: | |
milestone: | none → 0.0.4 |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Changed in mir: | |
assignee: | nobody → Robert Ancell (robert-ancell) |
Note in my case it occurred around iteration ~480.