sendto系統調用失敗,錯誤爲「沒有可用的緩衝區空間」,錯誤代碼爲「ENOMEM」。這似乎是sendto中kmalloc的失敗。當我讀到它時,我瞭解到它可能會因連續內存不可用而失敗。但是,系統有足夠的空閒內存。我不確定爲什麼kmalloc會失敗。sendto失敗UNIX域套接字
PS:我正在嵌入式硬件中運行應用程序。當SENDTO失敗
錯誤消息:
MYAPP: page allocation failure. order:5, mode:0x4d0
[<c002b2a8>] (unwind_backtrace+0x0/0xcc) from [<c0063de0>] (__alloc_pages_internal+0x39c/0x3bc)
[<c0063de0>] (__alloc_pages_internal+0x39c/0x3bc) from [<c0294f40>] (cache_alloc_refill+0x264/0x514)
[<c0294f40>] (cache_alloc_refill+0x264/0x514) from [<c007a7e0>] (__kmalloc+0x84/0xd8)
[<c007a7e0>] (__kmalloc+0x84/0xd8) from [<c0213f88>] (__alloc_skb+0x44/0xf4)
[<c0213f88>] (__alloc_skb+0x44/0xf4) from [<c020fa2c>] (sock_alloc_send_pskb+0x94/0x2f8)
[<c020fa2c>] (sock_alloc_send_pskb+0x94/0x2f8) from [<c020fca8>] (sock_alloc_send_skb+0x18/0x1c)
[<c020fca8>] (sock_alloc_send_skb+0x18/0x1c) from [<c0273830>] (unix_dgram_sendmsg+0x168/0x44c)
[<c0273830>] (unix_dgram_sendmsg+0x168/0x44c) from [<c020d47c>] (sock_sendmsg+0xac/0xcc)
[<c020d47c>] (sock_sendmsg+0xac/0xcc) from [<c020e3fc>] (sys_sendto+0xb0/0xd4)
[<c020e3fc>] (sys_sendto+0xb0/0xd4) from [<c0025c00>] (ret_fast_syscall+0x0/0x2c)
Mem-info:
Normal per-cpu:
CPU 0: hi: 18, btch: 3 usd: 0
Active_anon:3321 active_file:194 inactive_anon:3324
inactive_file:2449 unevictable:173 dirty:0 writeback:0 unstable:0
free:4348 slab:929 mapped:1186 pagetables:115 bounce:0
Normal free:17392kB min:1016kB low:1268kB high:1524kB active_anon:13284kB inactive_anon:13296kB active_file:776kB inactive_file:9796kB unevictable:692kB present:65024kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 418*4kB 1251*8kB 347*16kB 3*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 17392kB
2876 total pagecache pages
16384 pages of RAM
4485 free pages
1097 reserved pages
929 slab pages
1401 pages shared
0 pages swap cached
應用程序試圖發送88K字節的數據 – Shashikiran