[bug] printing zero size files

Denys Vlasenko vda.linux at googlemail.com
Sat Apr 28 10:15:31 UTC 2012


On Sat, Apr 28, 2012 at 11:49 AM, walter harms <wharms at bfs.de> wrote:
>>> lpr zero  (CUPS version)
>>> lpr: No file!?!
>>
>> Can you send a strace log of this command?
>
> log attached

The crucial part is this one:

socket(PF_FILE, SOCK_STREAM, 0)         = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation
not supported)
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
connect(3, {sa_family=AF_FILE, path="/var/run/cups/cups.sock"}, 26) = 0
open("zero", O_RDONLY)                  = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
sendto(3, "POST /printers/color HTTP/1.1\r\nC"..., 148, 0, NULL, 0) = 148
sendto(3, "\1\1\0\2\0\0\0\1\1G\0\22attributes-charset\0\5"..., 382, 0,
NULL, 0) = 382
poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "HTTP/1.1 100 Continue\r\n\r\nHTTP/1."..., 2048, 0, NULL,
NULL) = 221
lseek(5, 0, SEEK_SET)                   = 0
read(5, "", 32768)                      = 0
recvfrom(3, "\1\1\4\0\0\0\0\1\1G\0\22attributes-charset\0\5"..., 104,
0, NULL, NULL) = 104
close(5)                                = 0
write(2, "lpr: No file!?!\n", 16)       = 16
exit_group(1)                           = ?


It's unclear whether the message comes from server or not,
since the reply recv'ed from server is truncated
in strace output.

Can you re-run strace with -s9999 option?

-- 
vda


More information about the busybox mailing list