[zeromq-dev] [PATCH] Improved response to socket violations

Pieter Hintjens ph at imatix.com
Fri May 20 18:01:05 CEST 2011


On Fri, May 20, 2011 at 5:50 PM, Martin Lucina <mato at kotelna.sk> wrote:

> 1) The message itself is misleading. There are many people who run into
> issues with mailbox due to a completely *different* problem, namely system
> resource limits (e.g. OSX). This has nothing to do with socket migration.

Do they hit this actual assert?

> 2) The message is not canonical. There may be multiple contexts in use;
> this does not tell the caller which context or call path caused the problem
> so they'll probably need to fire up a debugger anyway to get that
> information.

For sure, but it's more useful than wasting peoples' time on the list.
Which is what happens today, literally.

> 3) Last but not least, IMHO libraries should *not* print "helpful"
> messages.  This leads to horrible practices, for example start a random Gtk
> application; you will more often than not see all sorts of assertion
> failures and other crap printed and it's obvious that no one cares, much
> less does anything about it.

Libraries should not print unhelpful messages either. I don't see how
telling the user where to look will lead to horrible practice.

E.g. we already print a "helpful" messages on OOM, and it does actually work.

> I realise you have an assert(0) there so the code *will* fail, but I'd
> still like to avoid going down this path.

Can you propose an alternate path that solves the problem in hand,
instead of just rejecting this one?

The problem here is wasted time re-solving a *known* issue.

> If we have a problem with users using sockets from multiple threads then
> the documentation needs to stress that they not do that. If they do it
> anyway, too bad for them!

Up to a point, but when people continue to bash themselves on a
design, the design has an issue.

-Pieter



More information about the zeromq-dev mailing list