[systemd-devel] [systemd-commits] 3 commits - src/libsystemd src/network src/udev
Tom Gundersen
teg at jklm.no
Sun Apr 20 13:48:15 PDT 2014
On Sun, Apr 20, 2014 at 3:16 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Sun, Apr 20, 2014 at 05:45:18AM -0700, Tom Gundersen wrote:
>> commit 6190b9f9d2574428d560458a99f2838041cfdaac
>> Author: Tom Gundersen <teg at jklm.no>
>> Date: Sun Apr 20 07:51:28 2014 +0200
>>
>> sd-rtnl: log when queues are exhausted
>>
>> diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
>> index 8650f55..543bad9 100644
>> --- a/src/libsystemd/sd-rtnl/sd-rtnl.c
>> +++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
>> @@ -203,8 +203,10 @@ int sd_rtnl_send(sd_rtnl *nl,
>> }
>> } else {
>> /* append to queue */
>> - if (nl->wqueue_size >= RTNL_WQUEUE_MAX)
>> + if (nl->wqueue_size >= RTNL_WQUEUE_MAX) {
>> + log_debug("rtnl: exhausted the write queue size (%d)", RTNL_WQUEUE_MAX);
>> return -ENOBUFS;
>> + }
> Is there a risk of this condition happenning often? Maybe this should be protected
> by a condition to be printed just once, and then it could be at warning level?
This is extremely unlikely to happen, and if it does surely very bad
things will result from it (best case the program would fail
gracefully I suppose). I added this here simply to easily rule out
this as a source of bugs when debugging similar/related issues.
The reason I didn't make this a higher priority log message is that we
so far only ever use log_debug from libraries. I don't know if we want
to start making exceptions to that? Kay, Lennart?
Cheers,
Tom
More information about the systemd-devel
mailing list