My personal blog

How msn-pecan fixed a 6 year old bug, how Pidgin didn’t, and stole the fix

The bug we are talking about is the infamous switchboard timeout error which was very elusive, it happened randomly, and very often for some users in unknown conditions. Essentially you send a message, and after one minute you receive a notification telling you the message never arrived, after which you need to resend the message, and hope it will arrive this time.

Let’s see how the two projects approached this bug.

Pidgin

There have probably been many bug reports regarding this issue, but it’s very difficult to find old historic bugs in Pidgin’s new and old tracker. The modern version is reported in Pidgin’s tracker as #3330. There you can see people saying it happens a lot, that the priority should be increased, and many tickets were marked as duplicate. Developers however stayed in denial mode: they say it doesn’t happen to them, and then turn to the usual strategy: ask for irrelevant information such as a valgrind log, and to try again as it might have been magically fixed.

Then they try a simplistic workaround; re-send the message on failure. This doesn’t work on most cases, and even when it does, the message arrives more than 1 minute late. As usual, no developer did much else about the bug.

The interesting point is when Rasmus Hummelmose, an Adium user, logged to IRC to rant about the problem. He received the same response on both #adium and #pidgin; it’s a server problem, or it’s your slow connection, there’s nothing we can do. That didn’t convince him (it wasn’t true) and he effusively tried to explain that the issue was real and was affecting many users. He didn’t achieve anything more than upsetting the developers.

This is not the way to solve an important bug.

msn-pecan

The msn-pecan team on the other hand thought: hey, there’s a bug, and this guy can reproduce it, let’s fix it. I invited him to #msn-pecan. Rasmus was a bit reluctant; Why loose time with msn-pecan developers? Surely Pidgin developers must be capable enough to do the job. He changed his mind when I explained that the core parts of libpurple’s (Pidgin) msn were either developed or refined by me anyway, and therefore, Pidgin devs probably didn’t have the expertise required to identify this problem.

With that we started an endeavour to fix the problem through the weekend. I started by providing some infrastructure changes in order to visualize what was actually happening, Devid Antonio Filoni created Adium builds, and Rasmus tested, and provided feedback. We made some conjectures and discarded them with further testing and fixed some bugs along the way until we found a reliable way to reproduce: send a message, wait for 15 minutes of inactivity, and send another message.

After this is was clear that something bogus was happening with the network connection, but since we cannot fix all the elements involved, we implemented a simple fix: close the connection after 1 minute. That worked perfectly. Rasmus was happy, and we were too 🙂

The stealing

Logically after our success, Rasmus decided to rub the fix on the face of Pidgin and Adium developers, after all, they were the ones that said it was not a bug. But they were not impressed.

However, Daniel Ljungborg (aka Dimmuxx) was interested in the fix, and in good faith I pointed the commit message that explains the issue in detail.

Then I find out Ka-Hing Cheung, a Pidgin developer, implemented the fix as I described, but thought it was OK to not thank anybody, explain where the fix came from, or mention the msn-pecan project, or any external source at all. We (Rasmus, Devid and I) spent a weekend of our free time working hard to identify, fix, and verify the issue, and if you read the commit message you would think they came out with the solution:

60 thoughts on “How msn-pecan fixed a 6 year old bug, how Pidgin didn’t, and stole the fix”

That seems to be very disappointing. I wonder though if you tried to contact the pidgin developers after they applied your fix. At least you could ask them to give proper credit in the future (I guess you can’t change the commit message anymore, can you?) and in the official Changelog. If you haven’t done this yet, you should do it in my opinion.

And thanks for fixing this, I remember getting this message from time to time, too.

It’s actually not true that I copied your fix, in fact I explained this in #pidgin (right after you left though, I was working and didn’t pay attention):

(18:31:37) felipec left the room
(18:32:21) khc: actually, I knew what was required to fix that timeout bug before that, but that discussion prompted me to actually do it

The day I fixed it I also mentioned in #pidgin:

(09:43:09) khc: ya, I was going to do that too
(09:43:14) khc: I wasn’t aware that pecan does that
(09:44:12) khc: (and sometimes the swboard can close < 1 minute too depends on the network)

So ya, I didn't mention that the fix came from you, because it's simply not true.

I asked in #3330 for a valgrind log because the guy who commented right before said it crashed for him. I've also observed this happened before 1 minute of idle time (the other end was using the offical client too), while other times a longer idle time didn't cause any problem. Another thing I planned but don't have time to do yet is change the retry to use offline message instead of over the switchboard.

Plagiarism is a serious accusation, and extra ordinary claims require extra ordinary evidence. I hope you will think twice before making similar claims in the future.

Not giving credit isn’t nice or proper, but so is posting a big complaint and accusing them of plagiarism before first contacting them. Accidents and oversights happen so before you accuse you really should have sent a simple email out and alerted them. If they ignore you or refuse to give credit then you blast away.

The code is clearly not identical, the idea isn’t exactly earth shattering, and Ka-Hing Cheung was going to implement this before he even knew that pecan does it. How is this plagiarism exactly?
Jul 19 17:43:01 (Dimmuxx) G-Lo: http://github.com/felipec/msn-pecan/commit/4d9982ef2173aa700c705d821ad5451542bc0e9c
Jul 19 17:43:09 (khc) ya, I was going to do that too
Jul 19 17:43:15 (khc) I wasn’t aware that pecan does that

The license is GPLv2 which only requires Pigdin developers to use a compatible licence, the did. The code is copyrighted to me, but they didn’t copy the code. So what they did complies both with the license and copyright, and therefore it’s legal, nobody is complaining about that.

However, they took the idea from msn-pecan and didn’t give credit, that’s called plagiarism, I’m just calling the things by their name.

Did you attempt to contact the Pidgin people before writing this? If Stu is correct, then they didn’t plagarize anything and you just come out looking like a whiner. It’s free-as-in-speech software, GPL even, it’s not about you, it’s about he code.

@Stu from the evidence you are providing two facts are clear:
1) Dimmuxx pointed out the msn-pecan commit that has the full explanation about the issue, the solution, and the validation before khc made the commit
2) khc was merely thinking on doing the change, but he did it after Dimmuxx asked him to

Now, Dimmuxx asked him to make the commit because he knew it would fix the issue, and he knew because I told him so, and it’s well explained in the commit.

We cannot know how serious khc was about making that commit, but we know if msn-pecan hadn’t done the investigation, fix, and validation, Dimmuxx wouldn’t have pushed khc to make the commit, and khc might have never made the commit, and if he did, he would probably have not marked the issue as fixed until further verification.

At the very least, khc new msn-pecan already did the verification, which is hugely valuable in hard-to-reproduce bugs, that’s a fact.

I have been having this issue ALOT. And I mean alot. It’s hard keeping a conversation when you are uncertain whether the other person gets your messages. So if this fix in any way comes to Adium, I love you.

So you’re upset because an free software application used your patch, from another free software application to improve their code and didn’t give you credit. I hate to break it to you, but thats what Free Software is all about. sure it would have been polite to credit you with the fix. But plagiarism doesn’t apply when you’ve already given these people the right do as they see fit with your code. good job fixing the bug, it has affected me from time to time, and your hard work is appreciated. but being that this is free software, you unfortunately aren’t entitled to any sort of credit, and if you wanted something in return, you should have licensed your code accordingly.

Actually the bug is not fixed, it’s being worked around. I hope someone are able to find the real bug.

As I see it, it would be polite to attribute you for confirming the workaround is working, but it’s very normal that not every person involved in the discussion around a bug is attributed in the patch.

It’s a non-issue as far as I can tell. If you feel your contribution to fixing the bug is big enough to get credit that’s what you should say (and then keep it between you and the pidgin team), accusations won’t get you anywhere.

@gaffa the Pidgin team has a long history of not listening to me, so telling it as it in the medium I’m more listened to is the best thing I can do.

Besides, what I really wanted was to explain the story about how they told Rasmus to shut up, and we didn’t. The stealing was a little extra that I found out while checking #3330.

And since we can’t chase around OS X bugs, routers, or whatever isn’t detecting the connection is closed I consider the bug closed. There’s a possibility we can do a bit more to try to detect disconnections, but we’ll see when we switch to gnio.

Felipe, you need to understand the difference between *not listening* and *disagreeing*. The latter is a perfectly acceptable thing, no matter how much you don’t like it. I’m in the process of trimming my logs of the initial exchange where Pidgin developers allegedly told Rasmus (who I believe is “mgc_” on IRC) to “shut up”, and, as part of the trimming, I’m deleting a fairly extensive exchange you had with multiple people about the status dialog in Pidgin (because it’s not pertinent to the conversation with Rasmus). *On top of that*, I think the mailing list archives clearly illustrate that people *listen*, but they don’t always agree. Again, that’s not *wrong*.

In particular, I take issue with your characterization of the response Rasmus got (in #pidgin, I cannot speak to #adium), which is exactly the reason why I’m writing this right now. I find your characterization reprehensibly skewed and vitriolic.

At no point did any Pidgin developers tell him it was a server problem or that it was his system, or that “there’s nothing we can do”. In fact, what happened was that Rasmus first came in at a time when most Pidgin developers are not active (4AM Pacific Time).

*You* were the one who immediately proclaimed, in a characteristic response for you, that Pidgin devs would ban you for answering a question (hint: it’s not the fact you’re answering a question that causes conflict with denizens in #pidgin, it’s the way in which you “answer” those questions by denigrating Pidgin’s MSN protocol plugin and proclaiming without merit that we’re unwilling to work with users to solve issues). The person who you and the user engaged with at that point *is not* a Pidgin developer, though I do think he (*and you*) should have acted in a more straightforwardly *helpful* manner.

In any event, the next time he came back, Rasmus (virtually) slapped Pidgin developers as his first action in the room and then, when requested to calm down and explain his issue, did not actually do so. Another *user* responded in-kind to Rasmus (in retrospect, he, too, should have acted better).

The exchange ends with both Pidgin developers explicitly saying they would like to fix the issue, but don’t have the expertise to, which is a far cry from the characterization in your blog post.

At *no* point did a Pidgin developer tell him to “shut up”. Stop spreading half-truths and deceits.

As an example of one of my ideas being ignored you can see here; 5 years ago I told KingAnt that GaimBuddy wasn’t doing the job correctly and I explained that it should be one buddy per id/account, he “disagreed” and with that I lost motivation on my privacy rewrite.

Now somebody else comes up with the idea (after I suggested it again), and now it suddenly seems sensible. KingAnt even mentioned exactly the same advantages I did 5 years ago, and he rejected.

Another example is that I’ve been suggesting to bump up the insane GLib 2.0.0 requirement for years, and now that somebody else comes up with it, now it’s feasable.

I can come up with many more examples in a separate blog post if you are interested.

But coming back to the topic you are trimming important parts of the conversation:

Jul 10 22:14:51 <elb> mgc_: you’re going to need to be more forthcoming and less demanding to get anything done
Jul 10 22:15:07 <elb> mgc_: we have no idea what you’re talking about, and acting like a petulant child is not drawing interest
Jul 10 22:16:17 <mgc_> elb it’s been on trac for three years
Jul 10 22:16:25 <mgc_> and people have been steadily complaining every month
Jul 10 22:16:34 <mgc_> how can you not know what I’m talking about
Jul 10 22:17:05 <kevin_BB> mgc_: you could fix it and send in a patch, just sayin 😉
Jul 10 22:17:21 <mgc_> I’m not a developer
Jul 10 22:17:26 <kevin_BB> then lay off
Jul 10 22:17:39 <mgc_> well somebody has to ask
Jul 10 22:17:45 <mgc_> there are tons of trac records
Jul 10 22:17:57 <mgc_> and none of the devs seem to answer
Jul 10 22:17:59 <kevin_BB> and present your question in a coherent manner. link to one of the tracs. make it easy on these helpful people
Jul 10 22:19:18 <deryni> Developers have commented on the ticket, the last comment was asking for a debug log from when the error appeared but the message made it through, it was never answered.
Jul 10 22:19:45 <mgc_> deryni I personally posted a debug log
Jul 10 22:19:50 <mgc_> and I see lots of debuglogs
Jul 10 22:20:38 <deryni> I didn’t say there weren’t any debug logs.
Jul 10 22:21:06 <deryni> I said that specific request was not answered.
Jul 10 22:21:11 <kevin_BB> deryni: should i just come back later?
Jul 10 22:27:29 <elb> it’s not that anyone doesn’t “want to fix it”, it’s simply that we don’t use MSN, and there is only so much time to go around
Jul 10 22:27:42 <deryni> Right, I’d gladly fix it if I magically knew how.
Jul 10 22:28:02 <deryni> But I don’t, and I’m not going to spend the large amounts of time needed to get to the point where I could even begin to understand it.

Nobody seems to be encouraging him to do anything like we did in msn-pecan, where we encouraged him to work actively with us to solve the problem.

If they were encouraging him to keep speaking it was well hidden in comments such as “lay off”, and “we don’t use MSN”.

kevin_BB is not a Pidgin developer. Neither is Alver or bleeter. You are treating them all as if they are in your blanket attacks against us. To me this certainly looks like bending the truth to fit your own agenda.

The fact that no one was “actively encouraging him to do anything” is directly related to the fact that no Pidgin developer involved in that conversation has any significant knowledge of the MSN protocol or our plugin. Yes, you repeat this particular bit quite often, and it is true that most of us avoid MSN like it’s the plague, But, you also ignore the fact that the majority of us also avoid oscar (AIM/ICQ), Sametime, QQ, Gadu-Gadu, and Zephyr. That doesn’t mean that nothing ever gets done on these protocool plugins; it simply means that we don’t spend every waking moment on them. Expecting all our developers to know or care about MSN is unreasonable.

Furthermore, as darkrain42 said, there is a difference between ignoring and disagreeing. Five years is a long time, and a lot has changed in that time. An opinion held five years ago may have changed due to any number of factors, including the fact that now Mark works for Meebo. It’s possible that he’s seen things at Meebo that has made him realize certain changes in libpurple would be good. If no one replied to your original posts on the sourceforge mailing lists, tough. That doesn’t mean you were ignored.

Rejecting an idea is NOT the same as ignoring it. You really need to learn this and quit attacking us for disagreeing with you. You are not the only person ever to come up with an idea, and you’re certainly not some perfect genius with the answer to everything. Quit expecting us to be, and quit acting like we ignore everyone’s ideas.

As for the two-week inactivity timeout on tickets, we have told you on numerous occasions when you whined about it in #pidgin that if a user responds to the ticket after the 14-day window, we will reopen the ticket. We feel the 14 day window is sufficient. This is another point on which we disagree with you–that does not magically make us wrong and you right, nor does it mean we ignored you. It simply means we disagree with you and will not change because you whine.

We’ve also disagreed on prioritizing bugs. We, as a project, do not use a priority system, nor do we care to. We work on what we want to when we want to. That said, a prioritizing system where the developer capable of doing both puts implementing user feature demands before fixing serious problems (crashes) is even more fundamentally flawed than you seem to think the lack of a prioritizing system is. Clean off your own stoop before you go trying to bitch at us.

The bottom line here is that you accuse us of “ad hominem” attacks against you, but that and bending the truth to fit your agenda are the only things you ever do to us. We disagree on a number of things. We have no problem with disagreeing, but you obviously do. We can handle it like adults, but you insist on handling it like a five-year-old child who thinks he should always get his way. There is no room for this in our project; if you insist on being like this, it’s time for you to get off our mailing lists and stay as far away from us as possible.

The world does not revolve around you or the MSN protocol. Get over it and grow up.

Whoa, so it’s OK to make defamatory, libellous and slanderous comments about others, but if someone makes a comment that may (or may not) be an ad hominem ‘attack’ upon you, out come the threats of the censorship brigade. I can see how this is fair and balanced.

Blablabla… you fixed it, they implemented the fix. It’s a win-win. If you want attribution than don’t code under GPL or compatible licenses. We, the users, still win with this ‘stealing’. And actually, it’s not stealing but you shared the code.

@Andre: both are GPL and copyright isn’t an issue here, as FelipeC, msn-pecan author said himself. So, I don’t need to read the book. I just expressed how I look at things: I don’t like people putting egos in their code, being upset because they are not mentioned as the authors. But if they want to: no problem, but GPL isn’t than the best license.
About copyright and GPL: when someone distributes the source-code under GPL than that source-code abides by the license, which permits that your code is being used without attribution in other GPL or GPL-compatible source-code and the copyright holder cannot revoke that.

@andre they didn’t copy the code, so the copyright doesn’t apply, and the GPLv2 license doesn’t enforce attribution. So there’s no problem with any of them

@dawith it’s legal for them to present ideas as their own, but that’s called plagiarism. If they don’t want me to call them plagiarizers, then they should not do it. It’s perfectly ethical for me to call things by their name.

@John Bailey sure, kevin_BB, Alver or bleeter are not developers, but they can scare away users just the same, and no developer ever steps in to intervene, right? And you also forgot about elb, he is a developer.

I just wrote an analysis about the current MSN code-base. As you can see less than 38% of the code was developed by current Pidgin developers. It’s not that I expect every developer to know about MSN, it’s that I expect at least more than one or two, specially considering MSN is the most widely used IM protocol worldwide.

You can say my ideas were “validly rejected”, but the fact is that most of them are implemented eventually anyway (after several years). IMHO whatever reasons you use to “reject” (or rather ignore) my ideas is far from valid.

If you accept that as a project you don’t have any priorities and couldn’t care less what users think when you automatically close their bugs; I rest my case.

I’m a bit confused by your “we don’t do ad hominem attacks against you” argument; is “you insist on handling it like a five-year-old child who thinks he should always get his way” supposed to support your argument?

Also, may I remind you that my original argument was “the Pidgin team has a long history of not listening to me”, and then you say “it’s time for you to get off our mailing lists and stay as far away from us as possible” , so in my book you are agreeing with me: you have no intention of listening to what I say.

Let me first say that I don’t wish to take sides, and that I have the greatest respect for all Open Source developers. Indeed, I’ve benefited greatly from your work (especially mtn2git), and also from the great work by other Pidgin developers.

There have been several instances in the past, of the same research idea being published almost simultaneously, and so I don’t find this particular coincidence too unbelievable. Yet, even if this were real plagiarism (or accidental — like cryptomnesia), I do see that, from an entirely technical perspective, it would’ve made sense for Pidgin to say “this change has been independently tested under msn-pecan and has been proven to work,” which is undeniably true and useful as a commit log.

But Felipe, what bothers me is that despite all the work put in by the other Pidgin developers, you seem to be more considerate of your users rather than fellow developers. You give more credit to a user who spends a weekend debugging msn-pecan for you, than a developer who has spent years of effort maintaining Pidgin. Granted, you might not be on the best of terms with Pidgin developers, but all Open Source developers are eventually volunteers, whose main intention is to enjoy what they are doing. You really can’t blame others for not caring much about MSN; whether MSN is the most popular IM in the world or not is immaterial, fact is that these developers don’t use it. You use it, and you wrote it, and therefore you obviously care about it, and it’s a great thing that you care about it so passionately.

@Arnie this blog post is about a particular issue, and for this particular issue I didn’t receive any help from Pidgin developers, and a lot from Rasmus. Without his help it wouldn’t have been possible to track down the issue and verify the fix.

I am not saying Pidgin developers don’t deserve credit for all the other things they have done.

I give credit to who deserves credit, and I call plagiarism to what I see as plagiarism.

I do not believe that “they copied”, but common, pidgin developers (generalizaton, glup) have not being nice and they will never change. The famous change in the chat box height is a prove, and also audio/video support.
Please, do not be upset and let it go. Maybe after Ubuntu changing to telephaty, pidgin’s devs will start to listen…
THANKS for the good work, and keep going!

@james So petty? I don’t need or want my code to be closed, I want people to use it, whether it’s on the official libpurple plugin, or msn-pecan. I even helped the Pidgin guys to understand the problem, which encouraged to fix it on their side.

Still, I would have assumed they would have given credit where credit due; they didn’t, and that’s called plagiarism. If you have problems with me calling things by it’s name; that’s *your* problem.

And you are *wrong*. People give credit all the time in the open-source. If you don’t believe me here’s a simple command you can run on the linux source-code:git log | grep -e '-by: ' | grep -v 'Signed-off-by: ' | sed -e 's#^\s\+\(.*-by\):.*#\1#' | sort | uniq -c | sort -n