Skip to content

Instantly share code, notes, and snippets.

Thu Dec 3 17:16:57 Mongo DB : starting : pid = 483 port = 27017 dbpath = /local/mongo/ master = 0 slave = 0 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
** see http://blog.mongodb.org/post/137788967/32-bit-limitations for more
Thu Dec 3 17:16:57 db version v1.1.3, pdfile version 4.5
Thu Dec 3 17:16:57 git version: aa8b12e13fbbdfb293d94786dcc0df589cabef99
Thu Dec 3 17:16:57 sys info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686
Thu Dec 3 17:16:57 waiting for connections on port 27017
Thu Dec 3 17:17:00 connection accepted from 127.0.0.1:36528 #1
--- MongoDB-0.26/xs/Connection.xs 2009-11-05 17:19:25.000000000 -0800
+++ MongoDB-0.26/xs/Connection.xs.patched 2009-12-04 12:37:10.000000000 -0800
@@ -186,11 +186,25 @@
mongo_link *link;
CODE:
link = (mongo_link*)perl_mongo_get_ptr_from_instance(self);
+
if (link->paired) {
+#ifdef WIN32
+ closesocket(link->server.pair.left_socket);
[root@ii50-9 (13:29:58) ~]# gearmand
Segmentation fault
[root@ii50-9 (13:30:03) ~]# strace gearmand
execve("/usr/sbin/gearmand", ["gearmand"], [/* 35 vars */]) = 0
brk(0) = 0x867c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=62240, ...}) = 0
mmap2(NULL, 62240, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fc3000
close(3) = 0
Name: gearmand
Version: 0.11
Release: 1%{?dist}
Summary: A distributed job system
Group: System Environment/Daemons
License: BSD
URL: http://www.gearman.org
Source0: http://launchpad.net/gearmand/trunk/%{version}/+download/gearmand-%{version}.tar.gz
Source1: gearmand.init
[root@ii50-9 (15:58:36) ~]# which gearmand
/usr/sbin/gearmand
[root@ii50-9 (15:58:39) ~]# gdb /usr/sbin/gearmand
GNU gdb Fedora (6.8-37.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
[root@ii50-9 (16:28:39) /usr/src/redhat/BUILD/gearmand-0.11]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
[root@ii50-9 (16:39:43) /usr/src/redhat/SPECS]# gearmand -u nobody &
[1] 1254
[root@ii50-9 (16:39:45) /usr/src/redhat/SPECS]#
[root@ii50-9 (16:39:46) /usr/src/redhat/SPECS]# cpan2rpm --release=ffi2 Gearman::XS
-- cpan2rpm - Ver: 2.028 --
Signatures not set up
Upgrade check
Fetch: HTTP
[root@ii50-9 (11:40:39) /usr/src/redhat/SOURCES]# cp Gearman-XS-0.7.tar.gz /tmp
[root@ii50-9 (11:40:57) /usr/src/redhat/SOURCES]# cd /tmp
[root@ii50-9 (11:40:58) /tmp]# tar -xzvf Gearman-XS-0.7.tar.gz
Gearman-XS-0.7/
Gearman-XS-0.7/inc/
Gearman-XS-0.7/inc/Module/
Gearman-XS-0.7/inc/Module/Install.pm
Gearman-XS-0.7/inc/Module/Install/
Gearman-XS-0.7/inc/Module/Install/AutoInstall.pm
Gearman-XS-0.7/inc/Module/Install/Makefile.pm
cat t/test_server.pl>
#!/usr/bin/env perl
#
# Gearman Perl front end
# Copyright (C) 2009 Dennis Schoen
# All rights reserved.
#
# This library is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself, either Perl version 5.8.9 or,
[root@ii83-2 (14:01:44) ~/mongodb-linux-i686-1.1.4/bin]# ./mongo
MongoDB shell version: 1.1.4
url: test
connecting to: test
type "help" for help
> use common
switched to db common
> db.createCollection("arrtest");
{ "ok" : 1 }
> j={"random":"some crap","tester":["test1","test2","test3"]}