Amanda-Users

Re: Strange "FORMAT ERROR" with 2.6.1

2009-03-25 10:42:10
Subject: Re: Strange "FORMAT ERROR" with 2.6.1
From: Jean-Louis Martineau <martineau AT zmanda DOT com>
To: sgw AT amanda DOT org
Date: Wed, 25 Mar 2009 09:57:51 -0400
Stefan,

This bug is already fixed and is available in the latest snaphot.

I attach the patch.

Jean-Louis

Stefan G. Weichinger wrote:
Greets,

I have to debug some backup-related problems for a customer ...

Running amanda 2.6.1 on gentoo linux there (my own ebuild).

For some DLEs I get:

   samba01.xy.at christian_home   lev 1  FAILED [FORMAT ERROR IN REQUEST
PACKET 'Error on line 1 char 202: Odd character 'r', expected an open
quote mark after the equals sign when giving value for attribute
'encoding' of element 'file'']

Corresponding lines in amdump.1 (afaik):

driver: send-cmd time 3904.615 to dumper4: PORT-DUMP 04-00020 11635
samba01.lietz.at ffffffff9ffeffffffff7f christian_home /home 1
2009:3:13:21:32:27 GNUTAR X X X BSD |"  <auth>BSD</auth>\n
<record>YES</record>\n  <index>YES</index>\n  <exclude>\n    <file
encoding=\"raw\"
raw=\"Li9jaHJpc3RpYW4vRWlnZW5lIERhdGVpZW4=\">./christian/Eigene_Dateien</file>\n
   <list>/usr/local/etc/amanda/daily/excludes/root-excludes</list>\n
</exclude>\n  <include>\n    <file>./christian</file>\n  </include>\n"
driver: state time 3904.615 free kps: 3335 space: 26304680 taper: DOWN
idle-dumpers: 3 qlen tapeq: 46 runq: 32 roomq: 0 wakeup: 0 driver-idle:
no-bandwidth
driver: interface-state time 3904.615 if default: free 3335
driver: hdisk-state time 3904.615 hdisk 0: free 26304680 dumpers 5
driver: state time 3904.629 free kps: 3335 space: 26304680 taper: DOWN
idle-dumpers: 3 qlen tapeq: 46 runq: 32 roomq: 0 wakeup: 15 driver-idle:
no-bandwidth
driver: interface-state time 3904.629 if default: free 3335
driver: hdisk-state time 3904.629 hdisk 0: free 26304680 dumpers 5
driver: result time 3904.629 from dumper4: FAILED 04-00020 "FORMAT ERROR
IN REQUEST PACKET 'Error on line 1 char 202: Odd character 'r', expected
an open quote mark after the equals sign when giving value for attribute
'encoding' of element 'file''"
driver: send-cmd time 3904.629 to chunker4: FAILED 04-00020
driver: state time 3904.629 free kps: 3335 space: 26304680 taper: DOWN
idle-dumpers: 3 qlen tapeq: 46 runq: 32 roomq: 0 wakeup: 15 driver-idle:
no-bandwidth
driver: interface-state time 3904.629 if default: free 3335
driver: hdisk-state time 3904.629 hdisk 0: free 26304680 dumpers 5
driver: result time 3904.629 from chunker4: FAILED 04-00020 "[cannot
read header: got 0 bytes instead of 32768]"

--

The client here is running the zmanda-rpm
amanda-backup_server-2.6.1-1.suse10 on a Suse 10.0 (yes, old, all this
is part of migration and removal of the old client ...)

--

I'd be happy to provide any more logs offlist, if needed ...

Thanks, Stefan


Index: ChangeLog
===================================================================
--- ChangeLog   (revision 1648)
+++ ChangeLog   (revision 1649)
@@ -1,3 +1,7 @@
+2009-02-06  Jean-Louis Martineau <martineau AT zmanda DOT com>
+       * server-src/dumper.c: options is already unquoted.
+       * common-src/util.c: argument should not be quoted when added to argv.
+
 2009-02-06  Dustin J. Mitchell <dustin AT zmanda DOT com>
        * installcheck/Amanda_Changer_compat.pl: remove debugging code
 
Index: server-src/dumper.c
===================================================================
--- server-src/dumper.c (revision 1648)
+++ server-src/dumper.c (revision 1649)
@@ -260,9 +260,8 @@
     char *errmsg = NULL;
     dle_t *dle;
 
-    char *uoptionstr = unquote_string(optionstr);
-    o = oo = vstralloc("<dle>", strchr(uoptionstr,'<'), "</dle>", NULL);
-  
+    o = oo = vstralloc("<dle>", strchr(optionstr,'<'), "</dle>", NULL);
+
     dle = amxml_parse_node_CHAR(o, &errmsg);
     if (dle == NULL) {
        error("amxml_parse_node_CHAR failed: %s\n", errmsg);
@@ -2048,9 +2047,8 @@
 
     amfree(dle_str);
     if (am_has_feature(their_features, fe_req_xml)) {
-       char *o, *p = NULL;
+       char *p = NULL;
        char *pclean;
-       o = unquote_string(options+1);
        vstrextend(&p, "<dle>\n", NULL);
        if (*application_api != '\0') {
            vstrextend(&p, "  <program>APPLICATION</program>\n", NULL);
@@ -2063,8 +2061,7 @@
                       NULL);
        }
        vstrextend(&p, "  <level>", level_string, "</level>\n", NULL);
-       vstrextend(&p, o, "</dle>\n", NULL);
-       amfree(o);
+       vstrextend(&p, options+1, "</dle>\n", NULL);
        pclean = clean_dle_str_for_client(p);
        vstrextend(&req, pclean, NULL);
        amfree(pclean);
Index: common-src/util.c
===================================================================
--- common-src/util.c   (revision 1648)
+++ common-src/util.c   (revision 1649)
@@ -1044,9 +1044,9 @@
     property_t   *value_s = value_p;
     char       ***argv = user_data_p;
     GSList       *value;
-    char         *q, *w, *qprop, *qvalue;
+    char         *q, *w, *qprop;
 
-    q = quote_string(property_s);
+    q = stralloc(property_s);
     /* convert to lower case */
     for (w=q; *w != '\0'; w++) {
        *w = tolower(*w);
@@ -1056,10 +1056,9 @@
     qprop = stralloc2("--", q);
     amfree(q);
     for(value=value_s->values; value != NULL; value = value->next) {
-       qvalue = quote_string((char *)value->data);
        **argv = stralloc(qprop);
        (*argv)++;
-       **argv = qvalue;
+       **argv = stralloc((char *)value->data);
        (*argv)++;
     }
     amfree(qprop);
<Prev in Thread] Current Thread [Next in Thread>