Opened 11 years ago

Closed 5 months ago

#3109 closed bug (fixed)

[kernel] vm_area_release_ref: area not found in aspace's area list

Reported by: diver Owned by: nobody
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Happend while I tried to search for all files ad then selected them all and pressed alt+i.

Attachments (2)

kdl.png (67.2 KB) - added by diver 11 years ago.
back_trace.png (51.5 KB) - added by diver 11 years ago.

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by diver

Attachment: kdl.png added

comment:1 Changed 11 years ago by diver

I've tried to reproduce it, but now app_server hangs and after several seconds i can't even move my mouse.

comment:2 Changed 11 years ago by diver

I can reproduce app_server deadlock.

Changed 11 years ago by diver

Attachment: back_trace.png added

comment:3 Changed 11 years ago by diver

I pressed F12 to take screenshot after app_server freeze, typed bt, but it stoped to write stack trace at the bottom and hung. Pressing F12 doesn't work anymore.

comment:4 Changed 11 years ago by anevilyak

Just curious, was it still searching for files at this point or did you wait until the query was done?

comment:5 Changed 11 years ago by anevilyak

Confirmed here with ~7000 files. Interestingly, the problem appears to be that app_server dies. At least after the deadlock hitting f12 to go to KDL doesn't show app_server in the team list:

kdebug> teams
team           id  parent      name
0x8126b4c8    124  0x81248b28  media_addon_server
0x8117e7f8     62  0x8117e198  net_server
0x81248198     94  0x8117e198  Tracker
0x8117e198      1  0x00000000  kernel_team
0x812484c8     95  0x8117e198  Deskbar
0x81248990     98  0x8117e198  Terminal
0x8126b000    161  0x81248990  sh
0x81248b28     99  0x8117e198  media_server
0x81248cc0    100  0x8117e198  midi_server
0x81248e58    101  0x8117e198  print_server
0x8117eb28     81  0x8117e198  syslog_daemon
0x81248330     85  0x8117e198  input_server
0x8117e4c8     54  0x8117e198  registrar
0x8117e660     61  0x8117e198  debug_server

comment:6 Changed 11 years ago by anevilyak

Tracker still seems to be around though. I wonder if it's possible for app_server to have exhausted its stack.

comment:7 Changed 11 years ago by anevilyak

Last few entries from syslog:

KERN: heap_add_area: area 19043 added to medium heap 0x81964000 - usable range 0x94401000 - 0x94800000
KERN: vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x42c, ip 0x27ce9a, write 0, user 1, thread 0x8a
KERN: vm_page_fault: thread "a:94:x-vnd.Be-TRAK" (138) in team "app_server" (63) tried to read address 0x42c, ip 0x27ce9a ("app_server_seg0ro" +0x7ce9a)
KERN: stack trace:
KERN:   0x00271fe7 (app_server_seg0ro + 0x71fe7)
KERN:   0x0026c46f (app_server_seg0ro + 0x6c46f)
KERN:   0x0026bd1b (app_server_seg0ro + 0x6bd1b)
KERN:   0x002675a8 (app_server_seg0ro + 0x675a8)
KERN:   0x006f49b8 (libroot.so_seg0ro + 0x259b8)
KERN:   0x7038cfec (a:94:x-vnd.Be-TRAK_138_stack + 0x3ffec)
KERN: vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x0, ip 0x800cf994, write 0, user 0, thread 0x8a
KERN: user_debug_exception_occurred(): Failed to install debugger: thread: 138: No more ports available

comment:8 Changed 11 years ago by anevilyak

So the implication here appears to be that we ran out of ports (at least on my box with 1GB of RAM, 4096 ports max), but oddly the app_server's pathways for creating new ports (i.e. new window, new BApplication) all check if port creation failed and abort correctly, so I'm wondering how this managed to segfault.

comment:9 Changed 11 years ago by anevilyak

I haven't managed to duplicate the KDL mentioned initially in the ticket either btw.

comment:10 Changed 11 years ago by anevilyak

Resolved version of that stack trace:

00071c60 T ServerApp::_CreateWindow(long, BPrivate::LinkReceiver &, long &)
0006bdc0 T ServerApp::_DispatchMessage(long, BPrivate::LinkReceiver &)
0006bbb0 T ServerApp::_MessageLooper(void)
00067470 T MessageLooper::_MessageLooper(void)
00067580 T MessageLooper::_message_thread(void *)

comment:11 Changed 5 years ago by diver

Version: R1/pre-alpha1R1/Development

On a current nightly hrev47276 Tracker dies and Debugger doesn't start because no more ports available.

comment:12 Changed 2 years ago by axeld

Owner: changed from axeld to nobody
Status: newassigned

comment:13 Changed 5 months ago by waddlesplash

Resolution: fixed
Status: assignedclosed

Well then that should be its own ticket; this issue is fixed then, anyway.

Note: See TracTickets for help on using tickets.