Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 302 forks source link

Komodo IDE 10.2.1 on macOS 10.12.4 hanging #2424

Closed pemcg closed 7 years ago

pemcg commented 7 years ago

Short Summary

I'm running Komodo IDE 10.2.1 on MacOS 10.12.4. I haven't used Komodo for a while so I'm not sure if the issues are related to the 10.12.4 upgrade that I did this morning, but I've had 2 cases today of Komodo hanging (infinite beachball). I've also noticed generally that the UI is frustratingly slow scrolling up and down, it's not a smooth experience at all.

Both of the hangs have been with about 5-6 files open, relatively small files (<400 lines)

Note From Developer - Please Read

A nightly is now available with a fix for this hang, you can download it here:

http://downloads.activestate.com/Komodo/nightly/komodoide/latest-10.2.x/

If you are still experiencing this issue with the latest build please supply a backtrace of Komodo in this ticket (when it is hanging).

To get the backtrace take the following steps:

Steps to Reproduce

Random

Expected results

Actual results

Platform Information

Komodo IDE for Mac Komodo 10.2.1 *Operating System (and version) MacOS 10.12.4

Additional Information

Attached is the text of the "Report the problem to Apple" output when I did a force quit. komodo_hang.txt

Naatan commented 7 years ago

New build and instructions in the dev note at the start of this ticket.

NeilFraser commented 7 years ago

Good morning. pystderr.txt

tuckdesign commented 7 years ago

This is from latest build: Komodo-10.2.2-89899-20170601-150030.txt thx @mrochford for nice command line :)

NeilFraser commented 7 years ago

Another hang: pystderr.txt

Naatan commented 7 years ago

@tuckdesign please check the updated instructions.

tuckdesign commented 7 years ago

Ok. Here is new one: pystderr.txt

tuckdesign commented 7 years ago

pystderr.txt

Naatan commented 7 years ago

@tuckdesign @NeilFraser very interesting. Could you both try disabling Git (Prefs > Source Code Control > Git) to see if that stops the hangs?

vrurg commented 7 years ago

For me it has survived yesterday's session with no hang.

tuckdesign commented 7 years ago

Yes, disabled it after I saw logs... will see what happens.

NeilFraser commented 7 years ago

Disabled Git and restarted. Will let you know.

Come to think of it, the Git integration hasn't been working for roughly the same period that these hangs have been happening. Edit markers in the left margin only reflect changes since the last save, not the last commit. Hmm.

Naatan commented 7 years ago

Far as I can tell Git should still work, it's just that eventually it stops working, and so does Komodo.

Naatan commented 7 years ago

By the way, keep the logs coming if you have more hangs. And be sure to let me know if you're NOT getting any hangs ;)

NeilFraser commented 7 years ago

...still no hangs. Looking very encouraging.

vrurg commented 7 years ago

Wish I bring some good news here but it hung exactly the minute I was about to write a comment... Though considering the above comments I must admin that git integration was on. Switched it off and will continue observing.

Komodo-10.2.2-89899-20170602-201134.txt

vrurg commented 7 years ago

Oops... After more than two days it fails second time in a row. Git integration was off this time.

Komodo-10.2.2-89899-20170602-205524.txt

Naatan commented 7 years ago

@vrurg please share your pystderr.log as per the instructions. You're sharing the lldb backtrace which was from an earlier instruction.

vrurg commented 7 years ago

@Naatan , sorry, didn't mention the change in the instructions. Unfortunately, it overwrites the log on every start, so no chance of retrieving it. Wouldn't you consider rotating it? BTW, it's not the first time I need an old pystderr.

Naatan commented 7 years ago

We might, but it doesn't help us right here and now. Just attach it the next time it hangs please.

calaverasgrande commented 7 years ago

I'm having same issue, even with GIT not running. OSX Sierra 10.12.5 Komodo 10.2.2 Not doing anything terribly sophisticated, then beachball-o-death. pystderr.txt

Naatan commented 7 years ago

@calaverasgrande please use the custom build linked in this topic, error logs from the official 10.2.2 build are not helpful.

calaverasgrande commented 7 years ago

apologies, will give that a shot.

tuckdesign commented 7 years ago

Here is new log with git turned off. Will turn off all source control now (I see hg in logs...)

pystderr.txt

NeilFraser commented 7 years ago

...still no hangs at my end. Git turned off and no other source control integration. Will update if anything comes up, but from my perspective this issue has been resolved (though eventually getting Git's inline diff back would be rather nice).

Let me know if you want me to turn stuff back on if you need some more debugging data.

Naatan commented 7 years ago

I don't think the issue is git. Git is just the one that's making it apparent because it's issuing a lot of command. Disabling git will likely significantly reduce the odds of having a hang, but not eliminate it.

I'll have a new build shortly with an experimental fix.

Naatan commented 7 years ago

New build uploaded, dev note updated. Please try the new build (89900).

tuckdesign commented 7 years ago

Here is log from new build. I turned on git with it and it seems to get hangs with git again.

pystderr.txt

Naatan commented 7 years ago

Thanks @tuckdesign, seems the hang is happening right in the middle of the native Python code. We're gonna have to find a workaround.

tuckdesign commented 7 years ago

After turning off source control (all of them) working 2 days without a hang...

Naatan commented 7 years ago

Nice! I'll have a new experimental build today that terminates any process that runs for longer than 5 seconds. It only does this for processes that are meant to run for only a few ms (such as VCS). That way when a process hang does happen it will resolve itself within 5 seconds. Meaning worse case you'll have a 5 second hang once or twice a day.

Not an ideal solution by a long shot, but it'll get us closer to a proper solution while not making Komodo hang altogether for users.

calaverasgrande commented 7 years ago

It's been pretty smooth for me on 10.2.2, build 89900, platform macosx. Built on Mon Jun 5 09:47:56 2017. I've got github desktop open all the time.

pystderr.txt splat! Spoke too soon. Just beachballed on me.

Naatan commented 7 years ago

Build updated, please download and use the latest build references in the dev note in the first post. This build will terminate processes that hang for more than 5 seconds.

tuckdesign commented 7 years ago

pystderr.txt Hangs again with new build (git is turned on). Apart from Komodo I always have sourcetree app open with same git repository open. Sourcetree uses embedded git and maybe there are some conflicts/locking when komodo is using system git. Will try with sourcetree using system git also...

Naatan commented 7 years ago

@tuckdesign you're certain you gave it enough time to recover? The hang would stil happen when it otherwise does, but this build is meant to recover from it within 5-ish seconds.

tuckdesign commented 7 years ago

@Naatan waited >20s

Naatan commented 7 years ago

Bah, that's disappointing. So this hang even stops Python threads from working :\ Ok, back to the drawing table.

Naatan commented 7 years ago

@tuckdesign or anyone else reading this, could you try executing the following in terminal the next time you get a hang:

sudo dtruss -s $(ps aux | grep komodo | grep -v codeintel | grep -v grep | awk '{print $2}')
sudo dtruss -p $(ps aux | grep komodo | grep -v codeintel | grep -v grep | awk '{print $2}')

Copy the results into a txt and attach it please.

Naatan commented 7 years ago

Build updated, please let me know how this one works. I've removed the ability to abort VCS commands, in an attempt to find out whether this aborting mechanic is at fault here.

tuckdesign commented 7 years ago

pystderr.txt Now php is hanging...

tuckdesign commented 7 years ago

Had one more hang (same thing in log, only git is hanging). Important difference is that I was not running sourcetree with git at that time, so it's not git locking issue.

tuckdesign commented 7 years ago

dtruss.txt pystderr.txt dtruss command is basically repeating workq_kernreturn(0x40, 0x70000C4E4B80, 0x1) = 0 Err#-2 libsystem_pthread.dylib`start_wqthread until I do force quit

Naatan commented 7 years ago

Updated the build again. This one forces new processes to be launched from the main thread.

tuckdesign commented 7 years ago

Is codeintel not working because of new version or this is different problem? Eg. 'Go to definition' is grayed out on right click.

Defman21 commented 7 years ago

If the build is using new CodeIntel version, then Go to definition is not implemented (yet). https://github.com/Komodo/KomodoEdit/issues/2616

Naatan commented 7 years ago

@Defman21 no this is 10.2.2, not 11. Please let me handle questions in this ticket ;)

@tuckdesign it's possible that it's not working, this is extremely experimental. If you don't mind please use it for a while regardless and see if you get any hangs. Note Help > Troubleshooting > Restart in Safe-Mode is a good way to test if it's the build or your profile at fault.

Defman21 commented 7 years ago

Please let me handle questions in this ticket ;)

Okay :)

mrochford commented 7 years ago

pysderr.txt

Naatan commented 7 years ago

@mrochford please download and use the latest build in this ticket

mrochford commented 7 years ago

@Naatan I realized I hadn't updated. That was the first lockup for me in over a week. I don't know if it is a sign that I wasn't doing much development work or I just got lucky. :-)

Naatan commented 7 years ago

Probably a mixture of the two :)