Skip to contentSkip to conversation

init_new_context_skas - new_mm failed, errno = -24

uml-devel Christopher S. Aker 3 participants 7 messages Sep 6, 2007 – Sep 21, 2007 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

2.6.22.6-um

init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24

Kernel panic - not syncing: switch_mm_skas - PTRACE_SWITCH_MM failed, 

errno = 9

EIP: 0000:[<00000000>] CPU: 0 Not tainted EFLAGS: 00000000
Not tainted
EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: 00000000 DS: 0000 ES: 0000

085dbdfc:  [<080818fb>] show_regs+0xeb/0x110
085dbe18:  [<0806b41c>] panic_exit+0x2c/0x50
085dbe28:  [<080973fe>] notifier_call_chain+0x3e/0x60
085dbe48:  [<080974dd>] __atomic_notifier_call_chain+0x2d/0x40
085dbe64:  [<0809751e>] atomic_notifier_call_chain+0x2e/0x40
085dbe80:  [<08087fd2>] panic+0x72/0x110
085dbe9c:  [<0807e85c>] switch_mm_skas+0x5c/0x60
085dbeb4:  [<084b98f4>] schedule+0x2b4/0x5a0
085dbf24:  [<0806837d>] default_idle+0x2d/0x30
085dbf38:  [<0806bc78>] init_idle_skas+0x28/0x30
085dbf48:  [<08068388>] cpu_idle+0x8/0x10
085dbf50:  [<084b92fb>] rest_init+0x5b/0x60
085dbf64:  [<0804889d>] start_kernel+0x1bd/0x220
085dbf84:  [<0806bcac>] start_kernel_proc+0x2c/0x40
085dbf90:  [<0807a190>] run_kernel_thread+0x50/0x60
085dbfcc:  [<0806b9fe>] new_thread_handler+0x7e/0xd0
085dbffc:  [<00000000>] _stext+0xf7fb7f4c/0xc

Is this cause by a still-too-low max_map_count value?

-Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 9 lines · Christopher S. Aker

2.6.22.6-um

init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24

Kernel panic - not syncing: switch_mm_skas - PTRACE_SWITCH_MM failed, 

errno = 9

Is this cause by a still-too-low max_map_count value?

Could be - what was the host's max_map_count?

Jeff

Signature · 10 lines
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#2 lore raw
Quoted 9 lines · Jeff Dike
Quoted 7 lines · Christopher S. Aker

2.6.22.6-um

init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24

Kernel panic - not syncing: switch_mm_skas - PTRACE_SWITCH_MM failed, 

errno = 9

Quoted 5 lines
Quoted 1 line

Is this cause by a still-too-low max_map_count value?

Could be - what was the host's max_map_count?

Jeff

root@atlanta20:~# cat /proc/sys/vm/max_map_count
500000
root@atlanta20:~# free -g
              total       used       free     shared    buffers     cached
Mem:            23          8         15          0          0          7
-/+ buffers/cache:          0         23
Swap:            1          0          1

-Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw
Quoted 10 lines · Christopher S. Aker
Quoted 9 lines · Jeff Dike
Quoted 8 lines · Christopher S. Aker

2.6.22.6-um

init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24 init_new_context_skas - new_mm failed, errno = -24

Kernel panic - not syncing: switch_mm_skas - PTRACE_SWITCH_MM failed,

errno = 9

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

Is this cause by a still-too-low max_map_count value?

Could be - what was the host's max_map_count?

Jeff

errno = 24 means EMFILE (too many open files).

And I read, in mm/mmap.c: do_mmap_pgoff():

        /* Too many mappings? */
        if (mm->map_count > sysctl_max_map_count)
                return -ENOMEM;

While open_proc_mm only returns 0 or -ENOMEM.

So I'm 99% sure that you have indeed too many open files. There is a differnence between EMFILE and ENFILE - I vaguely remember that the 2nd is about ulimit while the first is about the total number of fd's. (man proc should says how to increase it - it is under /proc/sys).

Quoted 7 lines
root@atlanta20:~# cat /proc/sys/vm/max_map_count
500000
root@atlanta20:~# free -g
              total       used       free     shared    buffers     cached
Mem:            23          8         15          0          0          7
-/+ buffers/cache:          0         23
Swap:            1          0          1

Btw, note this:

Quoted 4 lines

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

SourceForge has not implemented AdSense at all, it seems...

Signature · 4 lines
"Doh!" (cit.), I've made another mistake!
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#4 lore raw
Quoted 1 line · Blaisorblade

errno = 24 means EMFILE (too many open files).

Whoops, I mentally turned that into -ENOMEM.

Maybe we should resurrect os_print_error as you suggested and start using it. The current habit of using raw errnos dates from very early, when perror (or strerror - I don't remember which) gave me undebuggable segfaults deep inside libc. Probably, that's not a problem any more.

Jeff

Signature · 10 lines
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#5 lore raw
Quoted 10 lines · Jeff Dike
Quoted 1 line · Blaisorblade

errno = 24 means EMFILE (too many open files).

Whoops, I mentally turned that into -ENOMEM.

Maybe we should resurrect os_print_error as you suggested and start using it. The current habit of using raw errnos dates from very early, when perror (or strerror - I don't remember which) gave me undebuggable segfaults deep inside libc. Probably, that's not a problem any more.

I surely agree. I also think I had introduced os_print_error and exactly for this purpose, even if I can't recall well.

strerror() is not reentrant so it can't be used, but there is strerror_r.

There is no strsignal_r (using strsignal(3) would clear messages as "Kernel mode signal 8"), but I'd suggest to follow the unrecommended but documented practice of using sys_siglist[signr].

Signature · 4 lines
"Doh!" (cit.), I've made another mistake!
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#6 lore raw
In reply to Blaisorblade
Quoted 1 line · Blaisorblade

So I'm 99% sure that you have indeed too many open files.

And this could happen if you have a ton of processes inside the UML, each with its own /proc/mm descriptor.

Jeff

Signature · 10 lines
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel