0

The latest version of Cobalt(8.20698) will crash at init time on arm linux platform, the backtrace is as follows, but the old version doesn't has this issue, could anyone help to have a look?

[00000000] *pgd=0dce6831, *pte=00000000, *ppte=00000000
CPU: 0 PID: 4268 Comm: cobalt_qa Tainted: P           O 3.10.79 #2
task: cf33b400 ti: d24bc000 task.ti: d24bc000
PC is at 0xb5d12180
LR is at 0x161610
pc : [<b5d12180>]    lr : [<00161610>]    psr: 600f0010
sp : bed2fc20  ip : b5d12180  fp : 00000000
r10: bed30088  r9 : bed2ff78  r8 : bed2fe84
r7 : 00000002  r6 : 00000000  r5 : 00000000  r4 : 01027e68
r3 : 00000043  r2 : 00000049  r1 : 0000002e  r0 : 00000000
Flags: nZCv  IRQs on  FIQs on  Mode USER_32  ISA ARM  Segment user
Control: 10c5387d  Table: 124d406a  DAC: 00000015
CPU: 0 PID: 4268 Comm: cobalt_qa Tainted: P           O 3.10.79 #2
[<c0012c20>] (unwind_backtrace+0x0/0xdc) from [<c0010ef8>] (show_stack+0x10/0x14)
[<c0010ef8>] (show_stack+0x10/0x14) from [<c0014204>] (__do_user_fault+0x13c/0x1ac)
[<c0014204>] (__do_user_fault+0x13c/0x1ac) from [<c001449c>] (do_page_fault+0x228/0x268)
[<c001449c>] (do_page_fault+0x228/0x268) from [<c0008328>] (do_DataAbort+0x34/0x120)
[<c0008328>] (do_DataAbort+0x34/0x120) from [<c000dab4>] (__dabt_usr+0x34/0x40)
Exception stack(0xd24bdfb0 to 0xd24bdff8)
dfa0:                                     00000000 0000002e 00000049 00000043
dfc0: 01027e68 00000000 00000000 00000002 bed2fe84 bed2ff78 bed30088 00000000
dfe0: b5d12180 bed2fc20 00161610 b5d12180 600f0010 ffffffff

Caught signal: SIGSEGV (11)

    <unknown> [0xb5d12180]
    uprv_getDefaultLocaleID_56 [0x161610]
    icu_56::locale_set_default_internal() [0x15a114]
    icu_56::Locale::getDefault() [0x159ca0]
    locale_get_default_56 [0x159cb0]
    EzTimeValueExplode [0xb4d10]
    EzTimeTExplode [0xb5048]
    EzTimeTExplodeLocal [0xb5838]
    logging::LogMessage::Init() [0x7b7cc]
    logging::LogMessage::LogMessage() [0x7bcf4]
    base::UserLog::IsRegistrationSupported() [0x6b108]
    cobalt::browser::Application::RegisterUserLogs() [0x2c608]
    cobalt::browser::Application::Application() [0x2d998]
    cobalt::browser::CreateApplication() [0x2b278]
    SbEventHandle [0x2b0c0]
    starboard::shared::starboard::Application::DispatchStart() [0xbadec]
    starboard::shared::starboard::Application::Run() [0xbb4e0]
    main [0x21c24]
    <unknown> [0xb5cb2278]
bitchainer
  • 535
  • 2
  • 19
  • You should consider filing a bug at the Cobalt issue tracker: https://issuetracker.google.com/issues?q=componentid:181120%20status:open – David Ghandehari Feb 09 '17 at 06:16
  • 1
    hi, david, thanks for your kind suggestion, I have traced the code and fixed this issue by setting the LANG environment now. – bitchainer Feb 09 '17 at 06:27
  • 1
    Thanks for discovering the bug, @bitchainer, the fix will be available in the next push. – mmotorny Feb 10 '17 at 03:41

1 Answers1

0

After tracing the code of Cobalt, the cobalt need to get the posix_id by SbSystemGetLocaledId() in system_get_locale_id.cc, but the system didn't set the clang environment variable yet, and it get null which made the Crash, after setting the LANG environment variable(export LANG="en_US.UTF-8"), it works. Add CLANG environment variable

bitchainer
  • 535
  • 2
  • 19