Nearly 5000 members invited to an old conversation (cause unknown)

dutchbb

Well-known member
We experienced a very weird issue which IMO can only be described as a bug. Yesterday something went wrong with our conversations system. For no reason I could find so far, 4999 members were forcefully added to a conversation (I don't think they got an invitation). We can not tell if this has been done by anyone (hack), it just happened without any motive AFAIK.

Of course a lot of emails were send out and members replied and told us they didn't ask for them, many did not understand why they were added or did not even know about the conversation. People even reported us as spammers because of many got over 20 mails send to their address. This was a chaotic moment and we decided to recover from a backup of the day before, since there wasn't enough time to figure out what was happening.

Here's a screen of the conversation info:

conversation bug.webp

Some background:

* We are running version 1.5.6
* No add-ons installed related to conversations, see this list:

add-ons_installed.webp

* About 8M posts and also many PMs were imported from vBulletin 3.8 in 2015 around september, no issues since then, until March 5 2016 this happened.
* a few days before, I (as admin) have left this and some other conversations, to clean up my inbox a bit
* We were not working at the forums when this happened and no server error can be found.

If you need more information regarding this, please let me know. I can also provide login info.

We really need to know why this happened since we can not afford this to happen again.
 
Last edited:
Could this not be just the originator of the conversation adding people (as a spam thing)?

Surely there has to be a first message which would give you a clue as to who/why?
 
Could this not be just the originator of the conversation adding people (as a spam thing)?

Surely there has to be a first message which would give you a clue as to who/why?
No, it was a an old PM I (admin) have send in June 17, 2014 in vBulletin 3.8, this was imported to a conversation in 2015 and I recently left it in XenForo.

You never answered my questions on the ticket - which importer did you use and did you do the import yourself or did someone do it for you?
Yes it has been very hectic, I needed to spend time getting everything back online. I have the time to respond now.

I used the build in importer (Tools > Import External Data).
 
Do you have the database in a state after this happened?

I'd like to see all the data relating to this conversation (by conversation_id) in these tables:
  • xf_conversation_master
  • xf_conversation_recipient
  • xf_conversation_user
Ideally, that same data from before the incident (your backup) would be useful too.

I assume people replied to this conversation after being added to it, which unfortunately makes it much more difficult to gather specific data.
 
Sorry I'm not sure what 'in a state ' means, but we chose to restore from a backup from the day before shortly after the issue occurred in order to normalize the situation ASAP. We did not make a backup of the active problematic database because we thought it had become corrupt and unusable and there was no time to find out how to repair it.

Here's the requested info
(Conversation ID: 385872)

This is how it currently is in the database:

xf_conversation_master:

xf_conversation_master.webp

xf_conversation_recipient:

xf_conversation_recipient.webp

xf_conversation_user:

xf_conversation_user.webp

8 post were placed in the conversation , by 5 different users excluding me as admin and starter.


The conversation still exists in this recovered backup, I'm not sure what to do with it. It increases our general server load, as the page is very long and slow due to the long list of participants:

Code:
Timing: 1.9573 seconds Memory: 57.466 MB DB Queries: 9

So any advice on how to safely get rid of it is appreciated. I also wonder if it would be advisable to force all users leaving imported PMs/conversations to prevent problems from occurring again. But I'm not going to do anything without approval from XF of course.

If other (older) data is required, I can perhaps ask my host. Hope this helps.
 
If that is the current database then it would suggest the data has always been like that since the import, possibly due to the source data or a problem during the import?

If it's not an important conversation, it can be deleted using several queries.

I also wonder if it would be advisable to force all users leaving imported PMs/conversations to prevent problems from occurring again
If you mean for all conversations, I wouldn't necessarily recommend that.
Your members may not like having their conversations mass removed in that manner.
Unless of course you want to wipe them all and start over?
 
It certainly appears that all of those users were already in the conversation. I'm guessing someone just replied to it. It's difficult to comment as to why that would have happened. There's nothing that can be taken from those DB screenshots unfortunately. The fact that the user IDs are contiguous is interesting though.

That said, the official importer only imports 1 message per conversation. This is reporting a bunch of replies so that doesn't seem to mesh unless people have been replying to it after the import. If that's the case, we need to know. If it's not the case, I have to guess that there's inconsistent data in the DB. You mentioned using the built-in importer, but have you ever done any other imports that weren't using that? If this left orphaned data in the DB, this could most definitely have been triggered by that.
 
If that is the current database then it would suggest the data has always been like that since the import, possibly due to the source data or a problem during the import?

If it's not an important conversation, it can be deleted using several queries.


If you mean for all conversations, I wouldn't necessarily recommend that.
Your members may not like having their conversations mass removed in that manner.
Unless of course you want to wipe them all and start over?

It certainly appears that all of those users were already in the conversation. I'm guessing someone just replied to it. It's difficult to comment as to why that would have happened. There's nothing that can be taken from those DB screenshots unfortunately. The fact that the user IDs are contiguous is interesting though.

That said, the official importer only imports 1 message per conversation. This is reporting a bunch of replies so that doesn't seem to mesh unless people have been replying to it after the import. If that's the case, we need to know. If it's not the case, I have to guess that there's inconsistent data in the DB. You mentioned using the built-in importer, but have you ever done any other imports that weren't using that? If this left orphaned data in the DB, this could most definitely have been triggered by that.

@Brogan: Come to think of it, I've send this as a mass PM in vBulletin, with a modification of vB.org I believe. Perhaps that has something to do with it.

I really needed to import PMs from vB to Xen since many of the members really wanted to keep them. Otherwise I would not have them imported.

I now prefer to keep most conversations. The only problem is some of them may also be mass PMs imported from vB. If these indeed are the cause of the problem, the idea is to only remove everyone from conversations that were imported from vB PMs (meaning before a certain date).

@Mike yes the conversation was imported without comments, they were added only recently looking at the dates. I'm not sure the long list of participants was there visible from te beginning though.*

I had done test imports before, but always with a clean destination database.

If my presumptions are right, I need to get rid of the conversations that used to be mass PMs in vBulletin, before anyone replies on them. Me leaving these doesn't solve the problem, so I think I need to run a query to force everyone to leave these conversations so they aren't present in their inboxes? I just wonder what the best way to do this would be, ie what query to run without causing more problems.

*Edit: I can confirm in other conversations that were imported from vB mass PMs, there are also thousands of participants shown. So it all makes sense now.
 
Last edited:
@Brogan: Come to think of it, I've send this as a mass PM in vBulletin, with a modification of vB.org I believe. Perhaps that has something to do with it.
It sounds entirely plausible.

So the issue is likely with the source data then, as suspected, and someone replied to the conversation, triggering the emails, making it active for all participants, etc.
 
I thought of closing the conversation in my inbox, but realized that probably doesn't prevent users from replying to it in their own inbox right?

So still need advice on how to get rid of these conversations, I have the ID's, but need to create a query to select them, then force all participants to leave them right?
 
Take a backup before running these queries.
Code:
DELETE FROM xf_conversation_master WHERE conversation_id = 385872;

DELETE FROM xf_conversation_message WHERE conversation_id = 385872;

DELETE FROM xf_conversation_recipient WHERE conversation_id = 385872;

DELETE FROM xf_conversation_user WHERE conversation_id = 385872;


That should delete that particular conversation from the database.

I have also moved the thread from bug reports to troubleshooting, as it doesn't appear to be an XF bug.
 
Last edited:
Thanks, with delete you mean participants will no longer view them or be able to reply to them right?

I actually found 18 of these conversations in total, however many of them have 1000 participants or more. Can I add multiple conversation IDs to every query to not have to do each of them separately, or would that be too server intensive? And if possible how to formulate multiple ids?

I definitely agree this is not a XenForo bug, however, admins coming from vBulletin should be aware (and perhaps warned) that any imported mass PM can cause this issue in XF's conversation if members reply to them.
 
FWIW, the importer appears to only read the "touserarray" value from the source, so I assume (don't recall) that this is just who the original PM was "To" and thus the list was (presumably) published to each user that received it before. Maybe it was using BCC, but there isn't really a viable alternative import approach here as that's effectively how it was structured before.
 
@Brogan I ran this

DELETE * FROM xf_conversation_master WHERE conversation_id = 385872;

got

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '* FROM xf_conversation_master WHERE conversation_id = 385872' at line 1
 
Top Bottom