Project

General

Profile

Issue #306

The memory of charon process abnormal

Added by alma bella about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Affected version:
5.0.2
Resolution:
Duplicate

Description

Dear all:
I meet two problems with strongswan 4.6.4 in linux 2.6.21.7.
The first problem, I establish 70 ipsec tunnels per second with aninstrument, at first the tunnels were established successfully. But about 3 hours later, the instrument send out the IKE INIT packet with nonzero message ID, so that the linux not respond the IKE INIT, the ipsec tunnels could not established and the memory of charon keep rising until exhaust the memory of linux. The message shows me such information: =========================================
Mar1 17:18:47 (none) daemon.info charon: 899[IKE] received message ID 31, expected 0. Ignored
Mar1 17:18:47 (none) daemon.info charon: 134[ENC] parsed IKE_SA_INIT request 28 [ SA KE No V ]
Mar1 17:18:47 (none) daemon.info charon: 134[IKE] received message ID 28, expected 0. Ignored
Mar1 17:18:47 (none) daemon.info charon: 965[NET] received packet: from 10.0.41.39500 to 10.2.0.5500
Mar1 17:18:47 (none) daemon.info charon: 142[NET] received packet: from 10.0.24.166500 to 10.2.0.5500
Mar1 17:18:47 (none) daemon.info charon: 51[NET] received packet: from 10.0.33.68500 to 10.2.0.5500
Mar1 17:18:47 (none) daemon.info charon: 978[ENC] parsed IKE_SA_INIT request 26 [ SA KE No V ]
Mar1 17:18:47 (none) daemon.info charon: 978[IKE] received message ID 26, expected 0. Ignored
Mar1 17:18:47 (none) daemon.info charon: 14[NET] received packet: from 10.0.41.25500 to 10.2.0.5500
Mar1 17:18:47 (none) daemon.info charon: 904[ENC] parsed IKE_SA_INIT request 477 [ SA KE No V ]
Mar1 17:18:47 (none) daemon.info charon: 904[IKE] received message ID 477, expected 0. Ignored
Mar1 17:18:47 (none) daemon.info charon: 937[ENC] parsed IKE_SA_INIT request 61 [ SA KE No V ]
Mar1 17:18:47 (none) daemon.info charon: 937[IKE] received message ID 61, expected 0. Ignored ==================================================
I want to know why the memory of charon keep rising? How to solve such problem?
The second problem, we modify some fields of the IKE INIT and send out to linux with instrument. Thenstrongswan seems abnormal because it couldn’t handle the following normal IKE INIT packet. Why such abnormal IKE INIT packet lead to the strongswan couldn’t handle the following normal IKE INIT packet?


Related issues

Related to Bug #338: Memory of charon keep risingClosed

History

#1 Updated by Martin Willi about 7 years ago

  • Status changed from New to Closed
  • Priority changed from Urgent to Normal
  • Resolution set to Duplicate

#2 Updated by alma bella about 7 years ago

Thank you very much for your reply.
About the second question I add a packet to illustrate what we do to modify some fields of the IKE INIT .
My question still is Why such abnormal IKE INIT packet lead to the strongswan couldn’t handle the following normal IKE INIT packet?

#3 Updated by Andreas Steffen almost 7 years ago

  • Tracker changed from Bug to Issue
  • Assignee changed from alma bella to Martin Willi

#4 Updated by alma clinton over 6 years ago

Hello all:
I meet the problem again after modified the code as you suggestioned. And it is a litter different the memory of charon suddenly rising and exhaust the memory of the linux. The total memory of our experiment environment is 2G. And I checkout the memory of charon per second, and the information is as following:
25502 root S < 101888 8480 42.4 4.9 charon
25502 root S < 101M 8480 54.1 5.0 charon
25502 root S < 101M 8480 51.8 5.0 charon
25502 root S < 101M 8480 48.2 5.0 charon
25502 root S < 101M 8480 47.6 5.0 charon
25502 root S < 101M 8480 54.0 5.0 charon
25502 root S < 101M 8480 53.7 5.0 charon
25502 root S < 101M 8480 48.1 5.0 charon
25502 root S < 101M 8480 49.1 5.0 charon
25502 root S < 102M 8480 48.5 5.0 charon
25502 root S < 102M 8480 53.8 5.0 charon
25502 root S < 102M 8480 53.3 5.0 charon
25502 root S < 103M 8480 42.6 5.1 charon
25502 root S < 103M 8480 48.4 5.1 charon
25502 root S < 103M 8480 53.3 5.1 charon
25502 root S < 103M 8480 51.8 5.1 charon
25502 root S < 103M 8480 41.7 5.1 charon
25502 root D < 1809M 8480 44.6 89.7 charon

charon invoked oom-killer: gfp_mask=0x200d2, order=0, oomkilladj=0
Call Trace:
[<ffffffff8111fa50>] dump_stack+0x8/0x48
[<ffffffff811866a8>] out_of_memory+0x2c0/0x368
[<ffffffff8118864c>] __alloc_pages+0x2dc/0x360
[<ffffffff81183a70>] generic_file_buffered_write+0x198/0x8c8
[<ffffffff81184470>] __generic_file_aio_write_nolock+0x2d0/0x468
[<ffffffff81184678>] generic_file_aio_write+0x70/0x120
[<ffffffff811b4bf4>] do_sync_write+0xcc/0x138
[<ffffffff811ff400>] dump_write+0x20/0x38
[<ffffffff812009b4>] elf_core_dump+0xc2c/0xcc0 [<ffffffff811bd10c>] do_coredump+0x824/0x850 [<ffffffff8115cf14>] get_signal_to_deliver+0x394/0x4d0 [<ffffffff8111c6cc>] do_notify_resume+0x84/0x2d8 [<ffffffff81118e8c>] work_notifysig+0x10/0x18
Mem-info: DMA per-cpu: CPU 0: Hot: hi: 186, btch: 31 usd: 6 Cold: hi: 62, btch: 15 usd: 17 CPU 1: Hot: hi: 186, btch: 31 usd: 30 Cold: hi: 62, btch: 15 usd: 0 CPU 2: Hot: hi: 186, btch: 31 usd: 13 Cold: hi: 62, btch: 15 usd: 14 CPU 3: Hot: hi: 186, btch: 31 usd: 27 Cold: hi: 62, btch: 15 usd: 2 Active:246196 inactive:207860 dirty:0 writeback:0 unstable:0 free:1419 slab:55826 mapped:118 pagetables:1138 bounce:0 DMA free:5676kB min:5744kB low:7180kB high:8616kB active:984784kB inactive:831440kB present:2063832kB pages_scanned:3632728 all_unreclaimable? yes lowmem_reserve[]: 0 0 DMA: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 0*128kB 0*256kB 1*512kB 1*1024kB 0*2048kB 1*4096kB = 5676kB Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 543744 pages of RAM 0 pages of HIGHMEM 29387 reserved pages 257 pages shared 0 pages swap cached
The problem is different from the memory keep rising I thought. I hope someone could help me solve the problem, thank you very much.

Also available in: Atom PDF