Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#5923 closed bug (fixed)

ReadOnlyBootPrompt crashes

Reported by: bonefish Owned by: stippi
Priority: normal Milestone: R1/alpha2
Component: Applications/FirstBootPrompt Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev36627 (trunk)

After starting installer (IIRC also when selecting Live CD mode) ReadOnlyBootPrompt crashes:

vm_soft_fault: va 0x0 not covered by area in address space                                                                                      
vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x18, ip 0x3ff1b5, write 0, user 1, thread 0x5a                           
vm_page_fault: thread "w>Welcome to Haiku!" (90) in team "ReadOnlyBootPrompt" (79) tried to read address 0x18, ip 0x3ff1b5 ("libbe.so_seg0ro" +0x1ee1b5)                                                                                                                                        
debug_server: Thread 90 entered the debugger: Segment violation                                                                                 
0x8384d660->VMAnonymousCache::_Commit(13303808): Failed to reserve 13303808 bytes of RAM
stack trace, current PC 0x3ff1b5  IsLocked__C7BLocker + 0x21:
  (0x7003fd9c)  0x3ff277  AcquireLock__7BLockerxPl + 0x23
  (0x7003fdcc)  0x3ff0ea  Lock__7BLocker + 0x2e
  (0x7003fdfc)  0x3fa67b  Get__11BBlockCacheUl + 0x27
  (0x7003fe2c)  0x2dc678  __nw__8BMessageUl + 0x28
  (0x7003fe5c)  0x2dadde  ConvertToMessage__7BLooperPvl + 0x2e
  (0x7003fe8c)  0x3a2f4f  ConvertToMessage__7BWindowPvl + 0x27
  (0x7003febc)  0x2dad94  ReadMessageFromPort__7BLooperx + 0x50
  (0x7003feec)  0x2da40b  MessageFromPort__7BLooperx + 0x27
  (0x7003ff1c)  0x3a16c7  task_looper__7BWindow + 0x6f
  (0x7003ff7c)  0x2dac8b  _task0___7BLooperPv + 0x3f
  (0x7003ffac)  0x53e0b2  thread_entry + 0x36

Different stack traces have been observed. In this case BMessage::sMsgCache is NULL due to BMessage::_StaticCacheCleanup() having been called already. The general cause seems to be that the main thread has already called exit() while other threads are still running:

kdebug> threads 79
thread         id  state     wait for   object  cpu pri  stack      team  name
0x81c74800     79  waiting   cvar   0x8206260c    -  10  0x82024000   79  ReadOnlyBootPrompt
0x83a63800     90  waiting   cvar   0x820622ec    -  15  0x82051000   79  w>Welcome to Haiku!
0x81c30000     91  waiting   cvar   0x82062288    -  10  0x82055000   79  team 79 debug task
kdebug> sc 79
stack trace for thread 79 "ReadOnlyBootPrompt"
    kernel stack: 0x82024000 to 0x82028000
      user stack: 0x7efef000 to 0x7ffef000
frame               caller     <image>:function + offset
 0 82027794 (+  48) 8006ecd7   <kernel_x86> context_switch(thread*: 0x81c74800, thread*: 0x83a55800) + 0x003f
 1 820277c4 (+  96) 8006f002   <kernel_x86> simple_reschedule() + 0x02e6
 2 82027824 (+  64) 80043b49   <kernel_x86> ConditionVariableEntry<0x82027898>::Wait(uint32: 0x20 (32), int64: 0) + 0x01a1
 3 82027864 (+  80) 800564fd   <kernel_x86>:read_port_etc + 0x018d
 4 820278b4 (+1440) 8007ff7e   <kernel_x86> debug_debugger_message::thread_hit_debug_event_internal(NULL, int32: -2113765620, true, 0x6e72e601) + 0x0322
 5 82027e54 (+  96) 800801fa   <kernel_x86> debug_debugger_message::thread_hit_debug_event(NULL, int32: -2113765620, true) + 0x002e
 6 82027eb4 (+  48) 800802a6   <kernel_x86> debug_debugger_message::thread_hit_serious_debug_event(NULL, int32: -2113765620) + 0x002a
 7 82027ee4 (+  64) 800805c0   <kernel_x86>:user_debug_stop_thread + 0x00a8
 8 82027f24 (+  32) 8006441d   <kernel_x86>:_user_exit_team + 0x0059
 9 82027f44 (+ 100) 801082d2   <kernel_x86>:handle_syscall + 0x00af
user iframe at 0x82027fa8 (end = 0x82028000)
 eax 0x24           ebx 0x5dd27c        ecx 0x7ffeeb40   edx 0xffff0114
 esi 0x7ffeee74     edi 0x0             ebp 0x7ffeeb6c   esp 0x82027fdc
 eip 0xffff0114  eflags 0x207      user esp 0x7ffeeb40
 vector: 0x63, error code: 0x0
10 82027fa8 (+   0) ffff0114   <commpage>:commpage_syscall + 0x0004
11 7ffeeb6c (+  48) 002066a2   </boot/system/bin/ReadOnlyBootPrompt@0x00200000>:unknown + 0x66a2
12 7ffeeb9c (+  48) 002d972f   </boot/system/lib/libbe.so@0x00211000>:unknown + 0xc872f
13 7ffeebcc (+ 496) 002d03d5   </boot/system/lib/libbe.so@0x00211000>:unknown + 0xbf3d5
14 7ffeedbc (+  64) 002db09d   </boot/system/lib/libbe.so@0x00211000>:unknown + 0xca09d
15 7ffeedfc (+  64) 002cef15   </boot/system/lib/libbe.so@0x00211000>:unknown + 0xbdf15
16 7ffeee3c (+ 320) 002065b7   </boot/system/bin/ReadOnlyBootPrompt@0x00200000>:unknown + 0x65b7
17 7ffeef7c (+  48) 00206463   </boot/system/bin/ReadOnlyBootPrompt@0x00200000>:unknown + 0x6463
18 7ffeefac (+  48) 00105d62   </boot/system/runtime_loader@0x00100000>:unknown + 0x5d62
19 7ffeefdc (+   0) 7ffeefec   1580:ReadOnlyBootPrompt_main_stack@0x7efef000 + 0xffffec

Change History (4)

comment:1 by bonefish, 14 years ago

The main thread calls exit() in BootPromptApp::MessageReceived() BTW.

comment:2 by stippi, 14 years ago

Status: newin-progress

Thanks for all the info, I am trying to fix it.

comment:3 by stippi, 14 years ago

Resolution: fixed
Status: in-progressclosed

Should be fixed in hrev36652. Please re-open if not.

comment:4 by mmadia, 11 years ago

Component: Applications/ReadOnlyBootPromptApplications/FirstBootPrompt

Modifying ticket to reflect the renaming of ReadOnlyBootPrompt to FirstBootPrompt.

Note: See TracTickets for help on using tickets.