Opened 44 hours ago

Last modified 23 hours ago

#19360 closed bug

VM page fault related to AVLTreeBase RAMFS — at Version 2

Reported by: dovsienko Owned by: nobody
Priority: normal Milestone: R1/beta6
Component: File Systems/RAMFS Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by waddlesplash)

The problem reproduced two times shortly after booting hrev58538. The first KDL had AVLTreeBase::Remove() in the backtrace, the second had AVLTreeBase::Insert(), both have RAMFS. The factor that triggered the problem is a Perl script, which runs 4 busy workers, each of which uses a few temporary files (TMPDIR=/boot/system/var/shared_memory). System memory usage stays around 450MB, the VM (VirtualBox) has 2GB RAM and 4 CPU cores.

For the second case a complete output of the serial console follows.

vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x0, ip 0xffffffff8012985d, write 1, kernel, exec 0, thread 0x185
PANIC: vm_page_fault: unhandled page fault in kernel space at 0x0, ip 0xffffffff8012985d

Welcome to Kernel Debugging Land...
Thread 389 "pthread func" running on CPU 2
stack trace for thread 389 "pthread func"
    kernel stack: 0xffffffff87007000 to 0xffffffff8700c000
      user stack: 0x00007fa7eeda9000 to 0x00007fa7eede9000
frame                       caller             <image>:function + offset
 0 ffffffff8700b0d0 (+  32) ffffffff80154b30   <kernel_x86_64> arch_debug_call_with_fault_handler + 0x1a
 1 ffffffff8700b120 (+  80) ffffffff800b8848   <kernel_x86_64> debug_call_with_fault_handler + 0x78
 2 ffffffff8700b180 (+  96) ffffffff800b9f34   <kernel_x86_64> kernel_debugger_loop(char const*, char const*, __va_list_tag*, int) + 0xf4
 3 ffffffff8700b1d0 (+  80) ffffffff800ba2ce   <kernel_x86_64> kernel_debugger_internal(char const*, char const*, __va_list_tag*, int) + 0x6e
 4 ffffffff8700b2c0 (+ 240) ffffffff800ba667   <kernel_x86_64> panic + 0xb7
 5 ffffffff8700b3b0 (+ 240) ffffffff8013b248   <kernel_x86_64> vm_page_fault + 0x298
 6 ffffffff8700b3f0 (+  64) ffffffff80160c6e   <kernel_x86_64> x86_page_fault_exception + 0x15e
 7 ffffffff8700b768 (+ 888) ffffffff8015640c   <kernel_x86_64> int_bottom + 0x80
kernel iframe at 0xffffffff8700b768 (end = 0xffffffff8700b830)
 rax 0x0                   rbx 0xffffffff8700b8a0    rcx 0xffffffff8a97e608
 rdx 0xffffffff8a97e818    rsi 0xffffffff8a97e610    rdi 0xffffffff82076700
 rbp 0xffffffff8700b850     r8 0xffffffff8a97ecd0     r9 0x7e
 r10 0x0                   r11 0x0                   r12 0xffffffff82076700
 r13 0xffffffff8a97e818    r14 0xffffffff8700b860    r15 0xffffffff8a97ecd0
 rip 0xffffffff8012985d    rsp 0xffffffff8700b838 rflags 0x10292
 vector: 0xe, error code: 0x2
 8 ffffffff8700b850 (+ 232) ffffffff8012985d   <kernel_x86_64> AVLTreeBase::_RotateLeft(AVLTreeNode**) + 0x0d
 9 ffffffff8700ba90 (+ 576) ffffffff80129a49   <kernel_x86_64> AVLTreeBase::_Insert(AVLTreeNode*) + 0xd9
10 ffffffff8700baa0 (+  16) ffffffff80129ab9   <kernel_x86_64> AVLTreeBase::Insert(AVLTreeNode*) + 0x09
11 ffffffff8700bb10 (+ 112) ffffffff8112d170   </boot/system/add-ons/kernel/file_systems/ramfs> SizeIndex::Changed[clone .localalias] (Node*, long) + 0x110
12 ffffffff8700bb40 (+  48) ffffffff81121f53   </boot/system/add-ons/kernel/file_systems/ramfs> File::SetSize[clone .localalias] (long) + 0x63
13 ffffffff8700bb90 (+  80) ffffffff81124d16   </boot/system/add-ons/kernel/file_systems/ramfs> ramfs_open(fs_volume*, fs_vnode*, int, void**) + 0x146
14 ffffffff8700bbd0 (+  64) ffffffff8010141f   <kernel_x86_64> open_vnode(vnode*, int, bool) + 0x3f
15 ffffffff8700bd70 (+ 416) ffffffff80107f68   <kernel_x86_64> create_vnode(vnode*, char const*, int, int, bool) + 0x4b8
16 ffffffff8700bec0 (+ 336) ffffffff8010ad42   <kernel_x86_64> file_create(int, char*, int, int, bool) + 0x62
17 ffffffff8700bf20 (+  96) ffffffff8011123b   <kernel_x86_64> _user_open + 0xcb
18 ffffffff8700bf30 (+  16) ffffffff8015670f   <kernel_x86_64> x86_64_syscall_entry + 0xfb
user iframe at 0xffffffff8700bf30 (end = 0xffffffff8700bff8)
 rax 0x71                  rbx 0x7fa7eede8a73        rcx 0x21bf2624c7c
 rdx 0x641                 rsi 0x11f15e1c38f0        rdi 0xffffff9c
 rbp 0x7fa7eede8820         r8 0x7fa7eede8a73         r9 0xffffffff
 r10 0x1a4                 r11 0x202                 r12 0x601
 r13 0x11f15e1c38f0        r14 0x1b6                 r15 0x11f15d8f0740
 rip 0x21bf2624c7c         rsp 0x7fa7eede87b8     rflags 0x202
 vector: 0x63, error code: 0x0
19 00007fa7eede8820 (+   0) 0000021bf2624c7c   </boot/system/lib/libroot.so> _kern_open + 0x0c
20 00007fa7eede8850 (+  48) 000000c9e58e450b   </boot/system/lib/perl5/5.40.0/x> Perl_debstack (nearest) + 0xdd9
21 00007fa7eede88c0 (+ 112) 000000c9e592f688   </boot/system/lib/perl5/5.40.0/x> PerlIOUnix_open + 0xfe
22 00007fa7eede8950 (+ 144) 000000c9e592e6e1   </boot/system/lib/perl5/5.40.0/x> PerlIOBuf_open + 0x150
23 00007fa7eede89f0 (+ 160) 000000c9e5930ea2   </boot/system/lib/perl5/5.40.0/x> PerlIO_openn + 0x1a8
24 00007fa7eede8ac0 (+ 208) 000000c9e58e50e6   </boot/system/lib/perl5/5.40.0/x> Perl_debstack (nearest) + 0x19b4
25 00007fa7eede8b40 (+ 128) 000000c9e5985a66   </boot/system/lib/perl5/5.40.0/x> Perl_sortsv (nearest) + 0x263a
26 00007fa7eede8b60 (+  32) 000000c9e59ecd26   </boot/system/lib/perl5/5.40.0/x> Perl_runops_standard + 0x16
27 00007fa7eede8cc0 (+ 352) 000000c9e58ce378   </boot/system/lib/perl5/5.40.0/x> Perl_call_sv + 0x432
28 00007fa7eede8d80 (+ 192) 000000e859615de2   </boot/system/lib/perl5/5.40.0/x> _init (nearest) + 0xe5a
29 00007fa7eede8df0 (+ 112) 000000e859617c6f   </boot/system/lib/perl5/5.40.0/x> _init (nearest) + 0x2ce7
30 00007fa7eede8e10 (+  32) 0000021bf26338d8   </boot/system/lib/libroot.so> pthread_exit (nearest) + 0x38
31 0000000000000000 (+   0) 00007fffea272258   10712:commpage@0x00007fffea272000 + 0x258
kdebug> 

Change History (3)

by dovsienko, 44 hours ago

the first KDL

comment:1 by dovsienko, 44 hours ago

For the fist KDL the diagnostics were as follows:

kdebug> bt
bt
stack trace for thread 35462 "pthread func"
    kernel stack: 0xffffffff8647d000 to 0xffffffff86482000
      user stack: 0x00007fe7d2a8f000 to 0x00007fe7d2acf000
frame                       caller             <image>:function + offset
 0 ffffffff86481090 (+  32) ffffffff800bb5f9   <kernel_x86_64> invoke_command_trampoline(void*) + 0x19
 1 ffffffff864810b0 (+  32) ffffffff80154b30   <kernel_x86_64> arch_debug_call_with_fault_handler + 0x1a
 2 ffffffff86481100 (+  80) ffffffff800b8848   <kernel_x86_64> debug_call_with_fault_handler + 0x78
 3 ffffffff86481160 (+  96) ffffffff800bb84f   <kernel_x86_64> invoke_debugger_command + 0xef
 4 ffffffff864811a0 (+  64) ffffffff800bb9e6   <kernel_x86_64> invoke_pipe_segment(debugger_command_pipe*, int, char*) + 0x116
 5 ffffffff864811f0 (+  80) ffffffff800bbb0c   <kernel_x86_64> invoke_debugger_command_pipe + 0x9c
 6 ffffffff86481230 (+  64) ffffffff800bdd66   <kernel_x86_64> ExpressionParser::_ParseCommandPipe(int&) + 0x1e6
 7 ffffffff86481270 (+  64) ffffffff800bf2cd   <kernel_x86_64> ExpressionParser::EvaluateCommand(char const*, int&) + 0x43d
 8 ffffffff86481360 (+ 240) ffffffff800bf8ff   <kernel_x86_64> evaluate_debug_command + 0x12f
 9 ffffffff864813c0 (+  96) ffffffff800b9fd8   <kernel_x86_64> kernel_debugger_loop(char const*, char const*, __va_list_tag*, int) + 0x198
10 ffffffff86481410 (+  80) ffffffff800ba2ce   <kernel_x86_64> kernel_debugger_internal(char const*, char const*, __va_list_tag*, int) + 0x6e
11 ffffffff86481500 (+ 240) ffffffff800ba667   <kernel_x86_64> panic + 0xb7
12 ffffffff864815f0 (+ 240) ffffffff8013b248   <kernel_x86_64> vm_page_fault + 0x298
13 ffffffff86481630 (+  64) ffffffff80160c6e   <kernel_x86_64> x86_page_fault_exception + 0x15e
14 ffffffff86481988 (+ 856) ffffffff8015640c   <kernel_x86_64> int_bottom + 0x80
kernel iframe at 0xffffffff86481988 (end = 0xffffffff86481a50)
 rax 0x1                   rbx 0xffffffffa3e96d20    rcx 0x0
 rdx 0xffffffffa3e96db0    rsi 0xffffffffa3758c68    rdi 0xffffffff8207c4c0
 rbp 0xffffffff86481a90     r8 0xffffffff86481930     r9 0xffffffff864819e0
 r10 0xffffffff8207c4c0    r11 0x1                   r12 0xffffffff8207c4c0
 r13 0x0                   r14 0xffffffffa3758c60    r15 0xffffffffa3e96d30
 rip 0xffffffff80129da2    rsp 0xffffffff86481a50 rflags 0x10246
 vector: 0xe, error code: 0x2
15 ffffffff86481a90 (+ 264) ffffffff80129da2   <kernel_x86_64> AVLTreeBase::_Remove(AVLTreeNode*) + 0x92
16 ffffffff86481aa0 (+  16) ffffffff80129f79   <kernel_x86_64> AVLTreeBase::Remove(AVLTreeNode*) + 0x09
17 ffffffff86481b10 (+ 112) ffffffff8112d103   </boot/system/add-ons/kernel/file_systems/ramfs> SizeIndex::Changed[clone .localalias] (Node*, long) + 0xa3
18 ffffffff86481b40 (+  48) ffffffff81121f53   </boot/system/add-ons/kernel/file_systems/ramfs> File::SetSize[clone .localalias] (long) + 0x63
19 ffffffff86481b90 (+  80) ffffffff81124d16   </boot/system/add-ons/kernel/file_systems/ramfs> ramfs_open(fs_volume*, fs_vnode*, int, void**) + 0x146
20 ffffffff86481bd0 (+  64) ffffffff8010141f   <kernel_x86_64> open_vnode(vnode*, int, bool) + 0x3f
21 ffffffff86481d70 (+ 416) ffffffff80107f68   <kernel_x86_64> create_vnode(vnode*, char const*, int, int, bool) + 0x4b8
22 ffffffff86481ec0 (+ 336) ffffffff8010ad42   <kernel_x86_64> file_create(int, char*, int, int, bool) + 0x62
23 ffffffff86481f20 (+  96) ffffffff8011123b   <kernel_x86_64> _user_open + 0xcb
24 ffffffff86481f30 (+  16) ffffffff8015670f   <kernel_x86_64> x86_64_syscall_entry + 0xfb
user iframe at 0xffffffff86481f30 (end = 0xffffffff86481ff8)
 rax 0x71                  rbx 0x7fe7d2ace5f3        rcx 0xb3b6652c7c
 rdx 0x641                 rsi 0x11103bcd2a80        rdi 0xffffff9c
 rbp 0x7fe7d2ace3a0         r8 0x7fe7d2ace5f3         r9 0xffffffff
 r10 0x1a4                 r11 0x202                 r12 0x601
 r13 0x11103bcd2a80        r14 0x1b6                 r15 0x11103b3fd900
 rip 0xb3b6652c7c          rsp 0x7fe7d2ace338     rflags 0x202
 vector: 0x63, error code: 0x0
25 00007fe7d2ace3a0 (+   0) 000000b3b6652c7c   </boot/system/lib/libroot.so> _kern_open + 0x0c
26 00007fe7d2ace3d0 (+  48) 00000143f429150b   </boot/system/lib/perl5/5.40.0/x> Perl_debstack (nearest) + 0xdd9
27 00007fe7d2ace440 (+ 112) 00000143f42dc688   </boot/system/lib/perl5/5.40.0/x> PerlIOUnix_open + 0xfe
28 00007fe7d2ace4d0 (+ 144) 00000143f42db6e1   </boot/system/lib/perl5/5.40.0/x> PerlIOBuf_open + 0x150
29 00007fe7d2ace570 (+ 160) 00000143f42ddea2   </boot/system/lib/perl5/5.40.0/x> PerlIO_openn + 0x1a8
30 00007fe7d2ace640 (+ 208) 00000143f42920e6   </boot/system/lib/perl5/5.40.0/x> Perl_debstack (nearest) + 0x19b4
31 00007fe7d2ace6c0 (+ 128) 00000143f4332a66   </boot/system/lib/perl5/5.40.0/x> Perl_sortsv (nearest) + 0x263a
32 00007fe7d2ace6e0 (+  32) 00000143f4399d26   </boot/system/lib/perl5/5.40.0/x> Perl_runops_standard + 0x16
33 00007fe7d2ace840 (+ 352) 00000143f427b378   </boot/system/lib/perl5/5.40.0/x> Perl_call_sv + 0x432
34 00007fe7d2ace900 (+ 192) 00000189a884fde2   </boot/system/lib/perl5/5.40.0/x> _init (nearest) + 0xe5a
35 00007fe7d2ace970 (+ 112) 00000189a8851c6f   </boot/system/lib/perl5/5.40.0/x> _init (nearest) + 0x2ce7
36 00007fe7d2ace990 (+  32) 000000b3b66618d8   </boot/system/lib/libroot.so> pthread_exit (nearest) + 0x38
37 0000000000000000 (+   0) 00007fffffca9258   2773733:commpage@0x00007fffffca9000 + 0x258
kdebug> message
message
PANIC: vm_page_fault: unhandled page fault in kernel space at 0x0, ip 0xffffffff80129da2

kdebug> 

comment:2 by waddlesplash, 44 hours ago

Description: modified (diff)
Platform: x86-64All
Note: See TracTickets for help on using tickets.