Tcl Library Source Code

View Ticket
Login
Ticket UUID: a5cb0800a40e1d3fbacfde9a6cbc07df66d2f5e0
Title: nns: bugs found by the new tests
Type: Bug Version: trunk
Submitter: serhiy.storchaka Created on: 2026-11-21 20:57:47
Subsystem: nameserv (aka nns) Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Open Last Modified: 2026-11-21 20:57:47
Resolution: None Closed By: nobody
    Closed on:
Description:

The bugs below were found by the tests in branch tests-nns; each is covered by a test with the knownBug constraint (nns-api-4.3, nns-api-8.4, nns-auto-api-2.2, nns-auto-api-2.3, nns-auto-api-4.1, nns-auto-api-4.3). All of them occur with Tcl 8.6 and 9.1 unless noted.

  • nameserv::server::configure -localonly 0 is accepted while the server is active and reconfigures its socket. The manual page says an active server cannot be reconfigured; -port fails with Unable to configure an active server. (nns-api-4.3)
  • The server cannot stop a search: ::nameserv::server::Search/Continuous/Stop uses $comm without variable comm. So the result object of nameserv::search -async is still updated after it was filled (beta 2 alpha 1 instead of alpha 1 after another client binds beta); the manual page says it is not modified any more. (nns-api-8.4)
  • nameserv::auto::bind alpha 2 while another client has bound alpha fails with bad completion code "Name "alpha" is already bound": must be ok, error, return, break, continue, or an integer instead of Name "alpha" is already bound: Enter uses return -code $msg. (nns-auto-api-2.2)
  • nameserv::auto::release does not release the names at the server while it is connected: it calls nameserv::release only if the reconnect timer is set, i.e. only while the connection is lost. (nns-auto-api-2.3)
  • Tcl 8.6: the method get of the result of nameserv::auto::search -continuous fails with can't read "current(alpha)": no such variable: it checks mycurrent($k) but returns $current($k). (nns-auto-api-4.1)
  • Tcl 9 only: nameserv::auto::search -async and -continuous fail in the constructor of the result object with can't set "nameserv::auto::searches(::nameserv::auto::receiver1)": parent namespace doesn't exist: the method restore sets the relative name nameserv::auto::searches($self), which Tcl 9 resolves in the namespace of the object. (nns-auto-api-4.3)