[12476] in Athena Bugs
decmips 7.7E: /usr/athena/bin/moira breakage led to moira server coredump
daemon@ATHENA.MIT.EDU (Tom Yu)
Wed Aug 24 22:33:22 1994
Date: Wed, 24 Aug 1994 22:32:57 -0400
To: bugs@MIT.EDU
Cc: tom@MIT.EDU, tytso@MIT.EDU, mhbraun@MIT.EDU, tlyu@MIT.EDU
From: Tom Yu <tlyu@MIT.EDU>
System name: dragons-lair
Type and version: KN02ca 7.7E
Display type: PMAG-DV
What were you trying to do?
Get a list of all hosts on the network FH-ETHER using
/usr/athena/bin/moira. I used the "query" item under the "Machine
Menu".
What's wrong:
The moira server coredumped.
The moira "ghst" query expects 4 arguments. I was expecting
to give the moira client 4 arguments. In mrtest, "qy ghst * * *
FH-ETHER" does the right thing. The moira client prompted for 3
arguments, which I answered with wildcards, as I was expecting to
enter a non-wildcard to a fourth argument. I saw the client hang when
I was expecting to enter a fourth argument, and killed the client from
another window. The server then began to refuse connections, and I
was informed by mhbraun, who restarted the server, that the server had
coredumped as a result of my query.
Consider the following piece from
/mit/moiradev/src/clients/moira/menus.c:
{ ShowMachineQuery, NULLMENU, 4, {
{"query", "Lookup machines"},
{"name", "Machine Name (or leave empty to match any): "},
{"address", "Address in dotted notation (or leave empty to match any): "},
{"location", "Location (or leave empty to match any): "},
{"contact", "Contact person (or leave empty to match any): "}
} },
However, talking to the server directly via mrtest, I see:
moira: qy _help ghst
get_host, ghst (name, address, location, network) => name, vendor, model, os, location, contact, use, status, status_change, network, address, ace_type, ace_name, admin_comment, ops_comment, created, creator, inuse, modtime, modby, modwith
1 tuple
What should have happened:
The moira server should not coredump in response to a client
query, especially a read-only query. tytso speculates that the server
ran out of memory.
Also, the server should probably refuse to honor queries such
as "ghst * * * *", which is the query that the moira client actually
ended up generating. Arguably, even if the server will honor such a
query, the default moira client should probably check for confirmation
before issuing a query to the server with wildcards in all fields.
The "4" in the menu definition should be "5", indicating 4
args to the query. In addition, the name of the last argument,
"contact", which is not seen anyway because it is beyond the expected
number of arguments, is incorrect, and should be "network" in order to
match the name of the argument as known by the server.
Please describe any relevant documentation references:
None that I can think of, unless you count the source code.
:-)