Bug 4478 - error deleting print jobs from special printer (print command)
error deleting print jobs from special printer (print command)
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Printing
3.0.23c
x86 Linux
: P3 critical
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-28 15:55 UTC by Jacek Kalinski
Modified: 2012-01-09 11:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Kalinski 2007-03-28 15:55:45 UTC
I have setup a "special" printer (txtama_ludka) in samba 3.0.23c (PDC) in smb.conf, specified as below:
[global]
    load printers = Yes
    printcap name = cups
    printing = cups
#...
[txtama_ludka]
        printing = bsd
        path = /usr/spool/samba
        printable = yes
        guest ok = no
        print command = /usr/local/bin/printama2txt.sh oki_ludka %s
        lpq command =
        lprm command =

All jobs are printed correctly. But jobs are not (automatically) deleted from spool.
When I try to remove job (or delete all printer jobs) from \\PDCserver\txtama_ludka, samba starts using 100% CPU.
The only way to "fix" this problem is to logout domain user - in samba logs (log level = 2), I got (during logout):

[2007/03/28 22:07:23, 2] smbd/utmp.c:sys_utmp_update(419)
  utmp_update: uname:/var/run/utmp wname:/var/log/wtmp
[2007/03/28 22:08:46, 0] lib/util_sock.c:write_data(564)
  write_data: write failure. Error = Bad file descriptor
[2007/03/28 22:08:46, 0] libsmb/clientgen.c:write_socket(138)
  write_socket: Error writing 934 bytes to socket 21: ERRNO = Bad file descriptor
[2007/03/28 22:08:46, 0] libsmb/clientgen.c:cli_send_smb(168)
  Error writing 934 bytes to client. -1 (Bad file descriptor)
[2007/03/28 22:08:46, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Bad file descriptor
[2007/03/28 22:08:52, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:08:52, 0] rpc_server/srv_spoolss_nt.c:srv_spoolss_replycloseprinter(165)
  srv_spoolss_replycloseprinter: reply_close_printer failed [DOS code 0x0000003b].
[2007/03/28 22:08:58, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:08:58, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:09:16, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:09:16, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:09:20, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:10:02, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:10:28, 0] rpc_client/cli_pipe.c:rpc_api_pipe(790)
  rpc_api_pipe: Remote machine AIRTEST pipe \spoolss fnum 0x4000returned critical error. Error was Write error: Success
[2007/03/28 22:10:28, 0] rpc_server/srv_spoolss_nt.c:srv_spoolss_replycloseprinter(165)
  srv_spoolss_replycloseprinter: reply_close_printer failed [DOS code 0x0000003b].

(AIRTEST is a windows machine, from which I deleted all print jobs)

printama2txt.sh script does:
cp -p $2 /tmp/.../filename #copy temporary file to my directory
rm $2 # remove original file
#convert /tmp/.../filename to /tmp/.../filename.new (program removes specific characters and adds lines, that must be printed); original and converted files are keep
lpr-cups -P $1 /tmp/.../filename.new #print job to smb printer
exit 0

Printer "oki-ludka" is a cups (was 1.2.4, now is 1.2.8 but still it is the same problem) printer connected via SMB protocol to windows printer:
<Printer oki_ludka>
Info OKI
Location OKI
DeviceURI smb://DOMAIN/COMPNAME07/txt
State Idle
StateTime 1175076456
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
This printer (oki_ludka; it is an impact OKI MicroLine 321) is using RAW cups driver.


Is there any chance to fix this error? I have found in google also 1 similar error: http://groups.google.pl/group/linux.samba/browse_frm/thread/32262d3abed731f7/237d545017e9b932 (but without an answer).
I have checked, in changelog there are no errors fixed (connected with printers or spools).
If debug level (= 10) is required, could you told me how to change log level without restarting samba daemons (smbd, nmbd)? This PDC server serves services (files and 15 printers) for over 60 clients, and it is not possible to restart samba server or use loglevel 10 for all the day.
Comment 1 Andreas Schneider 2012-01-09 11:02:48 UTC
This is probably fixed with a newer Samba version. If you still see the error. Please open a new bug with 'debug level = 10' logfiles of the new Samba version 3.5 or 3.6. Thanks!