>Synopsis:      kernel panics printing certain PDFs via CUPS to usb printer (as 
>ugen0)
>Category:      i386 amd64 kernel
>Environment:
        System      : OpenBSD 5.3
        Details     : OpenBSD 5.3-current (GENERIC) #103: Sun Mar 31 17:48:15 
MDT 2013
                         
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC

        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
        Samsung CLP-500 laser printer connected as ugen0, via usb/echi and 
driven by CUPS 
        with the SpliX driver. Simple content prints fine, but pdf content with 
images in
        it (e.g. airline boarding pass) always causes a kernel panic of 
        "ehci_device_clear_toggle: queue active" - see ddb log below.

        The CUPS usb backend uses usblib1 and requires ulpt to be disabled in 
the kernel.
        Using the lpd backend with the printer connected as ulpt on a diffent 
machine works
        fine.
        
        I get this on both i386 (Soekris net5501) and amd64 (HP Proliant 
Microserver), and
        both 5.2 release and 5.3 current (March 31); and both 
cups-1.5.3p5/usblib1-1.0.9p3
        and cups-1.6.2/libusb1-1.0.9p5.

        Immediately before the system dies the CUPS error log shows:
        "E [04/Apr/2013:08:36:33 +0100] [Job 5] SpliX End of PostScript header 
not found"
>How-To-Repeat:
        Clean install of 5.3 current, cups and splix from ports. Disable ulpt 
in kernel.
        Chown usb0 and ugen0.* to _cups. Connect and configure usb printer 
(maybe it has
        to be a Samsung CLP-500). Print a pdf with images in it.
>Fix:
        Use CUPS lpd backend instead and host printer on separate machine, as 
lpd->uplt.


ddb output:

Stopped at      Debugger+0x4:   pop1    %ebp
ddb> show panic
ehci_device_clear_toggle: queue active
ddb> trace
Debugger(d095d0f8,f551a7a8,d092faa0,f551a7a8,d16fed00) at Debugger+0x4
panic(d092faa0,d16fed00,f551a7dc,d0806e17,d16d2980) at panic+0x5d
ehci_device_clear_toggle(d16d2980,1,16,d0a24c60,40) at 
ehci_device_clear_toggle+0x29
usbd_clear_endpoint_stall(d16d2980,0,0,f551a878,f551a81c) at 
usbd_clear_endpoint_stall+0x17
usbd_bulk_transfer(d16fed00,d16d2980,4,ea60,f551a87c) at 
usbd_bulk_transfer+0x10e
ugen_do_read(d160a000,2,f551aea0,0,f551addc) at ugen_do_read+0x381
ugenread(3f02,f551aea0,0,d043e5a8,f551ad94) at ugenread+0x3d
spec_read(f551addc,d5dad360,d5acd110,f551aea0,0) at spec_read+0x2cd
VOP_READ(d5acd110,f551aea0,0,d5dd65f0,d5dad360) at VOP_READ+0x35
vn_read(d5be7350,d5be736c,f551aea0,d5dd65f0,d5be7350) at vn_read+0xb5
dofilereadv(d5c23178,a,d5be7350,f551af08,1) at dofilereadv+0x13a
sys_read(d5c23178,f551af64,f551af84,106,1) at sys_read+0x89
syscall() at syscall+0x227
--- syscall (number 2071522240) ---
0x2:
ddb> ps
   PID   PPID   PGRP    UID  S       FLAGS  WAIT          COMMAND
 11462  17917  17917    541  3   0x4100080  thrsleep      rastertoqpdl
 32309  17917  17917    541  3        0x80  pipewr        gstoraster
  7067  17917  17917    541  3        0x80  piperd        rastertoqpdl
*25621  12061  31957    541  7   0x4100000                usb
 14812  12061  31957    541  3   0x4100080  poll          usb
 31957  12061  31957    541  3        0x80  select        usb
 17917  12061  17917    541  3        0x80  wait          pstoqpdl
 26526      1  26526      0  3        0x80  select        inetd
 12061      1  12061      0  3        0x80  kqread        cupsd
  4135      1   4135      0  3        0x80  ttyin         getty
 19300      1  19300      0  3        0x80  select        cron
 27740      1  27740     99  3        0x80  poll          sndiod
   562      1    562      0  3        0x80  select        sendmail
 19037      1  19037      0  3        0x80  select        sshd
 32154   4546  27002     83  3        0x80  poll          ntpd
  4546  27002  27002     83  3        0x80  poll          ntpd
 27002      1  27002      0  3        0x80  poll          ntpd
  4225   2395   2395     74  3        0x80  bpf           pflogd
  2395      1   2395      0  3        0x80  netio         pflogd
 18077  31112  31112     73  3        0x80  poll          syslogd
 31112      1  31112      0  3        0x80  netio         syslogd
    13      0      0      0  3    0x100200  aiodoned      aiodoned
    12      0      0      0  3    0x100200  syncer        update
    11      0      0      0  3    0x100200  cleaner       cleaner
    10      0      0      0  3    0x100200  reaper        reaper
     9      0      0      0  3    0x100200  pgdaemon      pagedaemon
     8      0      0      0  3    0x100200  bored         crypto
     7      0      0      0  3    0x100200  pftm          pfpurge
     6      0      0      0  3    0x100200  usbtsk        usbtask
     5      0      0      0  3    0x100200  usbatsk       usbatsk
     4      0      0      0  3    0x100200  bored         syswq
     3      0      0      0  3  0x40100200                idle0
     2      0      0      0  3    0x100200  kmalloc       kmthread
     1      0      1      0  3        0x80  wait          init
     0     -1      0      0  3       0x200  scheduler     swapper
 27772  32309  17917    541  5      0x2000                gs
ddb> 


dmesg:
OpenBSD 5.3-current (GENERIC) #103: Sun Mar 31 17:48:15 MDT 2013
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 500 
MHz
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
real mem  = 536408064 (511MB)
avail mem = 516218880 (492MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/80/26, BIOS32 rev. 0 @ 0xfac40
pcibios0 at bios0: rev 2.0 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0xa800
cpu0 at mainbus0: (uniprocessor)
amdmsr0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
0:20:0: io address conflict 0x6100/0x100
0:20:0: io address conflict 0x6200/0x200
pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x30
glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
vr0 at pci0 dev 6 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, address 
00:00:24:c9:21:f8
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr1 at pci0 dev 7 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 5, address 
00:00:24:c9:21:f9
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr2 at pci0 dev 8 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 9, address 
00:00:24:c9:21:fa
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr3 at pci0 dev 9 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 12, address 
00:00:24:c9:21:fb
ukphy3 at vr3 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
glxpcib0 at pci0 dev 20 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 
3579545Hz timer, watchdog, gpio, i2c
gpio0 at glxpcib0: 32 pins
iic0 at glxpcib0
pciide0 at pci0 dev 20 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <Hitachi HTS543232A7A384>
wd0: 16-sector PIO, LBA48, 305245MB, 625142448 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ohci0 at pci0 dev 21 function 0 "AMD CS5536 USB" rev 0x02: irq 15, version 1.0, 
legacy support
ehci0 at pci0 dev 21 function 1 "AMD CS5536 USB" rev 0x02: irq 15
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "AMD EHCI root hub" rev 2.00/1.00 addr 1
isa0 at glxpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
gpio1 at nsclpcsio0: 29 pins
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "AMD OHCI root hub" rev 1.00/1.00 addr 1
mtrr: K6-family MTRR support (2 registers)
ugen0 at uhub0 port 1 "SAMSUNG ELECTRONICS CO., LTD Samsung CLP-500 Series" rev 
2.00/1.00 addr 2
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
root on wd0a (fcc646290cfd069e.a) swap on wd0b dump on wd0b
WARNING: / was not properly unmounted

usbdevs:
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), AMD(0x1022), 
rev 1.00
 port 1 addr 2: high speed, self powered, config 1, Samsung CLP-500 
Series(0x3248), SAMSUNG ELECTRONICS CO., LTD(0x04e8), rev 1.00, iSerialNumber 
2U37B1CX100709J.
 port 2 powered
 port 3 powered
 port 4 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), AMD(0x1022), 
rev 1.00
 port 1 powered
 port 2 powered
 port 3 powered
 port 4 powered

Reply via email to