Bug 478881

Summary: /sbin/kmodule causes tapes to rewind causing data corruption
Product: Red Hat Enterprise Linux 4 Reporter: Brian Parks (Quantum Corp) <brian.parks>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: urgent Docs Contact:
Priority: low    
Version: 4.7CC: harald, notting, ykopkova
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-18 20:27:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian Parks (Quantum Corp) 2009-01-05 20:21:43 UTC
Description of problem:
/sbin/kmodule links with libkudzu.a which contains a bug (RedHat bug # 468680) that may cause tapes to rewind. Specifically, libkudzu.a contains a routine that opens the rewind-on-close tape device (/dev/st<x>) when obtaining drive information instead of opening the no-rewind tape device (/dev/nst<x>). 

Once bug #468680 is fixed, this /sbin/kmodule problem will also be fixed once "kmodule" is linked with the fixed kudzu library. It is necessary to confirm that the relinked /sbin/kmodule is included in the same release as the fix for bug #468680.


Version-Release number of selected component (if applicable):
All versions of RedHat Enterprise Linux 4 including update 7.


How reproducible:
100% if the tape device appears in the first block read from /proc/scsi/scsi
(see "Additional info" below)

Steps to Reproduce:
1. insert a tape in a drive
2. position tape past BOT, e.g. "mt -f /dev/nst0 fsr 1"
3. run /sbin/kmodule
4. check tape status, e.g. "mt -f /dev/nst0 status"

  
Actual results:
Tape is at BOT


Expected results:
Tape position should remain unchanged.

Additional info:
Sometimes all tape drives are not seen by kudzu. When reading /proc/scsi/scsi
on RedHat Enterprise Linux 4, sometimes the buffer is not entirely filled even
though there is more data to be read.

For example, "dd if=/proc/scsi/scsi of=/tmp/proc_scsi_scsi.txt bs=16k count=1"
may return 3968 bytes while "dd if=/proc/scsi/scsi of=/tmp/proc_scsi_scsi.txt
bs=16k count=2" returns 6970 bytes (the entire contents of /proc/scsi/scsi").

Because of this, kudzu may only read the first 3968 bytes and not see any tape
drives thereafter.

Problem does not seem to exist in RedHat Enterprise Linux 5.

Comment 1 Bill Nottingham 2009-01-05 20:29:08 UTC
Simply requires rebuilding against the kudzu fix for bug 468680.

Comment 6 errata-xmlrpc 2009-05-18 20:27:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1000.html