[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20010912: about xdr_product
- Subject: Re: 20010912: about xdr_product
- Date: Fri, 14 Sep 2001 10:30:19 -0600
Harry Chen wrote:
>
> Hi Anne
>
> >
> > First, I'm guessing you are using pqinsert to insert products into your
> > queue. Is that correct?
>
> yes
>
> >
> > I'm going to make some guesses about your problem. As you probably
> > know, this is the pq.c code that is failing:
> >
> > /*
> > * XDR Encode or Decode "prod" to or from "buf" of size "size".
> > */
> > static ptrdiff_t
> > xproduct(void *buf, size_t size, enum xdr_op op, product *prod)
> > {
> > XDR xdrs[1] ;
> > xdrmem_create(xdrs, buf, (u_int)size, op);
> >
> > if (!xdr_product(xdrs, prod))
> > {
> > uerror("xproduct: %s xdr_product() failed\n",
> > prod->info.ident);
> > return 0;
> > }
> >
> > /* return xlen_product(prod) ; */
> > return (xdrs->x_private - xdrs->x_base);
> > }
> >
> > I'm wondering if the call to xdrmem_create is failing. Perhaps there's
> > not enough memory to write the data. Or perhaps the 'size' variable is
>
> Actually the data size is 0, I just write the pattern of pqact.conf
> with the data file path into the pq as a text string. so the size would
> not longer than 256 byte.
>
> > bad from being cast to an unsigned int. The return value of that
> > function really should be tested.
> I add some code to write out the pq_insert() status, it show me as below
> some time.
>
> Sep 14 07:15:51 mscsv3 /usr/local/ldm/logs[27206]: pq_insert:
> /usr/local/ldm/dat
> a/ldm.pq: I/O error
>
> or some time like this.
>
> Sep 13 09:27:26 mscsv3 /usr/local/ldm/logs[3440]: assertion
> "pIf(xdrs->x_op == X
> DR_ENCODE, *cpp != NULL && **cpp != 0)" failed: file "ldm_xdr.c", line
> 21
>
> >
> >
> > Are you able to modify the code, rebuild it, and test these things, or
> > run the code in a debugger?
>
> I worte the function code, referred from the ldm util, outside the ldm
> source tree.
> >
> > Also, what version of the LDM are you running? And, what hardware and
> > operating system are you using?
> ldm-5.0.5 on DEC Alpha 4100 OSF1 V4.2
>
> Hope I can fix the issue this weekend, we have launched the typhoon
> warning here.
>
> Thank you
Hi Harry,
We are currently at version 5.1.4 of the LDM. We haven't used 5.0.5 for
years, and we no longer support it.
Also, I'm having a difficult time understanding what you are doing. It
appears that you have written your own code, based on pqutil, that
inserts 0 length products into the queue with special product headers
that cause pqact to invoke routines to operate on files somewhere. Is
this accurate?
In my question from my previous email I was asking if you were using the
LDM program 'pqinsert', not the library routine 'pq_insert'. I see that
you are using 'pq_insert' but now I do not think that you are using
'pqinsert'.
I'm sorry to say that under these circumstances, a very old LDM version
coupled with your own custom software, I can't be of much help.
I strongly encourage you to get the newest version of the LDM. Using
our recommended file structure, you should be able to install it, test
it, and simply change a pointer if you want to go back to your older
version. It's possible that your problem could be fixed by a newer
version, but I can't say for sure that it will. Have you upgraded your
operating system recently? Perhaps there's an incompatibility in the
XDR library with your old LDM version.
I'm sorry that I cannot be of further help on this particular problem.
If you have further questions please let me know. Good luck.
Anne
--
***************************************************
Anne Wilson UCAR Unidata Program
address@hidden P.O. Box 3000
Boulder, CO 80307
----------------------------------------------------
Unidata WWW server http://www.unidata.ucar.edu/
****************************************************