
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-02-06 09:21, Fabian Groffen wrote:
On 06-02-2014 08:15:43 +0100, Niels Nes wrote:
On Thu, Feb 06, 2014 at 10:05:52AM +0530, Nitin Gautam wrote:
Hi
I am parsing my logs hourly as part of cron jobs and then uploading the data to Monet. However sometimes I do see some error messages in the logs
unsupported hash algorithms: gorithms: gorit We have seen this problem in the past. Which version are you using?
Do it show any more than that in the logs?
I assume this is your log of the monetdb(1) command being used, since the message is emitted by utils/control.c:control_send().
The message suggests garbage in the buffer, but as far as the code goes, it should see a properly null-terminated buffer with input from the server, hence this is confusing. Even more confusing because the server writes this entire block (the client is reading) at once with nothing complex involved. Does the merovingian.log file show any errors at the time you see monetdb failing?
Fabian, I'm looking at the code, and I wonder if it is correct. There are two calls to recv to fill the buffer. The man page of recv has this to say: "If a message is too long to fit in the supplied buffer, excess bytes may be discarded depending on the type of socket the message is received from." In other words, it may not be a good idea to use two calls, the first of which has a small length. Presumably the type of socket in our case is such that discarding wouldn't happen, but it is not explicit in saying that the type we use is safe. The man page also says: "The receive calls normally return any data available, up to the requested amount, rather than waiting for receipt of the full amount requested." In other words, you should probably have a loop around the call to recv to make sure you get the whole thing. Furthermore, I don't see the buffer into which recv writes getting a NULL termination. Did I miss something? - -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQCVAwUBUvNJqD7g04AjvIQpAQL4rQP/WsnBtwdPhnp75ERkRs3YKnJTqpEbgSQt khRZaWcL/3uGoUjgtURQkb1TpbgXTe8kKpqMm3KLpNu1+/+7YnL3gT3oLsgFuZVH 7G+j80IP3et/NA/y8r8X4NCxAIXOzhF0o8s2uk2b4GI+jIalmw5yzijceCaotQxd WevWXCyRfBM= =zWwx -----END PGP SIGNATURE-----