terminate called (uncaught exception) from DefaultServerConfiguration::the_host_connection()

Bug #1355892 reported by errors.ubuntu.com bug bridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Invalid
Critical
Alexandros Frantzis
qtmir (Ubuntu)
Invalid
Critical
Gerry Boland
ubuntu-system-settings (Ubuntu)
Fix Released
High
Michael Terry

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding unity8. This problem was most recently seen with version 8.00+14.10.20140811-0ubuntu1, the problem page at https://errors.ubuntu.com/problem/97fd02aaa9a970a142df70e81f399de409d23847 contains more details.

Related branches

tags: added: qa-daily-testing qasoak rtm14
Revision history for this message
kevin gunn (kgunn72) wrote :

adding mir as the trace might indicate nested lifecycle

summary: - /usr/bin/unity8:6:__gnu_cxx::__verbose_terminate_handler:__cxxabiv1::__terminate:std::terminate:__cxxabiv1::__cxa_rethrow:__shared_count
+ terminate called (uncaught exception) from
+ DefaultServerConfiguration::the_host_connection()
Changed in mir:
importance: Undecided → Critical
affects: unity8 (Ubuntu) → qtmir (Ubuntu)
kevin gunn (kgunn72)
Changed in qtmir:
status: New → Triaged
Changed in qtmir (Ubuntu):
status: New → Triaged
kevin gunn (kgunn72)
Changed in qtmir:
assignee: nobody → Gerry Boland (gerboland)
Changed in qtmir (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
kevin gunn (kgunn72)
tags: added: touch-2014-10-02
kevin gunn (kgunn72)
Changed in qtmir (Ubuntu):
importance: Undecided → Critical
Changed in qtmir:
importance: Undecided → Critical
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It appears to be the system settings "wizard" nested server that's crashing. You can tell by "/run/user/32011/wizard_socket".

Not quite sure how the "wizard" is constructed in the grand scheme of things.

Changed in qtmir:
status: Triaged → Invalid
status: Invalid → Triaged
Changed in mir:
assignee: nobody → Alexandros Frantzis (afrantzis)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The offending exception: /usr/include/c++/4.9/bits/shared_ptr_base.h:626
appears to be constructor/memory related, as if unity8 has exhausted available memory?

      template<typename _Tp, typename _Alloc, typename... _Args>
        __shared_count(_Sp_make_shared_tag, _Tp*, const _Alloc& __a,
                       _Args&&... __args)
        : _M_pi(0)
        {
          typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
          typedef typename allocator_traits<_Alloc>::template
            rebind_traits<_Sp_cp_type> _Alloc_traits;
          typename _Alloc_traits::allocator_type __a2(__a);
          _Sp_cp_type* __mem = _Alloc_traits::allocate(__a2, 1);
          __try
            {
              _Alloc_traits::construct(__a2, __mem, std::move(__a),
                    std::forward<_Args>(__args)...);
              _M_pi = __mem;
            }
          __catch(...)
            {
              _Alloc_traits::deallocate(__a2, __mem, 1);
              __throw_exception_again;
            }
        }

Either that or the constructor is throwing, which could be:

mgn::MirClientHostConnection::MirClientHostConnection
 ...
    if (!mir_connection_is_valid(mir_connection))
    {
        std::string const msg =
            "Nested Mir Platform Connection Error: " +
            std::string(mir_connection_get_error_message(mir_connection));

        BOOST_THROW_EXCEPTION(std::runtime_error(msg)); <=== the only exception possible I can see
    }

either due to a startup race or due to unity-system-compositor having crashed...?

Changed in mir:
milestone: none → 0.8.0
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's possible that whatever is meant to provide:
    host_socket = "/run/user/32011/wizard_socket"
is not running yet, or has crashed.

What provides "wizard_socket"?

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

My guess is that host_socket = "/run/user/32011/wizard_socket" is wrong. Perhaps a stray "MIR_SOCKET" environment variable. Unity8 should only be connecting to USC.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Certainly seems like a spurious value of $MIR_SOCKET. So Mir itself isn't doing anything wrong *

* Except that, I would argue, occasions like this call for error messages rather than exceptions leading to bug reports. It's not something that should have made it to the Mir bug tracker really. Although it's now useful that it did.

Changed in mir:
milestone: 0.8.0 → none
status: New → Invalid
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

OK, so current investigation results indicate that this is probably an issue (race?) in our start-up scripts. The start-up wizard should be setting MIR_SOCKET=/run/user/32011/wizard_socket in the upstart environment [1], and restoring the previous value when shutting down [2].

However it seems that occasionally something goes wrong at the cleanup phase and the environment variable is not restored, or unity8 manages to start before the cleanup phase is performed.

[1] https://bazaar.launchpad.net/~system-settings-touch/ubuntu-system-settings/rtm-14.09/view/head:/wizard/ubuntu-system-settings-wizard.conf
[2] https://bazaar.launchpad.net/~system-settings-touch/ubuntu-system-settings/rtm-14.09/view/head:/wizard/ubuntu-system-settings-wizard-cleanup.conf

Changed in qtmir:
status: Triaged → Invalid
Changed in qtmir (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Michael Terry (mterry) wrote :

In such cases, is there a crash file for the wizard? If the wizard crashes, the cleanup script isn't run... And I bet unity8 would start with the bogus MIR_SOCKET value.

But cleaning it up in the post-stop phase of the wizard would be racy with the start of unity8. So we'd maybe want to add logic to unity8's startup to check for this case somehow...

Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Michael Terry (mterry)
importance: Undecided → High
Michael Terry (mterry)
Changed in ubuntu-system-settings (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings - 0.3+14.10.20140925-0ubuntu1

---------------
ubuntu-system-settings (0.3+14.10.20140925-0ubuntu1) utopic; urgency=low

  [ Michael Terry ]
  * Add a translator comment for what HERE means. (LP: #1368838) (LP:
    #1368838)
  * Prevent a crash in unity8 when the wizard also crashes or stops
    early. (LP: #1355892) (LP: #1355892)
 -- Ubuntu daily release <email address hidden> Thu, 25 Sep 2014 00:22:52 +0000

Changed in ubuntu-system-settings (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq)
no longer affects: qtmir
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.