scsi: VA Logo (Default)
scsi ([personal profile] scsi) wrote in [site community profile] dw_dev2009-08-17 03:16 pm
Entry tags:

Code on 32 bit arch (and other stuff).

Hi everyone! I'm Frank and I'm in charge of the DJ code upgrade from old LJ -> DW. If you get tired of my dev posting just holler and I'll move everything over to zilla. Yes, I am the guy who started/ran-forever DeadJournal.

I just got a snapshot of the old DJ database up and runnning on the DW code. Ran update-db.pl (that script gives me heartburn like you would never believe). All db modifications/changes and theme population etc ran without error.

This is a standard debian etch install. Nothing special about it.

Going to a journal brings up the journal/theme/userpic/etc (hooray). However clicking to view comments gives me a 500 error with the following in the error log:

[Mon Aug 17 21:49:44 2009] [error] [client 10.172.20.254] Invalid type 'Q' in pack at /home/dj/cgi-bin/LJ/Entry.pm line 1492.\n, referer: http://scsi.dj.dmz.vadept.com/

Line 1492 (when Columbus sailed the ocean blue, or mid-way through get_log2_row) reads:

# note: this cannot distinguish between security == private and security == usemask with allowmask == 0 (no groups)
# both should have the same display behavior, but we don't store the security value in memcache
$row = pack("NNNQN", $item->{'posterid'}, $eventtime, $logtime, $sec,
$item->{'ditemid'});

As far as I can read, Q is 64-bit arch only, which my test server is not. http://perldoc.perl.org/functions/pack.html

Changing that Q to an N makes it work (although it doesn't bring up any titles in the comments, and the update-db.pl script was complaining about unknown table logsubject2) however it makes apache segfault almost continuously.

This "Q" pack is in multiple places in Entry.pm from posting to viewing, etc. Maybe a config option for 64 vs 32 bit archs? Am I in left field?
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2009-08-17 10:47 pm (UTC)(link)
We've been requiring people to use 64 bit OS/machines. It's 2009, do people really have 32 bit kicking around that much?

I know that in some cases (people running a linux box at home) they're still 32...but most production hardware setups (as well as VPS like Slicehost/Linode/etc) should have the ability to run 64 bit.

Is 32 a hard requirement for you?
cryo: (Default)

[personal profile] cryo 2009-08-18 04:18 am (UTC)(link)
This is incorrect. Our instance is 32bit, and the DW code will -have to- work in 32bit for us to be able to use it. We can not increase our instance to large (64bit, multiple core, etc) without significant financial injection which isn't going to happen.

I do not see how the code would -require- 64bit address space and instructions. Using 64bit size files for database, etc has been around for quite a while, but I need more information on what the exact issue is.

I guess there needs to be a bug # to complain on more.
denny: Photo of my face in profile - looking to the right (Default)

[personal profile] denny 2009-08-18 09:24 am (UTC)(link)
I think there was some 64-bit stuff around handling custom access filters, but it should probably back out okay if you're good with keeping the old limits.
dreamatdrew: An orange leopard gecko half hiding behind the leaf of a 'lucky bamboo' plant, looking directly at you. (Default)

RE: It's 2009, do people really have 32 bit kicking around that much?

[personal profile] dreamatdrew 2009-08-18 05:56 am (UTC)(link)
While I realize I may not count as typical, I'll throw this out there...

I currently have *counts* 5 functioning systems within in my sphere of influence. (Translation: that I can modify with impunity.) Only one of those is a 64-bit system. (Also, feel loved, that system was only acquired recently so that I could code-poke DW with sticks.)

denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2009-08-17 11:00 pm (UTC)(link)
I cannot speak to your technical problem, but I can say:

* Please, please, please post to this community as much as necessary as you go through the process! Our install/upgrade documents are kinda shit at this point; we know they are, and are working on them, but it's slow going.

* Anything you run into that seems weird or counterintuitive, anything you think needs documenting, or anything that makes you go "damn I wish I'd known that", please do note on the Wiki so future generations can benefit from your knowledge, pain, and suffering.

* EEEEEEE YOU GUYS ARE GONNA USE OUR STUFF OMG THIS IS SO EXCITING OMG OMG OMG *ahem*

foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)

[personal profile] foxfirefey 2009-08-17 11:02 pm (UTC)(link)
Speaking of wiki stuff--you are also free to post at [site community profile] dw_wiki if you have issues/suggestions/questions etc.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2009-08-17 11:29 pm (UTC)(link)
That is totally made of awesome. Whatever you need during this process, just let us know, and we will do our absolute best to get it for you!

Also, if you find things that you need to patch as you go, you know where Bugzilla is :) Just be sure to fill out a CLA.

(EDIT: And, barring the level of support the LJ codebase has or doesn't have, it doesn't change the fact that we built this, and you are using it, omg omg omg. That thrill will never get old. Ever.)
Edited 2009-08-17 23:30 (UTC)
foxfirefey: A firework bursts over the Las Vegas night skyline. (yay)

[personal profile] foxfirefey 2009-08-17 11:01 pm (UTC)(link)
Oh wow! Welcome! I'm really glad somebody is looking into converting old LJ installs to DW code, it's really nifty that you're doing this.
cheyinka: A sketch of a Metroid with colors inverted (tiny metroid)

Squee!

[personal profile] cheyinka 2009-08-17 11:31 pm (UTC)(link)
Eeeee yay you're updating DJ to DW code! (No, I don't have any useful help. I just have squee. My first journal was there (is still...) so it makes me happy to hear about the upgrade :)
jimmyb: (Default)

[personal profile] jimmyb 2009-08-18 01:49 am (UTC)(link)
I'd love to see where this goes as well. I want to upgrade Scribbld.net to the DW codebase.
allen: (kyus)

[personal profile] allen 2009-08-18 02:29 am (UTC)(link)
Hi.

FYI, I do most of my development on a VM on a 32-bit laptop. My current convert-back-to-32-bit patch basically converts all the NNNQN's to NNNLN's and the security allowmask field from 2**63 to 2**31. Those changes are all in Entry.pm and ljprotocol.pl. It seems to run fine that way for me.

Of course, if you can run 64-bit, you're a lot better off doing so.
cryo: (Default)

[personal profile] cryo 2009-08-18 04:19 am (UTC)(link)
I think you're on to something :)
cryo: (Default)

[personal profile] cryo 2009-08-19 06:43 am (UTC)(link)
plz2b using bugzilla for the patch attachment kthxbai
alierak: (Default)

[personal profile] alierak 2009-08-18 06:09 am (UTC)(link)
The work on bug 355 also touches some 64-bit math in various other files, fwiw.
cryo: (Default)

[personal profile] cryo 2009-08-19 06:41 am (UTC)(link)
Can you add bug 1632 to depend on it?