Uploaded image for project: 'Perl Driver'
  1. Perl Driver
  2. PERL-169

MongoDB does not work properly with Arm architecture

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 0.45
    • Fix Version/s: None
    • Component/s: Perl driver
    • Labels:
    • Environment:
      Linux metron 2.6.32-00007-g56678ec #1 PREEMPT Thu Dec 24 03:15:48 PST 2009 armv5tel GNU/Linux

      Description

      The driver appears to be unable to connect to the MongoDB database when auto_connect = 1. With some hacking I found that if I set auto_connect = 0, and manually call connect, and instead of using $conn->db_name I do $conn->get_database('db_name'); (same for collection) I can insert values into mongodb without a problem.

      When I use the mongo client to view the data it looks fine, however when I try to pull the data out of Mongo in perl, the data is just plain wrong. Strings sometimes cause a segfault. Here is an example

      From Mongo

      { "_id" : ObjectId("4fc2f0720920c1a444000009"), "measurement_group_id" : 9, "status" : 1, "time" : 1338175602, "pf" : 0, "amps" : 0, "watts" : 0 }

      From Perl
      $VAR1 = {
      'measurement_group_id' => '9',
      'time' => 6680690,
      'status' => 1,
      '_id' => bless(

      { 'value' => '4fc2f0720920c1a444000009' }

      , 'MongoDB::OID' ),
      'amps' => 0,
      'pf' => 6684672,
      'watts' => 7566336
      };

      I'm at a bit of a loss for the cause of this.

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: