Discussion:
zendevicedump - Crash/Memory Issue/Questions
James T
2012-11-06 23:25:40 UTC
Permalink
James T [http://community.zenoss.org/people/chip] created the discussion

"zendevicedump - Crash/Memory Issue/Questions"

To view the discussion, visit: http://community.zenoss.org/message/69741#69741

--------------------------------------------------------------
Ran into this problem while trying to do a migration. I ran the following command in order to dump my zenoss devices as per: http://community.zenoss.org/docs/DOC-2501 http://community.zenoss.org/docs/DOC-2501

+[***@hydrus ~]$ zendevicedump -o ~/hydrus_old.xml+

The command appears to execute with no output.
The file "hydrus_old.xml" from the output remains empty.

*I ran an strace on the process and saw output spammed looking like this:*
| brk(0xaf000000)                     | = 0xaf000000 |
| brk(0xaf021000)                     | = 0xaf021000 |
| brk(0xaf079000)                     | = 0xaf079000 |
| brk(0xaf09a000)                     | = 0xaf09a000 |
| brk(0xaf0f1000)                     | = 0xaf0f1000 |
| brk(0xaf112000)                     | = 0xaf0f1000 |

*I watched process in strace and kept checking the memory usage in another terminal.  Eventually it consumed all my physical memory pretty much.*
+[***@hydrus ~]$ date;free -m;ps aux|grep Export+
+Tue Nov  6 14:47:29 PST 2012+
+             total       used       free     shared    buffers     cached+
+Mem:          3289       3171        117          0          0         11+
+-/+ buffers/cache:       3159        129+
+Swap:         1983       1005        978+
+zenoss   26122 86.7 91.0 3136432 3066500 pts/3 R+   14:30  14:52 /opt/zenoss/bin/python /opt/zenoss/Products/ZenRelations/ExportDevices.py -o /home/zenoss/hydrus_old.xml+
+zenoss   26481  0.0  0.0   4024   696 pts/2    R+   14:47   0:00 grep Export+

*Then it crashed with this traceback message:*
+Traceback (most recent call last):+
+  File "/opt/zenoss/Products/ZenRelations/ExportDevices.py", line 229, in <module>+
+    ex.export()+
+  File "/opt/zenoss/Products/ZenRelations/ExportDevices.py", line 215, in export+
+    doc = parseString(buffer.getvalue())+
+  File "/opt/zenoss/lib/python/_xmlplus/dom/minidom.py", line 1925, in parseString+
+    return expatbuilder.parseString(string)+
+  File "/opt/zenoss/lib/python/_xmlplus/dom/expatbuilder.py", line 942, in parseString+
+    return builder.parseString(string)+
+  File "/opt/zenoss/lib/python/_xmlplus/dom/expatbuilder.py", line 223, in parseString+
+    parser.Parse(string, True)+
+  File "/opt/zenoss/lib/python/_xmlplus/dom/expatbuilder.py", line 787, in start_element_handler+
+    aname, EMPTY_PREFIX)+
+  File "/opt/zenoss/lib/python/_xmlplus/dom/minidom.py", line 359, in __init__+
+    d['childNodes'] = NodeList()+
+MemoryError+

*This is what was going on in the strace right before it crashed:*
+mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+brk(0xaf152000)                         = 0xaf0f1000+
+mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+brk(0xaf152000)                         = 0xaf0f1000+
+mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+mmap2(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)+
+rt_sigaction(SIGINT, {SIG_DFL, [], 0}, {0x8101c50, [], 0}, 8) = 0+
+rt_sigaction(SIGUSR1, {SIG_DFL, [], 0}, {0x8101c50, [], 0}, 8) = 0+
+munmap(0xaf0f5000, 67112960)            = 0+
+munmap(0xb30f6000, 51302400)            = 0+
+munmap(0xb7c9f000, 397312)              = 0+
+_llseek(4, -1765, [764187], SEEK_CUR)   = 0+
+write(4, "a\0\0\0H", 5)                 = 5+
+exit_group(1)                           = ?+
+Process 25573 detached+

Would appreciate any input anyone has. : )  Thanks.+
+
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69741#69741]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...