Subject: Re: mysqldump fails under NetBSD
To: Fredrik Carlsson <fredrik@netbsd.se>
From: matthew sporleder <msporleder@gmail.com>
List: netbsd-users
Date: 05/06/2007 17:54:47
On 5/6/07, Fredrik Carlsson <fredrik@netbsd.se> wrote:
>
> >> Sorry, of course it should be from the command and not the script ;)
> >>
> >> The problem is that the ktruss output is even bigger than the dump, is
> >> there some specific part that would be interesting? I don't think i want
> >> to publish the whole thing.
> >>
> >
> > probably error part of ktruss dump e.g. 20lines of code before mysqldump
> > receives error.
> >
> > Regards
> > - ---------------------------------------------------------------
> > Adam Hamsik
> >
> >
> Here is another attempt, I have attached the last 200 lines from ktruss.
>
> // Fredrik
>
>  29810      1 mysqldump RET   read 4608/0x1200
>  29810      1 mysqldump CALL  setsockopt(3,0xffff,0x1006,0x7f7fffffd140,0x10)
>  29810      1 mysqldump RET   setsockopt -1 errno 33 Numerical argument out of domain
>  29810      1 mysqldump CALL  setsockopt(3,0xffff,0x1006,0x7f7fffffd140,0x10)
>  29810      1 mysqldump RET   setsockopt -1 errno 33 Numerical argument out of domain
>  29810      1 mysqldump CALL  setsockopt(3,0xffff,0x1006,0x7f7fffffd140,0x10)
>  29810      1 mysqldump RET   setsockopt -1 errno 33 Numerical argument out of domain
>  29810      1 mysqldump CALL  setsockopt(3,0xffff,0x1006,0x7f7fffffd140,0x10)
>  29810      1 mysqldump RET   setsockopt -1 errno 33 Numerical argument out of domain
>  29810      1 mysqldump CALL  read(3,0x528000,0x4000)
>  29810      1 mysqldump GIO   fd 3 read 580 bytes
>        "php
>
>         -/* $Id: install-pear.php,v 1.6.2.14.4.5 2005/11/05 18:21:20 cellog Exp $ */
>         +/* $Id: install-pear.php,v 1.6.2.14.4.6 2006/01/02 15:24:33 cellog Exp $ */
>
>          error_reporting(E_ALL);
>          $pear_dir = dirname(__FILE__);
>          ini_set('include_path', $pear_dir);
>         +if (function_exists('mb_internal_encoding')) {
>         +    mb_internal_encoding('ASCII');
>         +}
>          set_time_limit(0);
>          include_once 'PEAR.php';
>          include_once 'PEAR/Installer.php';
>
>         --
>         PHP CVS Mailing List (http://www.php.net/)
>         To unsubscribe, visit: http://www.php.net/unsub.php
>
>         \^C453.\0\0\M^K\M^?\^E\0#HY000Out of memory (Needed 10584656 bytes)"
>  29810      1 mysqldump RET   read 580/0x244
>  29810      1 mysqldump CALL  setsockopt(3,0xffff,0x1006,0x7f7fffffd140,0x10)
>  29810      1 mysqldump RET   setsockopt -1 errno 33 Numerical argument out of domain
>  29810      1 mysqldump CALL  write(1,0x62c000,0x32f3)
>  29810      1 mysqldump GIO   fd 1 wrote 4088 bytes
>        "r at or near \\\"add_one\\\" at character 1\\nLINE 1: add_one(int 1);\\n\\ncan you help please!thanks in advance\\n\\n___\
>         ______________________________________________________________\\nFREE pop-up blocking with the new MSN Toolbar - get it n\
>         ow! \\nhttp://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/\\n\\n\\n---------------------------(end of broadcast\
>         )---------------------------\\nTIP 5: don\\'t forget to increase your free space map settings\\n',330),(1612453,'Kelley R\
>         eynolds wrote:\\n\\n> On Jan 1, 2006, at 8:52 PM, Peter wrote:\\n>\\n>> I have written an IP accounting system using pf l\
>         abels.  It runs  \\n>> every 5\\n>> minutes and extracts stats for data entering and leaving my lan.   It \\n>> works\\n>\
>         > nicely but I want to go to the next level and graph this data at each\\n>> interval.\\n>>\\n>\\n> I wrote one in ruby t\
>         hat uses rrdtool for stat tracking and graph  \\n> generation. I planned on writing another more flexible one using BPF  \
>         \\n> so I didn\\'t bother telling anybody about it. If anybody is interested  \\n> in seeing it, let me know.\\n>\\n> Kel\
>         ley Reynolds\\n> President\\n> Inside Systems, Inc.\\n\\nIt would be nice to take a look at your rrdtool system :-). I ha\
>         ve one \\nof my own which is named pf2mrtg you can check it out in \\nwww.securelabs.org/scripts.html which is based on m\
>         rtg and pf \\nlabels.Thanks in advance :-)\\n',13),(1612454,'This is a loaded question...\\nI can only tell you that I sp\
>         ent several years working on linux only to \\ndiscover I like freeBSD and especially freeBSD 6 the best.  Its clean, \\nw\
>         ell organized, and has great support.  You simply have to try it to see \\nif its for you.\\nke han\\n\\nMohammed Arab wr\
>         ote:\\n> Hi,\\n> \\n> \\n>   I have question regarding which operating system is a best and which one I\\n> should have t\
>         ake. Actually I am a system administrator in widows server\\n> system and I am planning to study Unix system but I do not\
>          know which one is\\n> good and easy, as you know there are many Unix system in the marketing. Can\\n> you please help me\
>         ?\\n> \\n> \\n> \\n> Best Regards,\\n> \\n> Mohammed Arab\\n> _______________________________________________\\n> freebsd\
>         -questions@freebsd.org mailing list\\n> http://lists.freebsd.org/mailman/listinfo/freebsd-questions\\n> To unsubscribe, s\
>         end any mail to \\\"freebsd-questions-unsubscribe@freebsd.org\\\"\\n> \\n\\n_____________________________________________\
>         __\\nfreebsd-questions@freebsd.org mailing list\\nhttp://lists.freebsd.org/mailman/listinfo/freebsd-questions\\nTo unsubs\
>         cribe, send any mail to \\\"freebsd-questions-unsubscribe@freebsd.org\\\"\\n',47),(1612455,'Hank wrote:\\n\\n>Don\\'t you\
>          want the queries to be \\\"outer join\\\" and not \\\"left join\\\"?\\n\\n??? A left join IS an outer join.\\n\\nPB\\n\\\
>         n\\n-- \\nNo virus found in this outgoing message.\\nChecked by AVG Free Edition.\\nVersion: 7.1.371 / Virus Database: 26\
>         7.14.9/217 - Release Date: 12/30/2005\\n\\n\\n-- \\nMySQL General Mailing List\\nFor list archives: http://lists.mysql.co\
>         m/mysql\\nTo unsubscribe:    http://lists.mysql.com/mysql?unsub=\\n\\n',10),(1612456,'Dear Sirs,\\n\\n\
>         Have you tried to build gcc 4.0.2 from the source on\\nWindows XP Pro?\\n\\nHere is what I did.\\n\\n1. Downloaded gcc-4.\
>         0.2.tar.gz.\\n2. Checked integrity of gcc-4.0.2.tar.gz using md5 and\\njacksum.\\n3. Downloaded MinGW-4.1.0.exe.\\n4. Ins\
>         talled gcc version 3.4.2 (mingw-special).\\n5. Downloded and installed msys 1.0.10.\\n6. Copied lib directory from  c:/mi\
>         ngw to \\n/home/akrivitsky1 (here msys notation is used).\\n7. unpacked gcc-4.0.2.tar.gz into\\n/home/akrivitsky1/gcc-4.0\
>         .2\\n8. Within msys  typed\\nLIBRARY_PATH=/home/akrivitsky1/lib\\n9. Within msys mkdir mywin32\\n10. cd mywin32\\n11. Try\
>         ed several combinations of options and\\nparameters of /home/akrivitsky1/gcc-4.0.2/configure \\n12. Tryed several combina\
>         tions of make\\nEnd result of all this is \\n*********************************************begin\\n/home/akrivitsky1/gcc-4\
>         .0.2/gcc/input.h: No such file\\nor directory\\nmake[1]: *** [s-gtype] Error 1\\nmake[1]: Leaving directory\\n`/home/akri\
>         vitsky1/mywin32/gcc\\'\\nmake: *** [all-gcc] Error 2\\n**********************************************end\\nfor each comb"
>  29810      1 mysqldump GIO   fd 1 wrote 4088 bytes
>        "ination of comfigure/make I tryed.\\nBefore configure and make\\n/home/akrivitsky1/gcc-4.0.2/gcc/input.h existed. \\nManu\
>         al copying this file to  said directory does not\\ndo any good either.\\n\\nCan it be some kind of bug in some make/confi\
>         gure file\\nfrom gcc 4.0.2 distribution?\\n\\nCan you please send me what is needed to  be typed for\\nconfigure   and ma\
>         ke to  build gcc 4.0.2?  \\n\\nThank you very much.\\n\\nRegards,\\nAnatoly\\n\\n\\n',344),(1612457,'Author: martin.v.loe\
>         wis\\nDate: Mon Jan  2 16:22:55 2006\\nNew Revision: 41869\\n\\nModified:\\n   python/branches/ssize_t/Python/Python-ast.\
>         c\\nLog:\\nRegegenerated.\\n\\n\\nModified: python/branches/ssize_t/Python/Python-ast.c\\n===============================\
>         ===============================================\\n--- python/branches/ssize_t/Python/Python-ast.c       (original)\\n+++ \
>         python/branches/ssize_t/Python/Python-ast.c     Mon Jan  2 16:22:55 2006\\n@@ -1098,70 +1098,70 @@\\n \\n \\n #define CHE\
>         CKSIZE(BUF, OFF, MIN) { \\\\\\n-        int need = *(OFF) + MIN; \\\\\\n-       if (need >= PyString_GET_SIZE(*(BUF))) { \
>         \\\\\\n-                int newsize = PyString_GET_SIZE(*(BUF)) * 2; \\\\\\n-           if (newsize < need) \\\\\\n-    \
>                         newsize = need; \\\\\\n-                if (_PyString_Resize((BUF), newsize) < 0) \\\\\\n-              \
>                 return 0; \\\\\\n-      } \\\\\\n-} \\n+        int need = *(OFF) + MIN; \\\\\\n+        if (need >= PyString_GET\
>         _SIZE(*(BUF))) { \\\\\\n+                int newsize = PyString_GET_SIZE(*(BUF)) * 2; \\\\\\n+                if (newsize\
>          < need) \\\\\\n+                        newsize = need; \\\\\\n+                if (_PyString_Resize((BUF), newsize) < 0\
>         ) \\\\\\n+                        return 0; \\\\\\n+        } \\\\\\n+}\\n \\n-static int \\n+static int\\n marshal_write\
>         _int(PyObject **buf, int *offset, int x)\\n {\\n-       char *s;\\n+        char *s;\\n \\n-    CHECKSIZE(buf, offset, 4)\
>         \\n-    s = PyString_AS_STRING(*buf) + (*offset);\\n-   s[0] = (x & 0xff);\\n-  s[1] = (x >> 8) & 0xff;\\n-     s[2] = (x\
>          >> 16) & 0xff;\\n-     s[3] = (x >> 24) & 0xff;\\n-    *offset += 4;\\n-       return 1;\\n+        CHECKSIZE(buf, offse\
>         t, 4)\\n+        s = PyString_AS_STRING(*buf) + (*offset);\\n+        s[0] = (x & 0xff);\\n+        s[1] = (x >> 8) & 0xf\
>         f;\\n+        s[2] = (x >> 16) & 0xff;\\n+        s[3] = (x >> 24) & 0xff;\\n+        *offset += 4;\\n+        return 1;\
>         \\n }\\n \\n-static int \\n+static int\\n marshal_write_bool(PyObject **buf, int *offset, bool b)\\n {\\n-      if (b)\\n\
>         -               marshal_write_int(buf, offset, 1);\\n-  else\\n-                marshal_write_int(buf, offset, 0);\\n-  r\
>         eturn 1;\\n+        if (b)\\n+                marshal_write_int(buf, offset, 1);\\n+        else\\n+                marsh\
>         al_write_int(buf, offset, 0);\\n+        return 1;\\n }\\n \\n-static int \\n+static int\\n marshal_write_identifier(PyOb\
>         ject **buf, int *offset, identifier id)\\n {\\n-        int l = PyString_GET_SIZE(id);\\n-      marshal_write_int(buf, of\
>         fset, l);\\n-   CHECKSIZE(buf, offset, l);\\n-  memcpy(PyString_AS_STRING(*buf) + *offset,\\n-         PyString_AS_STRING\
>         (id), l);\\n-   *offset += l;\\n-       return 1;\\n+        int l = PyString_GET_SIZE(id);\\n+        marshal_write_int(\
>         buf, offset, l);\\n+        CHECKSIZE(buf, offset, l);\\n+        memcpy(PyString_AS_STRING(*buf) + *offset,\\n+         \
>               PyString_AS_STRING(id), l);\\n+        *offset += l;\\n+        return 1;\\n }\\n \\n-static int \\n+static int\\n \
>         marshal_write_string(PyObject **buf, int *offset, string s)\\n {\\n-    int len = PyString_GET_SIZE(s);\\n-     marshal_w\
>         rite_int(buf, offset, len);\\n- CHECKSIZE(buf, offset, len);\\n-        memcpy(PyString_AS_STRING(*buf) + *offset,\\n-   \
>               PyString_AS_STRING(s), len);\\n-  *offset += len;\\n-     return 1;\\n+        int len = PyString_GET_SIZE(s);\\n+ \
>                marshal_write_int(buf, offset, len);\\n+        CHECKSIZE(buf, offset, len);\\n+        memcpy(PyString_AS_STRING(\
>         *buf) + *offset,\\n+               PyString_AS_STRING(s), len);\\n+        *offset += len;\\n+        return 1;\\n }\\n \
>         \\n-static int \\n+static int\\n marshal_write_object(PyObject **buf, int *offset, object s)\\n {\\n-   /* XXX */\\n-   r\
>         eturn 0;\\n+        /* XXX */\\n+        return 0;\\n }\\n \\n \\n_______________________________________________\\nPytho\
>         n-checkins mailing list\\nPython-checkins@python.org\\nhttp://mail.python.org/mailman/listinfo/python-checkins\\n',445),(\
>         1612458,'sorry "
>  29810      1 mysqldump GIO   fd 1 wrote 4088 bytes
>        "I was stupid\\nforgot the select\\n\\n_________________________________________________________________\\nFREE pop-up blo\
>         cking with the new MSN Toolbar - get it now! \\nhttp://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/\\n\\n\\n---\
>         ------------------------(end of broadcast)---------------------------\\nTIP 3: Have you checked our extensive FAQ?\\n\\n \
>                       http://www.postgresql.org/docs/faq\\n',330),(1612459,'Seems nsswitch/winbind_nss_solaris.c in 3.0.21 assume\
>         s IPV6 which\\nSolaris 2.6/7 do not have:\\n\\nCompiling nsswitch/winbind_nss_solaris.c with -KPIC\\ncc -I. -I/opt/build/\
>         samba-3.0.21a/source  -I/opt/TWWfsw/krb5141/include -mr -Qn -xO2 -xtarget=generic -D_SAMBA_BUILD_ -I./popt -Iinclude -I/o\
>         pt/build/samba-3.0.21a/source/include -I/opt/build/samba-3.0.21a/source/ubiqx -I/opt/build/samba-3.0.21a/source/tdb -I/op\
>         t/build/samba-3.0.21a/source/smbwrapper -I. -I/opt/TWWfsw/krb5141/include -I/opt/TWWfsw/readline50/include -I/opt/TWWfsw/\
>         readline50/include -I/opt/TWWfsw/openldap2229/include -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/opt/TWWf\
>         sw/libiconv19/include -DLDAP_DEPRECATED -DSUNOS5 -I/opt/build/samba-3.0.21a/source -D_SAMBA_BUILD_     -KPIC -c nsswitch/\
>         winbind_nss_solaris.c -o nsswitch/winbind_nss_solaris.po.o\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 286: warning: i\
>         mplicit function declaration: _nss_winbind_initgroups_dyn\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 394: incomplete \
>         struct/union/enum in6_addr: sizeof()\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 395: incomplete struct/union/enum in6\
>         _addr: sizeof()\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 397: cannot do pointer arithmetic on operand of unknown si\
>         ze\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 421: cannot do pointer arithmetic on operand of unknown size\\n\\\"nssw\
>         itch/winbind_nss_solaris.c\\\", line 423: undefined symbol: AF_INET6\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 423: \
>         cannot do pointer arithmetic on operand of unknown size\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 433: warning: impl\
>         icit function declaration: IN6_INADDR_TO_V4MAPPED\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 433: cannot do pointer a\
>         rithmetic on operand of unknown size\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 491: undefined symbol: AF_INET6\\n\\\
>         \"nsswitch/winbind_nss_solaris.c\\\", line 540: undefined symbol: AF_INET6\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line\
>          545: warning: implicit function declaration: inet_ntop\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 546: undefined sym\
>         bol: INET6_ADDRSTRLEN\\n\\\"nsswitch/winbind_nss_solaris.c\\\", line 546: warning: improper pointer/integer combination: \
>         op \\\"=\\\"\\ncc: acomp failed for nsswitch/winbind_nss_solaris.c\\ngmake: *** [nsswitch/winbind_nss_solaris.po.o] Error\
>          2\\n\\n-- \\nalbert chin (china@thewrittenword.com)\\n',24),(1612460,'Mike,\\n\\n >I ended up using a subselect and that\
>          found the missing rows.\\n >I\\'m not sure why the left join didn\\'t work. I\\'ve been using them\\n >for years to find\
>          missing rows in tables.\\n\\nI think that suggests one of the indexes was munged.\\n\\nPB\\n\\nmos wrote:\\n\\n> At 08:3\
>         3 PM 1/1/2006, Hank wrote:\\n>\\n>> Don\\'t you want the queries to be \\\"outer join\\\" and not \\\"left join\\\"?\\n>\
>         \\n>\\n> A \\\"left join\\\" is a \\\"left outer join\\\".\\n> I ended up using a subselect and that found the missing ro\
>         ws. I\\'m not \\n> sure why the left join didn\\'t work. I\\'ve been using them for years to \\n> find missing rows in ta\
>         bles.\\n>\\n> Mike \\n>\\n\\n\\n-- \\nNo virus found in this outgoing message.\\nChecked by AVG Free Edition.\\nVersion: \
>         7.1.371 / Virus Database: 267.14.9/217 - Release Date: 12/30/2005\\n\\n\\n-- \\nMySQL General Mailing List\\nFor list arc\
>         hives: http://lists.mysql.com/mysql\\nTo unsubscribe:    http://lists.mysql.com/mysql?unsub=\\n\\n',10\
>         ),(1612461,'cellog              Mon Jan  2 15:24:34 2006 UTC\\n\\n  Modified files:              (Branch: PHP_4_4)\\n    \
>         /php-src/pear   install-pear.php \\n  Log:\\n  make sure mbstring doesn\\'t screw stuff\\n  \\nhttp://cvs.php.net/viewcvs\
>         .cgi/php-src/pear/install-pear.php?r1=1.6.2.14.4.5&r2=1.6.2.14.4.6&diff_format=u\\nIndex: php-src/pear/install-pear.php\\\
>         ndiff -u php-src/pear/install-pear."
>  29810      1 mysqldump GIO   fd 1 wrote 779 bytes
>        "php:1.6.2.14.4.5 php-src/pear/install-pear.php:1.6.2.14.4.6\\n--- php-src/pear/install-pear.php:1.6.2.14.4.5    Sat Nov  \
>         5 18:21:20 2005\\n+++ php-src/pear/install-pear.php     Mon Jan  2 15:24:33 2006\\n@@ -1,10 +1,13 @@\\n <?php\\n \\n-/* $\
>         Id: install-pear.php,v 1.6.2.14.4.5 2005/11/05 18:21:20 cellog Exp $ */\\n+/* $Id: install-pear.php,v 1.6.2.14.4.6 2006/0\
>         1/02 15:24:33 cellog Exp $ */\\n \\n error_reporting(E_ALL);\\n $pear_dir = dirname(__FILE__);\\n ini_set(\\'include_path\
>         \\', $pear_dir);\\n+if (function_exists(\\'mb_internal_encoding\\')) {\\n+    mb_internal_encoding(\\'ASCII\\');\\n+}\\n \
>         set_time_limit(0);\\n include_once \\'PEAR.php\\';\\n include_once \\'PEAR/Installer.php\\';\\n\\n-- \\nPHP CVS Mailing L\
>         ist (http://www.php.net/)\\nTo unsubscribe, visit: http://www.php.net/unsub.php\\n\\n',453);
>        "
>  29810      1 mysqldump RET   write 13043/0x32f3
>  29810      1 mysqldump CALL  write(2,0x7f7fffffd320,0x68)
>  29810      1 mysqldump GIO   fd 2 wrote 104 bytes
>        "mysqldump: Error 5: Out of memory (Needed 10584656 bytes) when dumping table `msg_body` at row: 1585029
>        "
>  29810      1 mysqldump RET   write 104/0x68
>  29810      1 mysqldump CALL  poll(0x7f7fffffd1f0,1,0)
>  29810      1 mysqldump RET   poll 0
>  29810      1 mysqldump CALL  setsockopt(3,0xffff,0x1005,0x7f7fffffd120,0x10)
>  29810      1 mysqldump RET   setsockopt -1 errno 33 Numerical argument out of domain
>  29810      1 mysqldump CALL  write(3,0xda8000,5)
>  29810      1 mysqldump GIO   fd 3 wrote 5 bytes
>        "\^A\0\0\0\^A"
>  29810      1 mysqldump RET   write 5
>  29810      1 mysqldump CALL  shutdown(3,2)
>  29810      1 mysqldump RET   shutdown 0
>  29810      1 mysqldump CALL  close(3)
>  29810      1 mysqldump RET   close 0
>  29810      1 mysqldump CALL  exit(3)
>
>


Okay -- I now think the problem is that your -row- is too big.  Not your table.
Is it possible for you to get a rough idea on the side of row 1585029?
 Is it 10584656 bytes?  It looks like you may need to also add -e to
mysqldump (or maybe --opt -e.  or maybe even --opt --xml ;) ), or that
this row might simply be too large for mysqldump to handle gracefully.

_Matt