GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
812 stars 263 forks source link

[2.0.0dev2] : crash when importing appliance #705

Closed AJNOURI closed 8 years ago

AJNOURI commented 8 years ago

GNS3 version is 2.0.0dev2 Python version is 3.5.2 (64-bit) with utf-8 encoding Qt version is 5.5.1 PyQt version is 5.5.1 SIP version is 4.17

Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial


GN3 crashes when trying to import a qemu vm template:

selection_446

2016-10-02 06:41:34 DEBUG progress_dialog.py:98 WaitForLambdaWorker thread started 2016-10-02 06:41:34 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/Downloads QObject::connect: Cannot queue arguments of type 'QTextBlock' (Make sure 'QTextBlock' is registered using qRegisterMetaType().) QObject::connect: Cannot queue arguments of type 'QTextCursor' (Make sure 'QTextCursor' is registered using qRegisterMetaType().) 2016-10-02 06:41:34 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/GNS3/images/QEMU 2016-10-02 06:41:34 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/Downloads 2016-10-02 06:41:34 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/GNS3/images/QEMU 2016-10-02 06:41:34 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/Downloads 2016-10-02 06:41:34 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/GNS3/images/QEMU 2016-10-02 06:41:34 DEBUG progress_dialog.py:109 WaitForLambdaWorker thread finished 2016-10-02 06:41:34 DEBUG progress_dialog.py:128 WaitForLambdaWorker thread is being destroyed 2016-10-02 06:41:34 DEBUG progress_dialog.py:135 WaitForLambdaWorker thread destroyed Fatal Python error: Segmentation fault

Current thread 0x00007ffb36d6f700 (most recent call first): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 410 in loadPath File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 344 in openApplianceActionSlot File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main.py", line 281 in main File "/usr/local/bin/gns3", line 9 in Segmentation fault (core dumped) ajn@ubuntu:~$

julien-duponchelle commented 8 years ago

Thanks, as usual the stack is not very usefull when we have a segfault. I will need you for testing my patches.

Can you reproduce it easily ?

julien-duponchelle commented 8 years ago

Can you test with last GUI code. If it's crash I will reopen the issues.

Thanks a lot

AJNOURI commented 8 years ago

It crashes systematically. Just updated both gui & server, same behavior:

debug file: debug-crash-1347.zip

2016-10-03 04:51:14 DEBUG progress_dialog.py:98 WaitForLambdaWorker thread started 2016-10-03 04:51:14 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/Downloads QObject::connect: Cannot queue arguments of type 'QTextBlock' (Make sure 'QTextBlock' is registered using qRegisterMetaType().) QObject::connect: Cannot queue arguments of type 'QTextCursor' (Make sure 'QTextCursor' is registered using qRegisterMetaType().) 2016-10-03 04:51:14 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/GNS3/images/QEMU 2016-10-03 04:51:14 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/Downloads 2016-10-03 04:51:14 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/GNS3/images/QEMU 2016-10-03 04:51:14 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/Downloads 2016-10-03 04:51:14 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/GNS3/images/QEMU 2016-10-03 04:51:14 DEBUG progress_dialog.py:109 WaitForLambdaWorker thread finished 2016-10-03 04:51:14 DEBUG progress_dialog.py:128 WaitForLambdaWorker thread is being destroyed 2016-10-03 04:51:14 DEBUG progress_dialog.py:135 WaitForLambdaWorker thread destroyed Fatal Python error: Segmentation fault

Current thread 0x00007ff6c1db1700 (most recent call first): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 410 in loadPath File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 344 in openApplianceActionSlot File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main.py", line 281 in main File "/usr/local/bin/gns3", line 9 in Segmentation fault (core dumped)

julien-duponchelle commented 8 years ago

Ok better info you can try with the last gns3-gui I think I fixed the issue

AJNOURI commented 8 years ago

Same:

debug file: debug-1638.zip

I am wondering, am I cloning the branch correctly?

rm -R gns3-gui
git clone -b 2.0 https://github.com/GNS3/gns3-gui
sudo python3 setup.py install

rm -R gns3-server
git clone -b 2.0  https://github.com/GNS3/gns3-server
sudo python3 setup.py install

f-8173-9323be14ac75/notifications {} 2016-10-03 07:33:33 DEBUG local_config.py:386 Section MainWindow has not changed. Skip saving configuration 2016-10-03 07:33:33 DEBUG local_config.py:386 Section MainWindow has not changed. Skip saving configuration 2016-10-03 07:33:33 DEBUG http_client.py:424 GET http://127.0.0.1:3080/v2/projects/7b9c0d2c-9520-4f1f-8173-9323be14ac75/nodes {} 2016-10-03 07:33:33 DEBUG http_client.py:564 Decoding response from http://admin@127.0.0.1:3080/v2/projects/7b9c0d2c-9520-4f1f-8173-9323be14ac75/nodes response 200 2016-10-03 07:33:33 DEBUG http_client.py:572 [] 2016-10-03 07:33:33 DEBUG http_client.py:424 GET http://127.0.0.1:3080/v2/projects/7b9c0d2c-9520-4f1f-8173-9323be14ac75/links {} 2016-10-03 07:33:33 DEBUG http_client.py:564 Decoding response from http://admin@127.0.0.1:3080/v2/projects/7b9c0d2c-9520-4f1f-8173-9323be14ac75/links response 200 2016-10-03 07:33:33 DEBUG http_client.py:572 [] 2016-10-03 07:33:33 DEBUG http_client.py:424 GET http://127.0.0.1:3080/v2/projects/7b9c0d2c-9520-4f1f-8173-9323be14ac75/drawings {} 2016-10-03 07:33:34 DEBUG http_client.py:564 Decoding response from http://admin@127.0.0.1:3080/v2/projects/7b9c0d2c-9520-4f1f-8173-9323be14ac75/drawings response 200 2016-10-03 07:33:34 DEBUG http_client.py:572 [] 2016-10-03 07:33:41 DEBUG analytics.py:113 Send stats to Google Analytics: v=1&tid=UA-55817127-3&cid=856fc1a4-a431-4973-8ccb-b454f47a373c&aip=1&t=screenview&an=GNS3&av=2.0.0dev2&ua=Mozilla/5.0%20%28X11%3B%20Linux%20x86_64%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Safari/537.36%20%20GNS3/2.0.0dev2&cd=Appliance%20Wizard&ds=gns3-gui&sr=1024x768&ul=en_us 2016-10-03 07:33:44 DEBUG progress_dialog.py:98 WaitForLambdaWorker thread started 2016-10-03 07:33:44 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/Downloads QObject::connect: Cannot queue arguments of type 'QTextBlock' (Make sure 'QTextBlock' is registered using qRegisterMetaType().) QObject::connect: Cannot queue arguments of type 'QTextCursor' (Make sure 'QTextCursor' is registered using qRegisterMetaType().) 2016-10-03 07:33:44 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/GNS3/images/QEMU 2016-10-03 07:33:44 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/Downloads 2016-10-03 07:33:44 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/GNS3/images/QEMU 2016-10-03 07:33:44 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/Downloads 2016-10-03 07:33:44 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/GNS3/images/QEMU 2016-10-03 07:33:44 DEBUG progress_dialog.py:109 WaitForLambdaWorker thread finished 2016-10-03 07:33:44 DEBUG progress_dialog.py:128 WaitForLambdaWorker thread is being destroyed 2016-10-03 07:33:44 DEBUG progress_dialog.py:135 WaitForLambdaWorker thread destroyed Fatal Python error: Segmentation fault

Current thread 0x00007fd2ac85a700 (most recent call first): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 411 in loadPath File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 345 in openApplianceActionSlot File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/qt/init.py", line 223 in func_wrapper File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main.py", line 281 in main File "/usr/local/bin/gns3", line 9 in Segmentation fault (core dumped)

AJNOURI commented 8 years ago

Actually, the last commit is there:

~/gns3-gui$ git log commit 8e56b59bb8c15ed43f0ec0d3cffe0f888d6057ff Author: Julien Duponchelle julien@gns3.net Date: Mon Oct 3 15:38:56 2016 +0200

Try to fix the a segfault when importing appliance

Fix https://github.com/GNS3/gns3-server/issues/705
julien-duponchelle commented 8 years ago

Could you try with last commits?

julien-duponchelle commented 8 years ago

Thanks for the help

AJNOURI commented 8 years ago

debug file: debug-2023.zip

2016-10-03 11:31:41 DEBUG progress_dialog.py:98 WaitForLambdaWorker thread started 2016-10-03 11:31:41 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/Downloads QObject::connect: Cannot queue arguments of type 'QTextBlock' (Make sure 'QTextBlock' is registered using qRegisterMetaType().) QObject::connect: Cannot queue arguments of type 'QTextCursor' (Make sure 'QTextCursor' is registered using qRegisterMetaType().) 2016-10-03 11:31:41 DEBUG registry.py:55 Search images linux-microcore-6.4.img (877419f975c4891c019947ceead5c696) in /home/ajn/GNS3/images/QEMU 2016-10-03 11:31:41 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/Downloads 2016-10-03 11:31:41 DEBUG registry.py:55 Search images linux-microcore-4.0.2-clean.img (e13d0d1c0b3999ae2386bba70417930c) in /home/ajn/GNS3/images/QEMU 2016-10-03 11:31:41 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/Downloads 2016-10-03 11:31:41 DEBUG registry.py:55 Search images linux-microcore-3.4.1.img (fa2ec4b1fffad67d8103c3391bbf9df2) in /home/ajn/GNS3/images/QEMU 2016-10-03 11:31:41 DEBUG progress_dialog.py:109 WaitForLambdaWorker thread finished 2016-10-03 11:31:41 DEBUG progress_dialog.py:128 WaitForLambdaWorker thread is being destroyed 2016-10-03 11:31:41 DEBUG progress_dialog.py:135 WaitForLambdaWorker thread destroyed Fatal Python error: Segmentation fault

Current thread 0x00007f8c8d723700 (most recent call first): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 411 in loadPath File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main_window.py", line 345 in openApplianceActionSlot File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/qt/init.py", line 223 in func_wrapper File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/main.py", line 281 in main File "/usr/local/bin/gns3", line 9 in Segmentation fault (core dumped)

julien-duponchelle commented 8 years ago

At which step of the wizard you have the issue? When the wizard is finish or at specific step?

I don't reproduce it on my xenial :( Perhaps @grossmj will have more luck

AJNOURI commented 8 years ago

Hi @noplay, here is a short video showing the issue:

julien-duponchelle commented 8 years ago

Thanks I have notice something that could be a clue. You run GNS3 in a VMware VM? It's on ESXi or Workstation?

On Tue, Oct 4, 2016 at 1:19 PM AJ NOURI notifications@github.com wrote:

Hi @noplay https://github.com/noplay, here is a short video https://youtu.be/Wpog5sERDsw showing the issue:

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/GNS3/gns3-server/issues/705#issuecomment-251361276, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVFXVbaIuX71ywFQ7efkw3WL8O2O-BPks5qwjZZgaJpZM4KMBGz .

AJNOURI commented 8 years ago

Workstation. For info. selection_457

julien-duponchelle commented 8 years ago

Funny I finally managed to have a crash. It's happen only when started with I have --debug in a Ubuntu VM in a VMware.

julien-duponchelle commented 8 years ago

I found this on how to use gdb: https://wiki.python.org/moin/DebuggingWithGdb

And I got this stack: capture d ecran 2016-10-05 a 10 44 42

julien-duponchelle commented 8 years ago

Ok I think I solved the issue with commit https://github.com/GNS3/gns3-gui/commit/c2eb528a444c8b904eab3e81e9a8f214d1c63a35

The log could be send to the console from a non UI thread and crash in rare conditions. Could you test?

Thanks a lot it was hard to catch but could impact anybody one day.

AJNOURI commented 8 years ago

It didn't get to the next screen of import:

selection_464

\ Exception detected, traceback information saved in /home/ajn/.config/GNS3/exceptions.log **

PLEASE REPORT ON https://www.gns3.com

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/dialogs/appliance_wizard.py", line 129, in initializePage if (ComputeManager.instance().localPlatform().startswith("darwin") or ComputeManager.instance().localPlatform().startswith("win")): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/compute_manager.py", line 127, in localPlatform return self.localCompute().capabilities()["platform"] KeyError: 'platform'

2016-10-05 07:01:39 WARNING crash_report.py:79 A .git directory exist crash report is turn off for developers. Instant exit

Also exited on debug creation, the debug file itself is created: debug-1609.zip

2016-10-05 07:06:35 INFO export_debug_dialog.py:53 Export debug information to /home/ajn/debug-1605 \ Exception detected, traceback information saved in /home/ajn/.config/GNS3/exceptions.log **

PLEASE REPORT ON https://www.gns3.com

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/dialogs/export_debug_dialog.py", line 64, in _okButtonClickedSlot dir = self._project.filesDir() AttributeError: 'NoneType' object has no attribute 'filesDir'

2016-10-05 07:06:36 WARNING crash_report.py:79 A .git directory exist crash report is turn off for developers. Instant exit

julien-duponchelle commented 8 years ago

both crash are fixed

AJNOURI commented 8 years ago

Now I'm observing another behavior:

2016-10-05 07:37:01 DEBUG base.py:243 Configuring Raven for host: <raven.conf.remote.RemoteConfig object at 0x7f489b642ef0> 2016-10-05 07:37:01 DEBUG base.py:684 Sending message of length 1176 to https://app.getsentry.com/api/38506/store/ 2016-10-05 07:37:02 INFO crash_report.py:107 Crash report sent with event ID: 3abe29079b744f5fb26cf8fe9f7a5413 2016-10-05 07:37:03 DEBUG project.py:427 Event received: {'event': {'port': 3080, 'compute_id': 'local', 'user': 'admin', 'connected': True, 'name': 'ubuntu', 'capabilities': {'node_types': ['cloud', 'ethernet_hub', 'ethernet_switch', 'nat', 'vpcs', 'virtualbox', 'dynamips', 'frame_relay_switch', 'atm_switch', 'qemu', 'vmware', 'docker', 'iou'], 'version': '2.0.0a1'}, 'cpu_usage_percent': 23.8, 'protocol': 'http', 'host': '127.0.0.1', 'memory_usage_percent': 32.7}, 'action': 'compute.updated'} 2016-10-05 07:37:04 DEBUG base.py:684 Sending message of length 1822 to https://app.getsentry.com/api/38506/store/ \ Exception detected, traceback information saved in /home/ajn/.config/GNS3/exceptions.log **

PLEASE REPORT ON https://www.gns3.com

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/dialogs/appliance_wizard.py", line 468, in validateCurrentPage if (ComputeManager.instance().localPlatform().startswith("darwin") or ComputeManager.instance().localPlatform().startswith("win")): File "/usr/local/lib/python3.5/dist-packages/gns3_gui-2.0.0.dev2-py3.5.egg/gns3/compute_manager.py", line 127, in localPlatform return self.localCompute().capabilities()["platform"] KeyError: 'platform'

I didn't test your latest fix, following immediately.

AJNOURI commented 8 years ago

Indeed Julien, it fixed the issue. selection_465

selection_466

The container not starting is part of https://github.com/GNS3/gns3-server/issues/702 Thanks very much!

julien-duponchelle commented 8 years ago

Thanks for the feedback