New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avahi query in CUPS 2.5.x does not work #936
Comments
Debug log of |
TIll, can you try with current CUPS master? There were some Avahi-related issues that I think I have resolved now... |
I tried now, being on Ubuntu 24.04 LTS at the time of release. Rebuilt CUPS 2.5.x from GIT master:
Checked whether libcups is at the right place and actually used by the components (
Checked both
So the call of So I ran:
and I am attaching the file |
I can reproduce when I run outside the debugger, but not in the debugger... :/ Trying to get a better sense of what is happening from the logs... |
OK, re-enabling core dumps and debuginfod got me a little farther. It looks like Avahi isn't initializing the "path" variable in the browser object. Digging deeper... |
So running this code on ARM doesn't crash, Intel does... |
Till, try the latest changes I've pushed: [master a1d9852] Fix threading and callback issues with Avahi (Issue #936) There were a couple issues with missing locking around the creation of new browsers and the flags that were being passed to the callback functions... Seems to be working as expected now. |
I have tested it now again, current GIT with the mentioned 2 commits and all is working as expected. No crashes and the bug I originally had reported is fixed. So this one is done. |
Describe the bug
I have several IPP print destinations which are advertised via DNS-SD (Avahi):
These are 21 destinations, an HP OfficeJet Pro 8730, connected both via network and via USB (IPP-over-USB, via ipp-usb) and several PAPPL-based Printer Applications.
I have also some classic, permanent CUPS queues with PPD files:
If I run the command
lpstst -l -e
on CUPS 2.4.7 as it comes with Ubuntu 24.04 LTS I get a list of the 3 permanent queues , as "permanent" and the 21 IPP destinations, as "network" or "temporary", so a total of 24 entries. CUPS 2.5.x (GIT master) gives me only the 3 permanent queues as output oflpstat -l -e
. This is not a problem of the timeout (_CUPS_DNSSD_GET_DESTS
incups/dest.c
). It is already on 1 sec in 2.5.x and I also tried 5 sec.I have build 2.5.x with
and run
lpstat -l -e
with extra debug output:The debug log
log.txt
shows that for each of the 21 IPP print destinations a DNS-SD query with the CUPS DNS-SD API functioncupsDNSSDQueryNew()
was done. The function is asynchronous and so in a loop it is waited for the result, until the timeout expires. The debug log makes the impression, that the queries get never answered, so probably the initial formulation of the queries has some problem. The callback functioncups_dest_query_cb()
gets never called.The problem seems only concern queries, as
ippfind
of CUPS 2.5.x (and thedriverless
used above callsippfind
, just with a search command line to only display driverless IPP printers) works. It does not use the query API functions, but functions for browsing and resolving.To Reproduce
Steps to reproduce the behavior:
ippeveprinter
. There should be at least one driverless IPP print which is not covered by a permanent CUPS queue. Make surecups-browsed
is NOT running.driverless
andlpstat -v
whether everything needed is there.lpstat -l -e
. Only your permanent queue(s) is/are shown, not your driverless IPP print destinations.lpstat -l -e
shows everything, permanent queues AND IPP print destinations.System Information:
The text was updated successfully, but these errors were encountered: