dequis / purple-facebook

Facebook protocol plugin for libpurple (moved from jgeboski/purple-facebook)
GNU General Public License v2.0
954 stars 88 forks source link

Pidgin freezes frequently with purple-facebook. #263

Open AJolly opened 8 years ago

AJolly commented 8 years ago

Pidgin freezes frequently with the facebook plugin for me: Clicking into a chat window, or typing will freeze and block input for a few seconds.

I'm running this on a powerful machine, but suspect it might have to do with the large number of facebook friends I have?

dequis commented 8 years ago

the large number of facebook friends I have?

What number?

AJolly commented 8 years ago

3600 friends, 2400 followers. I tried turning off the buddy icons in case loading those resources was where the freezes were coming from.

AJolly commented 8 years ago

Really not sure why I keep getting these freezes. It does seem like whatever thread is active is synchronous and blocks input. I've got this on two different computers. Any advice on how to best diagnose?

dequis commented 8 years ago

May help to get me a full debug log https://github.com/dequis/purple-facebook/wiki/Debugging-Logs - but my hopes of getting something useful out of it aren't high, to be honest.

marsjaninzmarsa commented 8 years ago

I've also noticed slowdown of Pidgin with this addon (~700 contacts), but I don't know if it's just Pidgin behavior (I don't have any other accounts with comparable contacts number), or something 'purple-facebook' specific. That's sounds moar like work for code profiler, not debugger...

AJolly commented 8 years ago

Thanks! I'm more of a security guy than a dev, but I'll take a look at that/and sniff the network traffic and see if I can get any insight.

AJolly commented 8 years ago

The log seems to support my theory that it has to do with the large number of fb friends. Whenever I see it freeze (so far), the log is writing 500+ lines of "(17:57:52) blist: Updating buddy status for 645397917 (Facebook)" for various FB friends.

AJolly commented 8 years ago

The other time I notice an issue:

(19:23:45) facebook: Writing message (topic: /messenger_sync_get_diffs) (19:23:45) facebook: 00000000 7b 22 64 65 6c 74 61 5f 62 61 74 63 68 5f 73 69 |{"delta_batch_si| (19:23:45) facebook: 00000010 7a 65 22 3a 31 32 35 2c 22 6d 61 78 5f 64 65 6c |ze":125,"max_del| (19:23:45) facebook: 00000020 74 61 73 5f 61 62 6c 65 5f 74 6f 5f 70 72 6f 63 |tas_able_toproc| (19:23:45) facebook: 00000030 65 73 73 22 3a 31 32 35 30 2c 22 73 79 6e 63 5f |ess":1250,"sync| (19:23:45) facebook: 00000040 61 70 69 5f 76 65 72 73 69 6f 6e 22 3a 33 2c 22 |api_version":3,"| (19:23:45) facebook: 00000050 65 6e 63 6f 64 69 6e 67 22 3a 22 4a 53 4f 4e 22 |encoding":"JSON"| (19:23:45) facebook: 00000060 2c 22 6c 61 73 74 5f 73 65 71 5f 69 64 22 3a 37 |,"last_seq_id":7| (19:23:45) facebook: 00000070 32 34 31 37 39 2c 22 73 79 6e 63 5f 74 6f 6b 65 |24179,"synctoke| (19:23:45) facebook: 00000080 6e 22 3a 22 36 35 32 31 39 38 33 36 33 22 7d |n":"652198363"}| (19:23:45) facebook: 00000090 (19:23:45) facebook: Writing 3 (flags: 0x2) (19:23:45) facebook: 00000000 32 9d 01 00 19 2f 6d 65 73 73 65 6e 67 65 72 5f |2..../messenger| (19:23:45) facebook: 00000010 73 79 6e 63 5f 67 65 74 5f 64 69 66 66 73 00 04 |sync_getdiffs..| (19:23:45) facebook: 00000020 78 9c 2d cb 4b 0e c2 20 14 46 e1 bd fc 63 06 02 |x.-.K....F...c..| (19:23:45) facebook: 00000030 b6 b5 2c c1 81 0e 5c c0 0d 85 1b 25 56 68 7b 89 |..,.......%Vh{.| (19:23:45) facebook: 00000040 f1 11 f7 ae 69 1c 9f f3 bd 11 79 ac 9e 06 5f c3 |....i.....y....| (19:23:45) facebook: 00000050 85 24 bd 18 4e 9b 46 e1 e6 1f b4 26 21 3f 8c 4c |.$..N.F....&!?.L| (19:23:45) facebook: 00000060 b5 d0 b4 94 c0 22 eb b0 51 90 67 0e e4 a7 44 77 |....."..Q.g...Dw| (19:23:45) facebook: 00000070 5e 24 95 0c 67 15 38 87 12 53 3e c3 61 7f 3a 1e |^$..g.8..S>.a.:.| (19:23:45) facebook: 00000080 a0 30 7a a9 24 3c 53 8a 70 9d d9 ea ae ff db 5a |.0z.$<S.p......Z| (19:23:45) facebook: 00000090 ae fc 53 68 1b a3 fb 9d 6d 2d 3e 5f 01 8d 2f 38 |..Sh....m->_../8| (19:23:45) facebook: 000000a0

Pidgin will freeze/blocking input, and the log file will pause at that exact point for upwards of 30 seconds, before resuming.

AJolly commented 8 years ago

Also seems that on one computer I end up getting "facebook: Attempting to reconnect the MQTT stream..." frequently. When it does reconnect, it then resynchronizes what looks like the full buddy status list, causing the freeze. (Interestingly, on my other computer, even on the same wired network, run side by side, that one rarely has the MQTT stream error)