[FS#1525] listing more than ~230 objects fails (ubusd discards messages when tx queue is full)

LEDE Bugs lede-bugs at lists.infradead.org
Mon Apr 30 07:31:40 PDT 2018


A new Flyspray task has been opened.  Details are below. 

User who did this - Marv Lelgemann (marv) 

Attached to Project - OpenWrt/LEDE Project
Summary - listing more than ~230 objects fails (ubusd discards messages when tx queue is full)
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Medium
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - When registering more than ~250 objects on ubus, calling ubus list on the command line hangs before finishing to list all the registered objects. It keeps waiting for data and the //sequence end message// on the socket forever.

This issue was witnessed on x86 VM builds of Chaos Calmer and LEDE 17.01.4 as well as ubus on a Linux Desktop. The number of objects being successfully listed varied for each system (232 for CC VM, 252 for LEDE VM and 572 on Desktop).

The root of the problem seems to be a limitation of the ubus daemon. When doing a recursive lookup, one message per object is sent from the daemon to the client. The current implementation of the ubus daemon seems to discard messages, when the fixed size tx queue is full.

The code responsible for this behavior can be found in method **ubus_msg_enqueue()** in **ubusd.c**:


if (cl->tx_queue[cl->txq_tail])
	return;


Calling one or more methods in rapid sequence could potentially lead to the same problem.

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=1525



More information about the lede-bugs mailing list