[sane-devel] Out of memory in sanei_scsi_cmd [was: "Annoying Out of
MEmory Error..."]
Oliver Schwartz
Oliver.Schwartz at gmx.de
Fri Sep 22 18:46:55 UTC 2006
Hi SCSI experts,
a user reported a problem with an Acer 620ST plugged into a Artop
Electronic Corp AEC6712D SCSI controller (atp870u driver). The system
causing problems is running linux-2.6.17-gentoo-r8, gcc 4.1.1 and
glibc-2.4, sane-backends-1.0.18.
On this system the following error occurs:
...
[snapscan] open_scanner
[sanei_debug] Setting debug level of sanei_scsi to 255.
[sanei_scsi] sanei_scsi_open: SG driver version: 30533
[sanei_scsi] sanei_scsi_open_extended: using 131072 bytes as SCSI
buffer
[sanei_scsi] trying to enable low level command queueing
[sanei_scsi] sanei_scsi_open: Host adapter queue depth: 1
[sanei_scsi] sanei_scsi_open: SG driver can change buffer size at run
time
[sanei_scsi] sanei_scsi_open: using new SG header structure
[snapscan] sane_snapscan_open: waiting for scanner to warm up.
[snapscan] wait_scanner_ready
...
[snapscan] send
[snapscan] snapscan_cmd
[sanei_scsi] scsi_req_enter: entered 0xb7c5e008
[sanei_scsi] sanei_scsi.issue: 0xb7c5e008
dev_max(currently)=32 max_active_device=1 (origin 1)
def_reserved_size=32768
>>> device=sg0 scsi1 chan=0 id=2 lun=0 em=0 sg_tablesize=128 excl=1
FD(1): timeout=120000ms bufflen=131072 (res)sgat=4 low_dma=0
cmd_q=1 f_packid=0 k_orphan=0 closed=0
rb>> act: id=9 blen=1024 t_o/elap=120000/8ms sgat=1 op=0x2a
[sanei_scsi] scsi_req_enter: queue_used: 1, queue_max: 1
[sanei_scsi] sanei_scsi_req_wait: waiting for 0xb7c5e008
[sanei_scsi] sanei_scsi.issue: 0xb7c5e008
dev_max(currently)=32 max_active_device=1 (origin 1)
def_reserved_size=32768
>>> device=sg0 scsi1 chan=0 id=2 lun=0 em=0 sg_tablesize=128 excl=1
FD(1): timeout=120000ms bufflen=131072 (res)sgat=4 low_dma=0
cmd_q=1 f_packid=0 k_orphan=0 closed=0
rb>> rcv: id=9 blen=1024 dur=108ms sgat=1 op=0x2a
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[snapscan] measure_transfer_rate: have ring buffer
[snapscan] scsi_read
[snapscan] snapscan_cmd
[sanei_scsi] scsi_req_enter: entered 0xb7c5e008
[sanei_scsi] sanei_scsi.issue: 0xb7c5e008
dev_max(currently)=32 max_active_device=1 (origin 1)
def_reserved_size=32768
>>> device=sg0 scsi1 chan=0 id=2 lun=0 em=0 sg_tablesize=128 excl=1
FD(1): timeout=120000ms bufflen=131072 (res)sgat=4 low_dma=0
cmd_q=1 f_packid=0 k_orphan=0 closed=0
No requests active
[sanei_scsi] sanei_scsi.issue: bad write (errno=12) Cannot allocate
memory -1
[sanei_scsi] sanei_scsi.issue: SG_BIG_BUF inconsistency? Check file
PROBLEMS.
[sanei_scsi] scsi_req_enter: queue_used: 0, queue_max: 1
[sanei_scsi] sanei_scsi_req_wait: waiting for 0xb7c5e008
[sanei_scsi] sanei_scsi.issue: 0xb7c5e008
[snapscan] scsi_read: snapscan_cmd command failed: Out of memory
[snapscan] measure_transfer_rate: scsi_read command failed: Out of
memory
[snapscan] sane_snapscan_start: measure_transfer_rate command failed:
Out of memory
scanimage: sane_start: Out of memory
...
As far as I can tell I'm issuing a sanei_scsi_cmd with a send buffer
of ten bytes and a receive buffer of 130176 bytes. Both should fit
into the SCSI buffer of 131072 bytes easily.
To make matters even stranger, the same SCSI card and scanner works
fine on
Ubuntu 6.06 LTS,
kernel: 2.6.15-23-386
gcc: GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
glibc: 2.3.6
sane-backends: 1.0.17
Does anybody of the experts have any idea what's going on?
Regards,
Oliver
More information about the sane-devel
mailing list