Discussion:
Warning messages appear in my output
(too old to reply)
bshang
2011-03-27 01:04:45 UTC
Permalink
Hi, all

I almost finished A3, but I got some warning messages in my output:

sample query:
select * from emp e, dept d where e.dno=d.dno order by e.ename;

sample warning message I got:
WARNING: could not dump unrecognized node type: 34476392 (<-the number
is random or is depending on the query)

However, all the output is correct. Can anyone give me some hint please?

Thank you,

S
chris
2011-03-27 03:42:42 UTC
Permalink
I'm also almost done, and am getting no error messages, so this is gonna
be a stab in the dark:

Doing a grep for the error message, I see it's generated by _outnode in
outfuncs.c. This method, given a void *, tries to print it out as a
Node. It switches on the node type (check include/node.h for a complete
list of all node types) in order to call the print function appropriate
to the node type.
The value it prints out, which is what it figures is the node type, is
garbage; there is no node with a value that high (node type is an enum
value). You're probably passing some bad data/pointer/object to the
function (or more likely, to a higher print function that uses this
method to print).
I suggest you use gdb, run the program, see exactly where it crashes.
Then you can get gdb to print a stacktrace. Using this you should be
able to determine which method you're calling with bad data, switch to
that frame and see exactly what bad data you're passing and why. Maybe
you're trying to print a ListCell or something.

Again, this is a shot in the dark; it's what I would try.
Hope it helps...
Post by bshang
Hi, all
select * from emp e, dept d where e.dno=d.dno order by e.ename;
WARNING: could not dump unrecognized node type: 34476392 (<-the number
is random or is depending on the query)
However, all the output is correct. Can anyone give me some hint please?
Thank you,
S
Ken Salem
2011-03-27 14:48:16 UTC
Permalink
I had a similar error when I was revising my code.
I debugged it almost exactly as Chris describes.
I think the problem was that I was using print_expr to print something
that was not an expression, but I may be misremembering.
-KMS
Doing a grep for the error message, I see it's generated by _outnode in outfuncs.c. This method, given a void *, tries to print it out as a Node. It
switches on the node type (check include/node.h for a complete list of all node types) in order to call the print function appropriate to the node type.
The value it prints out, which is what it figures is the node type, is garbage; there is no node with a value that high (node type is an enum value).
You're probably passing some bad data/pointer/object to the function (or more likely, to a higher print function that uses this method to print).
I suggest you use gdb, run the program, see exactly where it crashes. Then you can get gdb to print a stacktrace. Using this you should be able to
determine which method you're calling with bad data, switch to that frame and see exactly what bad data you're passing and why. Maybe you're trying to
print a ListCell or something.
Again, this is a shot in the dark; it's what I would try.
Hope it helps...
Post by bshang
Hi, all
select * from emp e, dept d where e.dno=d.dno order by e.ename;
WARNING: could not dump unrecognized node type: 34476392 (<-the number
is random or is depending on the query)
However, all the output is correct. Can anyone give me some hint please?
Thank you,
S
Loading...