scoperunner in RegistryI test fails if locale is not set

Bug #1303637 reported by Paweł Stołowski
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
unity-scopes-api (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Scoperunner fails if locale is not set (that was the case for me when building and running tests in a chroot), and that makes RegistryI test fail. The error I'm getting when the test fails is:

scoperunner: locale::facet::_S_create_c_locale name not valid

Setting LC_ALL=C fixes it, but perhaps we should be more tolerant.

description: updated
Revision history for this message
Michal Hruby (mhr3) wrote :

Coming from here:

#0 0x00007ffff6bd6a30 in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007ffff6c28677 in std::__throw_runtime_error(char const*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007ffff6bf40c4 in std::locale::facet::_S_create_c_locale(__locale_struct*&, char const*, __locale_struct*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff6be92e9 in std::locale::_Impl::_Impl(char const*, unsigned long)
    () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff6bea30d in std::locale::locale(char const*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff72cc2c2 in boost::filesystem::path::codecvt() ()
   from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0
#6 0x00007ffff72cc77f in boost::filesystem::path::begin() const ()
   from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0
#7 0x00007ffff72ccfb5 in boost::filesystem::path::compare(boost::filesystem::path const&) const ()
   from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0
#8 0x00007ffff72cd1e5 in boost::filesystem::path::extension() const ()
   from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0
#9 0x000000000043c6b1 in scoperegistry::find_scope_config_files (
    install_dir=..., suffix=...)
    at /home/miso/projects/unity-scopes-api/scoperegistry/FindFiles.cpp:103
#10 0x000000000043e509 in (anonymous namespace)::find_local_scopes (
    scope_installdir=..., oem_installdir=...)
    at /home/miso/projects/unity-scopes-api/scoperegistry/scoperegistry.cpp:139

Revision history for this message
Michi Henning (michihenning) wrote :

Looks like this is a known bug in Boost:

https://svn.boost.org/trac/boost/ticket/5928

What's the boost version with which we get this failure?

Revision history for this message
Michi Henning (michihenning) wrote :

Is this bug still current? Once we switch to gcc 4.9, we'll also be using boost 1.55, and the bug is fixed in that version, as far as I know.

Pawel, could you try again with boost 1.55 and close this if the problem has disappeared?

Changed in unity-scopes-api:
importance: Undecided → Low
affects: unity-scopes-api → unity-scopes-api (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-scopes-api (Ubuntu):
status: New → Confirmed
Revision history for this message
Michi Henning (michihenning) wrote :

Problem is still present in boost 1.55:

https://svn.boost.org/trac/boost/ticket/10641

Realistically, there isn't anything we can do. As a library, we can't change the locale because that's a process-wide attribute (besides it not being thread-safe).

Revision history for this message
Michi Henning (michihenning) wrote :

According to the upstream bug, it's fixed for 1.57, so we should be good once that rolls out. Simplest test:

$ cd build/test/gtest/scopes/Runtime
$ LC_ALL=foo ./Runtime_test

That fails spectacularly while the bug is present.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Bug fixed upstream, setting Status to "Fix Released"

Changed in unity-scopes-api (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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