Junos
Reply
Contributor
Cougar
Posts: 12
Registered: ‎11-14-2008
0

How to debug commit script problems

Hello,

 

I have MX960 with RE-S-1300. The current config is around 133k lines or 8 MB conssting a lot of prefix filters. I have one very simple commit script which should enable packet sampling on interfaces with some specific descriptions.

 

Everything works fine but just after one simple config change I couldn't commit it any more. After removing this commit script I suceeded. Then I removed a couple of thousand unused lines from config but still when I enable the script I get errors like these:

 

userr@router# commit check
error: Memory allocation failed
/dev/null:358284: (0) Memory allocation failed : xmlSAX2Characters
error: Memory allocation failed
/dev/null:358292: (0) Extra content at the end of the document
error: error reading configuration: /dev/stdin
error: commit scripts: write failed: Broken pipe
error: 5 errors reported by commit scripts
error: commit script failure

 

RE memory utilization is around 70%

--
Cougar
Juniper Employee
Juniper Employee
xwu
Posts: 2
Registered: ‎11-18-2008
0

Re: How to debug commit script problems

Did you try traceoptions for commit script and see potential detailed error messages? You may also want to check messages file which may already contain the information you are looking for.

 

[edit]
xwu@router# set system scripts commit traceoptions flag ?
Possible completions:
  all                  Trace all operations
  events               Trace important events
  input                Trace script input data
  offline              Generate data for offline development
  output               Trace script output data
  rpc                  Trace script RPCs
  xslt                 Trace the XSLT library

Contributor
Cougar
Posts: 12
Registered: ‎11-14-2008
0

Re: How to debug commit script problems

Is there any way to increase process memory limits? Looks like the soft limit is just too small right now. This is what I get:

 

 

Nov 18 14:19:36 Process's current softlimit [134217728] hardlimit [2147483648]
Nov 18 14:19:36 Process's changed softlimit [134217728] hardlimit [2147483648]
Nov 18 14:19:36 cscript script processing begins
Nov 18 14:19:36 arg: /usr/libexec/ui/cscript
Nov 18 14:19:36 arg: -p
Nov 18 14:19:36 arg: /
Nov 18 14:19:36 arg: -c
Nov 18 14:19:36 arg: /var/run//changes.xml+
Nov 18 14:19:36 arg: -t
Nov 18 14:19:36 arg: /var/run//transients.xml+
Nov 18 14:19:36 arg: -d134217728
Nov 18 14:19:36 arg: -A
Nov 18 14:19:36 arg: -Tcommitscript.log
Nov 18 14:19:36 arg: -F2
Nov 18 14:19:36 arg: -L104857600
Nov 18 14:19:36 arg: -W
Nov 18 14:19:36 arg: -Nall
Nov 18 14:19:36 prep: resource statistics::
Nov 18 14:19:36 prep: cpu: user 0.005081, system 0.005081
Nov 18 14:19:36 prep: data: sbrk 86140
Nov 18 14:19:36 prep: memory: maxrss 21444 (ixrss 1716, idrss 11936, isrss 256)
Nov 18 14:19:36 prep: paging: faults 0, reclaims 138, swaps 0
Nov 18 14:19:36 prep: other: inb 0, outb 0, snd 1, rcv 0, sig 0, csw 0, icsw 5
Nov 18 14:19:36 reading commit script configuration
Nov 18 14:19:44 error: Memory allocation failed

Nov 18 14:19:44 error: [filename: /dev/null] [line: 358268] [input: xmlSAX2Characters] Memory allocation failed : xmlSAX2Characters

Nov 18 14:19:44 /dev/null:358268: error: xmlSAX2Characters: out of memory
Nov 18 14:19:44 <upto junos:group="common-policies-IPV4PEER" junos:changed="changed">/32</upto>
Nov 18 14:19:44 ^
Nov 18 14:19:44 /dev/null:358269: error: xmlSAX2Characters: out of memory
Nov 18 14:19:44 </route-filter>
Nov 18 14:19:44 ^
Nov 18 14:19:44 /dev/null:358270: error: xmlSAX2Characters: out of memory
Nov 18 14:19:44 <route-filter junos:group="common-policies-IPV4PEER" junos:changed="changed">
Nov 18 14:19:44 ^
Nov 18 14:19:44 error: Memory allocation failed

Nov 18 14:19:44 error: [filename: /dev/null] [line: 358278] Extra content at the end of the document

Nov 18 14:19:44 error reading configuration: /dev/stdin
Nov 18 14:19:45 cscript script processing ends
Nov 18 14:19:45 self: resource statistics::
Nov 18 14:19:45 self: cpu: user 2.239666, system 0.244327
Nov 18 14:19:45 self: data: sbrk 188540
Nov 18 14:19:45 self: memory: maxrss 133384 (ixrss 25956, idrss 22814456, isrss 39040)
Nov 18 14:19:45 self: paging: faults 0, reclaims 33442, swaps 0
Nov 18 14:19:45 self: other: inb 0, outb 0, snd 83, rcv 8696, sig 0, csw 2879, icsw 1196

--
Cougar
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.