Opened 9 years ago

Closed 9 years ago

#11560 closed defect (fixed)

Pidgin crashes when reconnecting to Facebook XMPP after idle period

Reported by: jmccabe Owned by: darkrain42
Milestone: 2.7.4 Component: winpidgin (gtk)
Version: 2.6.6 Keywords: crash xmpp digest md5
Cc: datallah, jordanwalbesser, hanzz

Description (last modified by jmccabe)

I am using 64-bit Windows 7 Professional. I have noticed that Pidgin almost always crashes when I unlock my desktop after being away for a while.

When I originally filed the ticket it seemed like this was a global problem, but it clearly seems related to Facebook XMPP now.

My "Status/Idle?" settings are:

  • Report idle time: Never
  • Minutes before becoming idle: 10
  • Change to this status when idle: (Checked) Offline

I only have two plugins enabled:

  • Release notification 2.6.6
  • Windows Pidgin Options 2.6.6 (no features enabled)

Facebook account settings:

  • Protocol: XMPP
  • Domain: chat.facebook.com
  • Resource: pidgin
  • Remember password: checked
  • Local alias: jim/fb
  • New mail notifications: NOT checked
  • No custom buddy icon
  • Require SSL/TLS: NOT checked
  • Force old (port 5223) SSL: NOT checked
  • Allow plaintext auth over unencrypted streams: checked
  • Connect port: 5222
  • Connect server: chat.facebook.com
  • File transfer proxies: proxy.eu.jabber.org (WTF?)
  • BOSH URL: (empty)
  • No custom smileys
  • Proxy tab says No proxy

Last time this crashed I found this in the Event Viewer:

Faulting application name: pidgin.exe, version: 2.6.6.0, time stamp: 0x4b7aa615
Faulting module name: libsasl.dll, version: 2.1.22.0, time stamp: 0x46e9c17d
Exception code: 0xc0000005
Fault offset: 0x00007e61
Faulting process id: 0x758
Faulting application start time: 0x01cac5357ad2da66
Faulting application path: C:\Program Files (x86)\Pidgin\pidgin.exe
Faulting module path: C:\Program Files (x86)\Pidgin\libsasl.dll
Report Id: 70482af6-3132-11df-b1fd-0024e841039b

The other crashes show up with similar results (process ID changes of course but the "Fault offset" and "Faulting module" and "Exception code" are the same.)

Since then I've installed the debug build and will see if it keeps happening, or if there are log files available next time it happens.

Attachments (9)

pidgin.RPT (754 bytes) - added by jmccabe 9 years ago.
pidgin.RPT for a recent crash
Wed003-17-2010_07.11.47.90.log (409.5 KB) - added by jmccabe 9 years ago.
Added a debug log for the latest crash.
Wed003-17-2010_08.28.54.94.log (628.2 KB) - added by jmccabe 9 years ago.
Attaching another file. Same problem - had a meeting, came back and unlocked the desktop, boom.
Wed003-17-2010_10.59.01.17.log (350.5 KB) - added by jmccabe 9 years ago.
Attaching one last file. I'll stop adding any more after this since they seem pretty similar.
cyrus-sasl-2.1.24rc1.zip (417.9 KB) - added by datallah 9 years ago.
Cyrus SASL 2.1.24rc1
Mon003-22-2010_07.45.12.22.log (677.1 KB) - added by jmccabe 9 years ago.
Crash with new SASL library
pidgin.2.RPT (10.8 KB) - added by jmccabe 9 years ago.
pidgin.RPT containing lots of recent crashes
Wed003-24-2010_09.14.10.57.log (843.0 KB) - added by jmccabe 9 years ago.
Most recent crash log
pidgin.3.RPT (1.5 KB) - added by ThomasOwens 9 years ago.
Pidgin error report following crashes of this nature.

Change History (36)

comment:1 Changed 9 years ago by jmccabe

I forgot to mention one other clue... After I log back in to Windows, I can see the Pidgin icon in the task bar - except that instead of being online or offline, the icon is two vertical bars, like a Pause button on a VCR. It will stay there for a while, until I mouse over it, at which point it disappears completely.

After that, if I bring up Task Manager, pidgin.exe will no longer be in the list of running processes.

Changed 9 years ago by jmccabe

pidgin.RPT for a recent crash

comment:2 Changed 9 years ago by darkrain42

  • Description modified (diff)
  • Status changed from new to pending

That's the entire contents of the pidgin.RPT file? It's not very helpful :-(

It's almost certainly related to an XMPP account, though. Could you try getting a debug log, please? See http://developer.pidgin.im/wiki/TipsForBugReports#PreemptiveDebugLogging

Changed 9 years ago by jmccabe

Added a debug log for the latest crash.

comment:3 Changed 9 years ago by jmccabe

  • Status changed from pending to new

Attachment (Wed003-17-2010_07.11.47.90.log) added by ticket reporter.

comment:5 Changed 9 years ago by darkrain42

  • Cc datallah added
  • Component changed from unclassified to libpurple
  • Owner changed from rekkanoryo to darkrain42

That's odd. It's crashing halfway through a DIGEST-MD5 negotiation. Daniel, do you have any idea what's going on here?

Changed 9 years ago by jmccabe

Attaching another file. Same problem - had a meeting, came back and unlocked the desktop, boom.

comment:6 Changed 9 years ago by datallah

It looks like some sort of state in the cyrus library gets messed up somehow when the machine enters powersaving mode.

Perhaps there is an updated libsasl that is fixed?

comment:7 Changed 9 years ago by datallah

  • Component changed from libpurple to winpidgin (gtk)

It looks like there is a cyrus-sasl 2.1.23 (we're currently using 2.1.22), but it only has one specific fix in it (not related to this issue).

There are a number of fixes in the unreleased 2.1.24 version, a couple of which sound like they could possibly be related.

Unfortunately it is a huge PITA to build cyrus-sasl on Windows that links to msvcrt.dll instead of one of the newer Visual Studio version's CRT, so I'm probably not going to get to it some time in the near future. IIRC last time created a hacked up combination of VS6 and VS2005 to do so. It probably is possible to do something based on Viktor's NSS building instructions that is less of a hack.

Changed 9 years ago by jmccabe

Attaching one last file. I'll stop adding any more after this since they seem pretty similar.

comment:8 Changed 9 years ago by jmccabe

Here's a new tidbit of info which might be related. I have noticed that I can lock my screen and come back and Pidgin is fine. It's only when I've been gone a while.

One thing that is different when I'm gone for a while is that the MyDefrag? screen saver will run. I wonder if there is some kind of incompatibility with that app.

Our IT guy has tried to make it impossible to disable that screen saver but I'll try to find a work around, and will report back if anything changes.

comment:9 Changed 9 years ago by datallah

FWIW, I can recreate this issue on my Windows 7 64-bit machine by sleeping it and waking it up.

comment:10 Changed 9 years ago by datallah

It turns out that I can't recreate the issue at will; I just saw it one time.

Changed 9 years ago by datallah

Cyrus SASL 2.1.24rc1

comment:11 Changed 9 years ago by datallah

I've built a Cyrus SASL 2.1.24rc1 binary and attached it to this ticket.

You should be able to extract it into your Pidgin installation directory, overwriting the previous version dlls.

Please test if this prevents the issue you're seeing - I don't have a good way of validating that it fixes the issue.

comment:12 Changed 9 years ago by jmccabe

Thanks for the new SASL DLL. I've updated the files and restarted in debug mode and was happy to see that it starts up OK without errors, etc. I'll post more today - there are a couple points in my day when it will regularly crash (after my 10am daily meeting and after lunch), I'm curious to see if it behaves any differently.

comment:13 Changed 9 years ago by jmccabe

Bad news - even with the new SASL library, it still crashed after I came back from my morning meeting. I'll attach the log file next...

Changed 9 years ago by jmccabe

Crash with new SASL library

comment:14 Changed 9 years ago by jmccabe

Here's the info from Event Viewer. Interesting that it shows labsasl.dll at version 0.0.0.0:

Faulting application name: pidgin.exe, version: 2.6.6.0, time stamp: 0x4b7a9d43 Faulting module name: libsasl.dll, version: 0.0.0.0, time stamp: 0x4ba56e62 Exception code: 0xc0000005 Fault offset: 0x00007d00 Faulting process id: 0xe04 Faulting application start time: 0x01cac9ce46d84b56 Faulting application path: C:\Program Files (x86)\Pidgin\pidgin.exe Faulting module path: C:\Program Files (x86)\Pidgin\libsasl.dll Report Id: f99fa396-35d6-11df-a337-0024e841039b

comment:15 Changed 9 years ago by datallah

  • Status changed from new to pending

Do you have the pidgin.RPT file from this crash?

Changed 9 years ago by jmccabe

pidgin.RPT containing lots of recent crashes

comment:16 Changed 9 years ago by jmccabe

  • Status changed from pending to new

Attachment (pidgin.2.RPT) added by ticket reporter.

Changed 9 years ago by jmccabe

Most recent crash log

comment:18 Changed 9 years ago by jmccabe

I just want to re-stress something from the original description. This problem will not happen if I simply lock my desktop for a few minutes. I have to be gone for over 10 minutes. For example I just got back from my morning scrum, after about 15 minutes, and Pidgin had crashed. It is guaranteed to crash on my machine if I've been gone for any non-trivial length of time, like 15 minutes or more.

This makes me wonder if it's related to the idle-detection feature, which I have set at 10 minutes.

comment:19 Changed 9 years ago by darkrain42

Yes, since you have Pidgin configured to go offline when you're idle, that is likely related (Cyrus SASL is typically only used during the connection process). Is your computer actually going to sleep (or any power saving mode more than blanking the screen)?

comment:20 Changed 9 years ago by jmccabe

My machine is set up with a group policy that prevents it from going to sleep, so that updates can occur at night, we can remote desktop from home, etc.

Other people in my office are not experiencing this same problem, and I suspect it is because I connect to 4 different chat servers. Now that I think about it, I wonder if maybe this problem started to crop up when I added a Facebook chat account to Pidgin. I know for sure that the Facebook XMPP implementation is pretty flakey - sometimes working and sometimes not - so it wouldn't surprise me if it's related to that.

Maybe that will help reproduce the problem?

I'll disable the Facebook integration and see if the problem goes away.

comment:21 Changed 9 years ago by jmccabe

Good news - when I disabled my Facebook XMPP account, the crash didn't happen today when I got back from lunch. This is the first time it has stayed up in ages, I think it's related.

I have a meeting in the afternoon so I'll have another chance to test this theory out shortly. If it doesn't crash then either, then I think we can safely say it's a bug in the way Pidgin interacts with Facebook's XMPP implementation.

comment:22 Changed 9 years ago by jmccabe

Pidgin stayed up just fine during my 40-minute meeting, so I think it's safe to say this is specifically related to Facebook XMPP. I'll update the overall ticket description.

comment:23 Changed 9 years ago by jmccabe

  • Description modified (diff)
  • Keywords facebook xmpp added
  • Summary changed from Frequent crashes when returning to machine after it has been in screensaver to Pidgin crashes when reconnecting to Facebook XMPP after idle period

comment:24 Changed 9 years ago by jmccabe

This ran great overnight and started up just fine this morning when I arrived at work again. I can say with 100% certainty that this crash is specifically related to Pidgin's interaction with Facebook's XMPP implementation (maybe just on 64-bit Windows 7?)

http://www.facebook.com/sitetour/chat.php Here is the Facebook page with their recommendations on how to configure Pidgin for their servers, for your reference.

comment:25 Changed 9 years ago by darkrain42

  • Keywords digest md5 added; facebook removed

Facebook uses the DIGEST-MD5 sasl mechanism (which at least some of these crashes included in the traceback), where most other platforms do not (it typically requires access to a plaintext version of the password, or a hashed version in a form that most services do not store it in. My assumption is that Facebook is storing separate hashes of it in this form, which is why one of the steps needed to activate Facebook XMPP access is re-logging into one's account once. Anyway). Neither Google Talk nor your corporate account support DIGEST-MD5, which is (I suspect) why disabling Facebook made it go away.

If you have an account on a public server (e.g. jabber.org or most of the ones at http://xmpp.org/services/ ), you could use that to test (most of them likely store passwords in plaintext).

comment:26 Changed 9 years ago by jordanwalbesser

I just wanted to chime in and say that I am experiencing the same problem and can confirm that it is the Facebook XMPP plugin that is causing the issue.

Please let me know if contributing additional logs would help speed up the resolution of this problem.

Thank you.

comment:27 Changed 9 years ago by PeterVermont

Same crash on Windows Vista 64-bit. Only happens when Facebook xmpp account enabled.

From the Windows Application event log:

Log Name: Application Source: Application Error Date: 7/6/2010 3:55:46 PM Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: LESAGE Description: Faulting application pidgin.exe, version 2.7.1.0, time stamp 0x4c03de33, faulting module libsasl.dll, version 2.1.22.0, time stamp 0x46e9c17d, exception code 0xc0000005, fault offset 0x00007e61, process id 0x9e0, application start time 0x01cb1a1541404ec0. Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

<System>

<Provider Name="Application Error" /> <EventID Qualifiers="0">1000</EventID> <Level>2</Level> <Task>100</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated? SystemTime?="2010-07-06T19:55:46.000Z" /> <EventRecordID>34743</EventRecordID> <Channel>Application</Channel> <Computer>LESAGE</Computer> <Security />

</System> <EventData?>

<Data>pidgin.exe</Data> <Data>2.7.1.0</Data> <Data>4c03de33</Data> <Data>libsasl.dll</Data> <Data>2.1.22.0</Data> <Data>46e9c17d</Data> <Data>c0000005</Data> <Data>00007e61</Data> <Data>9e0</Data> <Data>01cb1a1541404ec0</Data>

</EventData?>

</Event>

comment:28 Changed 9 years ago by datallah

Ticket #12393 has been marked as a duplicate of this ticket.

Changed 9 years ago by ThomasOwens

Pidgin error report following crashes of this nature.

comment:29 Changed 9 years ago by darkrain42@…

  • Milestone set to 2.7.4
  • Resolution set to fixed
  • Status changed from new to closed

(In 1fa9e4afdd810001996bc2b829fd6027f21a882f):
jabber: Fix a pernicious race condition in our cyrus auth code

About sasl_getsecret_t, sasl.h reads, in part:

outputs:

psecret set to password structure which must persist until

next call to getsecret in same connection, but middleware will erase password data when it's done with it.

Clearly this needs to be per-JabberStream?*, not a static var. Jan Kaluza noted the static var and then I noted the sasl.h docs. Fixes #11560

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!