Mir

NBS (--nbuffers=0) causes software clients to crash with std::exception::what: Failed to mmap buffer 13, "Permission denied")

Bug #1550432 reported by Alan Griffiths
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Kevin DuBois
mir (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

with both mesa-x11 and mesa-kms:

$ bin/mir_demo_server --nbuffers=0 --test-client bin/mir_demo_client_multiwin
...
[2016-02-26 17:30:14.600378] <ERROR> MirBufferStreamAPI: Caught exception at client library boundary (in mir_buffer_stream_get_graphics_region): /home/alan/display_server/mir3/src/platforms/mesa/client/client_buffer.cpp(63): Throw in function {anonymous}::ShmMemoryRegion::ShmMemoryRegion(const std::shared_ptr<mir::client::mesa::BufferFileOps>&, int, const mir::geometry::Size&, mir::geometry::Stride, MirPixelFormat)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to mmap buffer
13, "Permission denied"
[2016-02-26 17:30:14.600724] <ERROR> MirBufferStreamAPI: Caught exception at client library boundary (in mir_buffer_stream_get_graphics_region): /home/alan/display_server/mir3/src/platforms/mesa/client/client_buffer.cpp(63): Throw in function {anonymous}::ShmMemoryRegion::ShmMemoryRegion(const std::shared_ptr<mir::client::mesa::BufferFileOps>&, int, const mir::geometry::Size&, mir::geometry::Stride, MirPixelFormat)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to mmap buffer
13, "Permission denied"
[2016-02-26 17:30:14.601024] <ERROR> MirBufferStreamAPI: Caught exception at client library boundary (in mir_buffer_stream_get_graphics_region): /home/alan/display_server/mir3/src/platforms/mesa/client/client_buffer.cpp(63): Throw in function {anonymous}::ShmMemoryRegion::ShmMemoryRegion(const std::shared_ptr<mir::client::mesa::BufferFileOps>&, int, const mir::geometry::Size&, mir::geometry::Stride, MirPixelFormat)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to mmap buffer
13, "Permission denied"

Tags: nbs

Related branches

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

It's because there are bits yet to land, particularly in lp:~kdub/mir/cover-nbs-with-acceptance-tests. Merge it and it'll work.

Changed in mir:
status: New → Invalid
Changed in mir:
status: Invalid → In Progress
assignee: nobody → Kevin DuBois (kdub)
milestone: none → 0.21.0
importance: Undecided → High
tags: added: nbs
summary: - --nbuffers=0 doesn't work with existing clients
+ NBS (--nbuffers=0) doesn't work with existing clients
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: NBS (--nbuffers=0) doesn't work with existing clients

Confirmed the 'cover-nbs-with-acceptance-tests' fixes NBS for the in-tree demos. However out-of-tree clients still crash under NBS even with that branch:

    $ sudo Xmir :1 -sw

or

   $ sudo env MIR_SOCKET=/tmp/mir_socket gedit

Changed in mir:
status: In Progress → Triaged
assignee: Kevin DuBois (kdub) → nobody
summary: - NBS (--nbuffers=0) doesn't work with existing clients
+ NBS (--nbuffers=0) doesn't work with existing software clients
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: NBS (--nbuffers=0) doesn't work with existing software clients

Correction: That branch does fix out-of-tree clients too. I just forgot to direct them to use the newer version of libmirclient.so.9

Changed in mir:
status: Triaged → In Progress
assignee: nobody → Kevin DuBois (kdub)
assignee: Kevin DuBois (kdub) → nobody
assignee: nobody → Kevin DuBois (kdub)
summary: - NBS (--nbuffers=0) doesn't work with existing software clients
+ NBS (--nbuffers=0) doesn't work with existing software clients (they
+ crash with std::exception::what: Failed to mmap buffer 13, "Permission
+ denied")
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote : Re: NBS (--nbuffers=0) doesn't work with existing software clients (they crash with std::exception::what: Failed to mmap buffer 13, "Permission denied")

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.21.0

Changed in mir:
status: In Progress → Fix Committed
summary: - NBS (--nbuffers=0) doesn't work with existing software clients (they
- crash with std::exception::what: Failed to mmap buffer 13, "Permission
- denied")
+ NBS (--nbuffers=0) causes software clients to crash with
+ std::exception::what: Failed to mmap buffer 13, "Permission denied")
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.2 KiB)

This bug was fixed in the package mir - 0.21.0+16.04.20160330-0ubuntu1

---------------
mir (0.21.0+16.04.20160330-0ubuntu1) xenial; urgency=medium

  [ Alberto Aguirre ]
  * New upstream release 0.21.0 (https://launchpad.net/mir/+milestone/0.21.0)
    - ABI summary:
      . mirclient ABI unchanged at 9
      . mirserver ABI unchanged at 38
      . mircommon ABI unchanged at 5
      . mirplatform ABI unchanged at 11
      . mirprotobuf ABI unchanged at 3
      . mirplatformgraphics ABI unchaged at 8
      . mirclientplatform ABI bumped to 5
      . mirinputplatform ABI unchanged at 5
    - Enhancements:
      . New display enumeration API
      . Added Android diagnostic tests to assist during porting to
        new devices
      . Added mir_demo_client_camera: a Video4Linux2 client
    - Bugs fixed:
      . Sometimes devices don't suspend - display turns back on
        immediately (LP: #1549701)
      . Mir crashed with exception 'failed to add sync point to command
        buffer' (LP: #1554635)
      . Mouse cursor is unusably slow in Unity 8 with a 1000Hz mouse
        (LP: #1539009)
      . Packaged mir_unit_tests binary is not suitable for general use
        (LP: #1547015)
      . [regression] Mir stops receiving input after a pause/resume
        cycle (LP: #1548989)
      . NBS (--nbuffers=0) causes software clients to crash with
        std::exception::what: Failed to mmap buffer 13, "Permission denied")
        (LP: #1550432)
      . Fullscreen clients freeze when using NBS with multiple monitors
        (LP: #1551536)
      . [ FAILED ] DisplayConfigurationTest.output_position_is_independent_of_
        orientation (LP: #1552065)
      . The server-side use of MIR_SOCKET is confusing (LP: #1290345)
      . [regression] FTBFS with -DMIR_LINK_TIME_OPTIMIZATION=on
        -Duse_debflags=on (LP: #1350343)
      . Mir On X (mesa-x11) keeps receiving mouse movement events even
        when not focused (LP: #1528110)
      . x11 platform: mouse cursor moves strange (LP: #1546324)
      . Cross compiling to wily/vivid doesn't work (LP: #1549152)
      . Rendering stutters when a new client establishes a connection
        (LP: #1549359)
      . 'mir_demo_server --test-client' crashes (SIGSEGV) when client
        dies (LP: #1555620)
      . [testfail] CI failure: TestClientInput.client_input_config_request_
        receives_all_attached_devices (LP: #1555708)
      . [regression] Mir FTBFS when MIR_ENABLE_TESTS=no (LP: #1556080)
      . Mir-on-X11 doesn't exit (until it gets an event) (LP: #1556210)
      . InputPlatformProbe.x11_platform_found_and_used_when_display_connection_
        works breaks with old input drivers present (LP: #1543049)
      . [regression] MIR_CLIENT_PERF_REPORT is missing window/surface
        names (LP: #1546933)
      . Installed binaries fail to run with mir_demo_server --test-client XXXX
        (LP: #1556160)
      . mir_demo_server --test-client [mir_demo_client_scroll|
        mir_demo_client_flicker] fails (LP: #1556205)
      . The contents of debian/mir-demos.examples are out of date and useless
        (LP: #1557446)

  [ CI Train Bot ]
  * No-change rebuild.

 -- Alberto Aguirre <alberto.aguirre@can...

Read more...

Changed in mir (Ubuntu):
status: New → Fix Released
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.