Core dump when running the MyBB import script


(Dan Dascalescu) #1

I get the same error message as in this post when running the MyBB importer as I’ve described here:

$ RAILS_ENV=production ruby mybb2.rb
loading existing groups...
loading existing users...
loading existing categories...
loading existing posts...
loading existing topics...

creating users
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.7/lib/patches/db/mysql2.rb:6: [BUG] Segmentation fault
ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux]

[... about 3000 lines snipped ...]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

The script does include the latest fix. By the way, while at it, can someone please merge in my PR that fixes the migration of quotes?


(Jeff Wigal) #2

I’m seeing the same on this end as well, not in the same place, but definitely the same segfault.


(Gerhard Schlager) #3

I had a similar problem with the phpBB3 importer.
Try changing the cache_rows to true.

If that doesn’t help try upgrading the mysql2 gem:
gem update mysql2


(Jeff Wigal) #4

Oh cool, that looks like it works. Thanks!


(Dan Dascalescu) #5

cache_rows: true prevents the crash.

MyBB imports used to work until a few weeks ago. The crash is a regression and blocks not only imports, but also certain kinds of batch processing.

Can we please get an official fix? CC @zogstrip, @techAPJ, @riking

UPDATE removing cache_rows altogether also prevents the crash. I did downgrade the mysql gem to v0.3.20 though.


(Sam Saffron) #6

I JUST saw that today … we got to raise this issue with the mysql2 gem…its crash central with cache_rows: true. Can you raise that with them together with the segfault?

This is a reasonably new issue, was working fine a few weeks ago. Now it is bust on pretty much every ruby version.

Never mind … will raise …


(Dan Dascalescu) #7

Thanks @sam. How can one revert to a working state of the gem and whatever else is involved? I only need to obtain a map of old_topic_id -> imported topic_id to create a redirect map file, and the importer itself was the easiest way to get that.


(Sam Saffron) #8

I can’t find the core dump and am in the middle of an import, can you do a gist of it?


(Dan Dascalescu) #9

(Jeff Atwood) #10

Unless you are a paying customer, you are not obligated to our time. If you continue to make demands like this, either buy a hosting contract, or with all due respect, take your demands somewhere else.


(Dan Dascalescu) #11

I know. Discourse is an OSS project. To which I contributed many hours to the best of my abilities.

I didn’t make any demand. I said “please”. Maybe too many times. Please accept my apologies.


(Sam Saffron) #12

I raised the issue here:

https://github.com/brianmario/mysql2/issues/691

Totally fine with a PR that removes all the cache_rows: true from the importers using mysql2 for now.


(Erlend Sogge Heggen) #13

This appears to have been fixed:


(Erlend Sogge Heggen) #14