OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Marv Lelgemann - 30.04.2018
Last edited by Petr Štetiar - 03.06.2021

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

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])

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

Closed by  Petr ┼átetiar
03.06.2021 08:18
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in https:/ / 06325f93b4d9463a5

Frederik Van Bogaert commented on 23.03.2021 11:11

I'd like to raise the priority on this task. It's critical to our plans for the prplMesh project, where we're aiming to expose a big data model on ubus.

We're currently running into this limitation, and blocked on it.

arnout commented on 23.03.2021 15:21

Here's a patch that fixes the issue. I'll send it to the mailing list as well.


Available keyboard shortcuts


Task Details

Task Editing