NEC IX2015
夏から冬になる。秋がない。写真は沖縄。けっこう寒かった。
デジカメのズームレバーを壊してしまった。
ルータ NEC IX2015 の proxy-dns (DNS cache) に負荷をかけ続けるとルータが再起動する件。
NEC IX2015 を知人の集合住宅(シェアハウス)に設置するために設定し、テストのためしばらく自宅で動かしていた。知人宅は住人が多いため端末数もそれなりに多く、またゲストも多く定期的に訪問する。そんなこともあって気に掛かっていたうちの設定のひとつ DNS proxy/cache で、ちょっと実験のため webalizer の DNS 逆引きでテストしてみようかと思った。webalizer のそれは、設定によってかなりエグい動作をするので、負荷テストのかわりに使用している*1。
結論からいうと正しく対応できなかった。ファームは 8.3.48.
webalizer.conf に設定したのはこれくらい。
DNSChildren 64
IX2015 の関係がありそうなところはこんなもん。IPv4 のみ。
ip ufs-cache max-entries 9600 ip ufs-cache enable ! dns cache enable dns cache max-records 255 dns cache lifetime 300 dns ncache lifetime 60 ! proxy-dns ip enable proxy-dns ip max-sessions 127 proxy-dns ip query-retries 3 proxy-dns ip query-interval 3 ! ! interface FastEthernet0/0.1 description PPPoE encapsulation pppoe auto-connect ppp binding hoge ip address ipcp ip tcp adjust-mss auto ip napt enable ip napt inside list pppoe-napt ip napt translation max-entries 32768 ip napt translation max-entries per-address 2048 ip filter priv 100 out ip filter all-permit 65000 out no shutdown
ix2015-sh(config)# sh proxy-dns Proxy DNS for IPv4 enabled Max sessions 127, life time 90 seconds Query max retries 3, retransmit interval 3 seconds DNS server(s): 61.207.11.153, dynamic (IPCP), FastEthernet0/0.1, priority 100 221.113.139.137, dynamic (IPCP), FastEthernet0/0.1, priority 100 Proxy DNS for IPv6 disabled Max sessions 32, life time 90 seconds Query max retries 4, retransmit interval 5 seconds
この設定では proxy-dns は PPPoE の ipcp でもらってきた DNS サーバに問い合わせる。これで IX2015 の proxy-dns に対して webalizer が激しく逆引きしまくると IX2015 がギブアップする。
ix2015-sh(config)# show memory Calculating configuration memory size... Heap memory: 97% memory used, 3% memory avail Total 57241800 bytes 2117988 bytes free (1934964 clean, 183024 dirty) 55123812 bytes busy (39964144 reserve, 15159668 dynamic)
ヒープが徐々に消費されてゆき 100% に達してしばらくすると死ぬ。すると、コンソールにこんなのが出る。
ix2015-sh(config)# System uptime is 58 minutes CPU is MPC8270A: PVR = 0x80822014, IMMR[16:31] = 0x0a10 CPU Register Context: R00 = 0x0000c0e6 R01 = 0x00b5b6b0 R02 = 0x00968830 R03 = 0x0000f5db R04 = 0x00441f80 R05 = 0x00000000 R06 = 0x006d0000 R07 = 0x006d0000 R08 = 0x006ced50 R09 = 0x03ffee7c R10 = 0x006ced5c R11 = 0x0085c598 R12 = 0x44b5ba84 R13 = 0x00000000 R14 = 0x00000000 R15 = 0xac1000fe R16 = 0xac100101 R17 = 0x00000000 R18 = 0x00870000 R19 = 0x00860000 R20 = 0x00860000 R21 = 0x00b5b6e0 R22 = 0x00880000 R23 = 0x0000649e R24 = 0x0000aa7e R25 = 0x0085c598 R26 = 0x0000002e R27 = 0x00441f80 R28 = 0x00000000 R29 = 0x0000f5db R30 = 0x0085c598 R31 = 0x0000f5db CR = 0x24b5ba44 MSR = 0x00003030 LR = 0x000002a0 SRR0 = 0x00178750 SRR1 = 0x0008b032 SPRG0 = 0x03000000 SPRG1 = 0x00000000 SPRG2 = 0xfe00f1cc SPRG3 = 0x00000001 XER = 0x00000000 CTR = 0x00000000 DAR = 0x00000000 DSISR = 0x00000000 ESR = 0x00000000 EMR = 0xff1f0000 ECR = 0xff1f0000 SIUMCR = 0x4060c000 TESCR1 = 0x00004200 TESCR2 = 0x00000000 PCI_EACR = 0x00000000 PCI_EDCR = 0x00000000 PCI_ECCR = 0x00000000 SIPNR_H = 0x40200000 SIPNR_L = 0xa000c000 SIVEC = 0x00000000 PDTEA = 0x010f5d28 LDTEA = 0x00000000 SDMR = 0x00 PDTEM = 0x24 LDTEM = 0x00 IPSEC_PCI_STS = 0x02a0 IU_PCI_STS = 0xffff Exception Type: machine check (watchdog) (0x00000200) Exception Stack: PC(SRR0) = 0x00178750, SP(R01) = 0x00b5b6b0 Stack Trace: F00: 0x00178868 F01: 0x004429c4 F02: 0x001795d8 F03: 0x00163448 F04: 0x0016361c F05: 0x00562b70 F06: 0x00563114 F07: 0x00027828 F08: 0x00000000 F09: 0x00000000 F10: 0x00000000 F11: 0x00000000 F12: 0x00000000 F13: 0x00000000 F14: 0x00000000 F15: 0x00000000 reboot... NEC Bootstrap Software Copyright (c) 2001-2008 NEC Infrontia All Rights Reserved. %BOOT-INFO: No boot records found, attempting flash load. %BOOT-INFO: Trying flash load, exec-image [ix2010-ms-8.3.48.ldc]. Loading: ######################################################## [OK] Starting at 0x20000 Loading configuration file: startup-configuration. Configuring router subsystems (before IDB proc): done. Constructing IDB(Interface Database): done. Configuring router subsystems (after IDB proc): done. Initializing router subsystems: done. Starting router subsystems: done. All router subsystems coming up. login:
負荷は高くない。
ix2015-sh(config)# sh utilization hi System utilization per 5 seconds(last 5 minutes): 35/26/27 (peak/low/average) (* = average, | = maximum and minimum) 222222222222222222222222232222222222222222222222222222222222 887887887788877887888888858898978788987798968878888789988888 100 90 80 70 60 | 50 | 40 * 30 *************************|********************************** 20 10 +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ 0s 30s 60s 90s 120s 150s 180s 210s 240s 270s 300s System utilization per 1 minute(last 46 minutes): 29/25/27 (peak/low/average) (* = average, | = maximum and minimum) 2222222222222222222222222222222222222222222222 8988888888888888888888888888888888888775555557 100 | 90 | 80 | 70 | 60 | | 50 | | | | | 40 | | || | |||||| | | 30 ********************************************** 20 | ||||||| 10 +----+----+----+----+----+----+----+----+----+----+----+----+ 0m 5m 10m 15m 20m 25m 30m 35m 40m 45m 50m 55m 60m
最初は dns cache max-records を増やして 1024 にしていたり ip ufs-cache max-entries 16384 していたので、そのあたりをデフォルトに戻した。けども、死ぬまでの時間稼ぎにはなるものの、そのうちヒープを 100% 食い潰して死んでしまう。
dns cache 自体を無効にすればメモリのお漏らしはほとんどなくなるけど、遅くなるよなあ。
ふつう webalizer 64 並列で逆引きなんてことはしないのだから、多少のお漏らしには目を瞑って dns cache は(少なめでいいから)設定しておいたほうがいい気がする。reboot 自体は速いので、家庭用アクセスルータとしては復帰も一瞬といえる範囲。*2
IX2015 の名誉のために書いておくと、こんな実験をするまでは一度もクラッシュしたことはない。
ix2015-sh(config)# sh version NEC Portable Internetwork Core Operating System Software IX Series IX2010 (magellan-sec) Software, Version 8.3.48, RELEASE SOFTWARE Compiled May 10-Tue-2011 15:33:32 JST #1 by sw-build, coregen-8.3(48) ROM: System Bootstrap, Version 22.34 System Diagnostic, Version 20.31 System uptime is 31 minutes System woke up by reload, caused by crash System started at Oct 13-Thu-2011 22:40:16 JST System image file is "ix2010-ms-8.3.48.ldc" Processor board ID <2> IX2015 (MPC8270A) processor with 65536K bytes of memory. 3 FastEthernet/IEEE 802.3 interfaces 1 ISDN Basic Rate interface 512K bytes of non-volatile configuration memory. 8192K bytes of processor board System flash (Read/Write) Current configuration is based on "startup-configuration" This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/).
IX シリーズのソフトウェアにはメモリ管理に問題があってクラッシュする、というのをどこかで読んだ記憶がある。また、その問題は 8.4.x などで解決しているらしい(?)けど IX2015 には入らない。
372:afo:2010/06/11(金) 16:35:43 ID:???downup
>>371
この糞スレにいる大多数のファーム乞食はIX2015を使ってる訳で、2015には
適用出来ない8.4系で改善されたとか言われても、それは改善されたとはいわ
無い。結局IX2015はメモリが足りなくなったら勝手に再起動っつー最悪かつ糞みたいな
http://2chnull.info/r/network/1269162000/
バグを放置したまま終了ってことで。