#1102065 ipp-usb: Repeatedly opens printer logfile without closing it

Package:
ipp-usb
Source:
ipp-usb
Description:
Daemon for IPP over USB printer support
Submitter:
Fergus Clancy
Date:
2025-04-04 12:51:02 UTC
Severity:
normal
#1102065#5
Date:
2025-04-04 12:48:50 UTC
From:
To:
If the printer does not respond, ipp-usb writes to a logfile in directory
/var/log/ipp-usb/ and keeps trying. Start ipp-usb with command "ipp-usb debug",
and it does this:

  ===============================
  ipp-usb started in "debug" mode, pid=16093
  ctrlsock: listening at "/var/ipp-usb/ctrl"
+ PNP Bus 003 Device 024: added

  ===============================
+ Bus 003 Device 024: added hp LaserJet 1320 series
  Device info:
    Ident:         03f0-1d17-126666-HP-hp-LaserJet-1320-series
    Manufacturer:  HP
    Product:       hp LaserJet 1320 series
    SerialNumber:  126666
    MfgAndProduct: HP hp LaserJet 1320 series
    BasicCaps:     print,scan,fax,http

  Device quirks:
    from [*] (/usr/share/ipp-usb/quirks/default.conf:3)
      blacklist = false
      usb-max-interfaces = 0
      disable-fax = false
      init-delay = 0s
      request-delay = 0s
      http-connection = ""

  USB stack parameters
    authorized_default:          1
    autosuspend:                 2
    blinkenlights:               N
    initial_descriptor_timeout:  5000
    nousb:                       N
    old_scheme_first:            N
    quirks:
    usbfs_memory_mb:             16
    usbfs_snoop:                 N
    usbfs_snoop_max:             65536
    use_both_schemes:            Y

  USB interfaces:
    Config Interface Alt Class SubClass Proto
       1       0      0   7      1       2
*      1       0      1   7      1       4
*      1       1      0   7      1       4
*      1       2      0   7      1       4

  USB[0]: open: Bus 003 Device 024 Interface 0 Alt 1
  USB[1]: open: Bus 003 Device 024 Interface 1 Alt 0
  USB[2]: open: Bus 003 Device 024 Interface 2 Alt 0
  USB[0]: connection allocated, 1 in use: a-- --- ---
  HTTP[000]: connection 0 allocated
! USB[0]: send: libusb_bulk_transfer: Operation timed out
! HTTP[000]: libusb_bulk_transfer: Operation timed out
  USB[0]: connection released, 0 in use: --- --- ---
! IPP: HTTP: Post "http://localhost:60000/ipp/print": libusb_bulk_transfer: Operation timed out
- Bus 003 Device 024: resetting hp LaserJet 1320 series
  USB[0]: closed
  USB[1]: closed
  USB[2]: closed
- Bus 003 Device 024: removed hp LaserJet 1320 series
! PNP Bus 003 Device 024: Device initialization timed out
+ PNP Bus 003 Device 024: retry



After a few tries, if you type "ls -l /proc/16093/fd" it shows that the printer
logfile has been opened several times:

total 0
lrwx------ 1 root root 64 Apr  4 12:57 0 -> /dev/pts/2
lrwx------ 1 root root 64 Apr  4 12:57 1 -> /dev/pts/2
lrwx------ 1 root root 64 Apr  4 12:57 10 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Apr  4 12:57 11 -> socket:[86726]
lrwx------ 1 root root 64 Apr  4 12:56 12 -> /dev/bus/usb/003/024
l-wx------ 1 root root 64 Apr  4 12:57 13 -> /var/log/ipp-usb/03f0-1d17-126666-HP-hp-LaserJet-1320-series.log
l-wx------ 1 root root 64 Apr  4 12:56 14 -> /var/log/ipp-usb/03f0-1d17-126666-HP-hp-LaserJet-1320-series.log
l-wx------ 1 root root 64 Apr  4 12:57 15 -> /var/log/ipp-usb/03f0-1d17-126666-HP-hp-LaserJet-1320-series.log
l-wx------ 1 root root 64 Apr  4 12:56 16 -> /var/log/ipp-usb/03f0-1d17-126666-HP-hp-LaserJet-1320-series.log
lrwx------ 1 root root 64 Apr  4 12:57 17 -> socket:[87287]
lrwx------ 1 root root 64 Apr  4 12:57 2 -> /dev/pts/2
l-wx------ 1 root root 64 Apr  4 12:57 3 -> /var/ipp-usb/lock/ipp-usb.lock
lrwx------ 1 root root 64 Apr  4 12:57 4 -> anon_inode:[eventpoll]
lrwx------ 1 root root 64 Apr  4 12:57 5 -> anon_inode:[eventfd]
l-wx------ 1 root root 64 Apr  4 12:57 6 -> /var/log/ipp-usb/main.log
lrwx------ 1 root root 64 Apr  4 12:57 7 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Apr  4 12:57 8 -> anon_inode:[timerfd]
lrwx------ 1 root root 64 Apr  4 12:57 9 -> socket:[85865]