James T
2012-11-06 23:25:40 UTC
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]
"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]