Messages in this thread |  | | Date | Sat, 24 Apr 1999 17:33:11 +0200 (MEST) | | From | Torsten Mohr <> | | Subject | Bugreport for 2.2.6 |
| |
Hi,
Here's the output of "ver_linux"
schleim:/usr/src/linux/scripts # sh ver_linux -- Versions installed: (if some fields are empty or looks -- unusual then possibly you have very old versions) Linux schleim 2.2.6 #1 Sun Apr 18 12:54:36 MEST 1999 i586 unknown Kernel modules 2.1.85 Gnu C 2.7.2.3 Binutils 2.9.1.0.15 Linux C Library x 1 root root 2478585 Jan 14 22:29 /lib/libc.so.6 Dynamic linker ldd (GNU libc) 2.0.7 Procps 1.2.7 Mount 2.9 Net-tools 1.46 Kbd 0.96 Sh-utils 1.12 Modules Loaded ppp slhc nfs lockd sunrpc ne 8390 dummy0 serial unix schleim:/usr/src/linux/scripts #
---------------------------------------- [1.] One line summary of the problem:
The kernel crashes, when it reads a corrupted sector on an ext2-CD
---------------------------------------- [2.] Full description of the problem/report:
I use a german distribution, SuSE 6.0 and just updated to kernel 2.2.6.
I created an empty 650MB file, created an ext2 on this file, mounted it via loopback and tar'ed some relevant directories in it. Then i toasted this file on a CD.
Now i wanted to restore a file from the home.tgz, so i mounted my /big, cd'ed into it and typed:
mount -t ext2 /dev/cdrom /cdrom [*1] tar tvfz /cdrom/home.tgz >inhalt
The system crashed. I couldn't see the "Oops" because X11 was up. No Ctrl-Alt-Delete, no pointer reaction.
The file "inhalt" was created on /big, but not all of it, approximately 600 kB.
Then i hard-resetted my computer, did the same until point [*1] and typed:
tar xvfz /cdrom/home.tgz home/tmohr/pilot/rom30german.zip
It took a while, so i logged in on another console. Then suddenly the box crashed with the output given in "panic".
I think tar looks through the whole archive, does it? The last file it processed (according to "inhalt") was a very large file.
tail inhalt: tmohr@schleim:/big > tail inhalt -rw------- tmohr/users 7354 1998-09-13 11:14 home/my/pics/inside.gif -rw-r--r-- tmohr/users 113021 1998-09-23 19:02 home/my/pics/visitenkarte.jpg drwxr-xr-x root/root 0 1998-11-07 08:59 home/my/midi/ -rw-r--r-- root/root 38548 1998-11-07 08:59 home/my/midi/easy.mid -rwxr-xr-x root/root 16169 1998-11-07 08:59 home/my/midi/hheureu4.mid -rw------- root/root 21221 1998-11-07 08:59 home/my/midi/jazz.mid -rwxr-xr-x root/root 64760 1998-11-07 08:59 home/my/midi/stair_h.mid -rwxr-xr-x root/root 18978 1998-11-07 08:59 home/my/midi/willkom4.mid -rw-r--r-- root/root 40213 1998-11-07 08:59 home/my/midi/womaninl.mid -rw-r--r-- root/root 11076775 1998-05-30 20:59 home/home-iei.tgz
I did all the actions above as "root".
As a user i tried: tmohr@schleim:/big > cat /cdrom/home.tgz >/dev/null cat: /cdrom/home.tgz: Eingabe-/Ausgabefehler tmohr@schleim:/big >
Which is german and says that there is an I/O error. This makes me think that this isn't a CDROM related bug, because just reading it makes no error. It seems, there is a corrupted sector on the CD.
So i tried another backup-CD and typed
tmohr@schleim:/big > tar tvfz /cdrom/home.tgz >inhalt2 This doesn't crash the system.
Then i tried to crash the system as a user by typing "tar tvfz /cdrom/home.tgz" using the corrupted CD.
This crashed the system again, this time as a normal user. In the Oops there's exactly the same "Call Trace", exactly the same "Code". It seems the problem is related to corrupted CDs.
So i took a knife, another backup-CD and scratched the CD. typing "tar tvfz /cdrom/home.tgz >inhalt" crashed the system. So the problem seems to be reproducable.
My guessing: The problem seems to be related to: - CD access - ext2 access - corrupted sectors - tar
I was able to crash the system as a user, so i don't think "tar" is the problem.
I was able to read the sectors on the CD by typing "dd if=/dev/cdrom of=/dev/null", so i don't think that this problem is related to CDROMs alone.
I think when someone writes a file system (like ext2), it is hard to test the behaviour when there are corrupted blocks, blocks that are just corrupted. I wouldn't wonder if that was not tested, because it is hard to test it. The problem could also be related to the way the CDROM driver reports "read errors" to the ext2 system.
---------------------------------------- [3.] Keywords (i.e., modules, networking, kernel): EXT2, CORRUPT BLOCKS, CDROM, TAR, READ-ERROR
---------------------------------------- [4.] Kernel version (from /proc/version): schleim:/proc # cat version Linux version 2.2.6 (root@schleim) (gcc version 2.7.2.3) #1 Sun Apr 18 12:54:36 MEST 1999
---------------------------------------- [5.] Output of Oops.. message (if applicable) with symbolic information resolved (see Documentation/oops-tracing.txt)
schleim:~ # ksymoops /usr/src/linux/System.map <panic Using `/usr/src/linux/System.map' to map addresses to symbols.
Code: Code: 66 8b 43 7e movw 0x7e(%ebx),%ax Code: 66 85 c0 testw %ax,%ax Code: 74 4c je 55 <_EIP+0x55> Code: 8b bb 88 00 00 movl 0x88(%ebx),%edi Code: 00 Code: 31 f6 xorl %esi,%esi Code: 66 85 c0 testw %ax,%ax Code: schleim:~ #
---------------------------------------- [6.] A small shell script or example program which triggers the problem (if possible) a. dd if=/dev/zero of=cd_image bs=1024k count=650 b. mke2fs -F cd_image c. mount -t ext2 -o loop cd_image /mnt d. tar cfpz /mnt/file.tgz /usr /opt /home (or whatever fits on it) e. umount /mnt f. cdrecord -v dev=<id>, o cd_image g. Take the CD and a knife. Make a scratch on the CD not too close to the beginning, so you can still mount the CD but there are errors on it. h. mount -t ext2 /dev/cdrom /mnt i. tar tvfz /mnt/file.tgz >/dev/null
---------------------------------------- [7.] Environment
[7.1.] Software (add the output of the ver_linux script here) schleim:/usr/src/linux/scripts # sh ver_linux -- Versions installed: (if some fields are empty or looks -- unusual then possibly you have very old versions) Linux schleim 2.2.6 #1 Sun Apr 18 12:54:36 MEST 1999 i586 unknown Kernel modules 2.1.85 Gnu C 2.7.2.3 Binutils 2.9.1.0.15 Linux C Library x 1 root root 2478585 Jan 14 22:29 /lib/libc.so.6 Dynamic linker ldd (GNU libc) 2.0.7 Procps 1.2.7 Mount 2.9 Net-tools 1.46 Kbd 0.96 Sh-utils 1.12 Modules Loaded ppp slhc nfs lockd sunrpc ne 8390 dummy0 serial unix
[7.2.] Processor information (from /proc/cpuinfo): schleim:/proc # cat cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 5 model : 4 model name : Pentium MMX stepping : 3 cpu MHz : 200.456338 fdiv_bug : no hlt_bug : no sep_bug : no f00f_bug : yes fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 mmx bogomips : 399.77
[7.3.] Module information (from /proc/modules): schleim:/proc # cat modules ppp 17736 0 (autoclean) slhc 4128 0 (autoclean) [ppp] nfs 27868 1 (autoclean) lockd 28932 1 (autoclean) [nfs] sunrpc 47864 1 (autoclean) [nfs lockd] ne 5984 1 (autoclean) 8390 5944 0 (autoclean) [ne] dummy0 720 1 (autoclean) serial 18112 0 (autoclean) unix 10056 61 (autoclean)
[7.4.] SCSI information (from /proc/scsi/scsi) schleim:/proc/scsi # cat scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: QUANTUM Model: FIREBALL_TM3200S Rev: 300X Type: Direct-Access ANSI SCSI revision: 02 Host: scsi0 Channel: 00 Id: 03 Lun: 00 Vendor: PIONEER Model: CD-ROM DR-U12X Rev: 1.06 Type: CD-ROM ANSI SCSI revision: 02 Host: scsi0 Channel: 00 Id: 04 Lun: 00 Vendor: SCSI-CD Model: ReWritable-2x2x6 Rev: 2.00 Type: CD-ROM ANSI SCSI revision: 02
[7.5.] Other information that might be relevant to the problem (please look in /proc and include all information that you think to be relevant):
schleim:/proc/ide # cat drivers ide-disk version 1.08
schleim:/proc/ide/ide0 # cat model pci
schleim:/proc/ide/ide0 # cat mate (none)
schleim:/proc/ide/ide0 # cat config pci bus 00 device 39 vid 8086 did 7111 channel 0 86 80 11 71 05 00 80 02 01 80 01 01 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 a3 00 80 33 00 00 00 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 0f 00 00 00 00 00 00
schleim:/proc/ide/ide0 # cat channel 0
schleim:/proc/ide/ide0/hda # cat model IBM-DTTA-351680
schleim:/proc/ide/ide0/hda # cat capacity 33022080
schleim:/proc/ide/ide0/hda # cat settings name value min max mode ---- ----- --- --- ---- bios_cyl 2055 0 65535 rw bios_head 255 0 255 rw bios_sect 63 0 63 rw breada_readahead 4 0 127 rw bswap 0 0 1 r file_readahead 72 0 2097151 rw io_32bit 0 0 3 rw keepsettings 0 0 1 rw max_kb_per_request 122 1 127 rw multcount 0 0 8 rw nice1 1 0 1 rw nowerr 0 0 1 rw pio_mode write-only 0 255 w slow 0 0 1 rw unmaskirq 0 0 1 rw using_dma 1 0 1 rw
---------------------------------------- [8.] schleim:/lib/modules/2.2.6/cdrom # insmod -m cdrom.o Sections: Size Address Align .this 0000004c c4849000 2**2 .text 00001d3b c484904c 2**2 .fixup 000000bc c484ad87 2**0 .rodata 00000a7f c484ae43 2**0 __ex_table 00000078 c484b8c4 2**2 .kstrtab 00000044 c484b93c 2**0 __ksymtab 00000020 c484b980 2**2 .data 00000550 c484b9a0 2**2 .bss 00000004 c484bef0 2**2
Symbols: 00000000 a cdrom.c c4849000 d __this_module c484904c t gcc2_compiled. c484904c T register_cdrom c484904c t .text c484921c T unregister_cdrom c48492b0 t cdrom_find_device c48492d0 t cdrom_open c4849398 t open_for_data c4849654 t check_for_audio_disc c48497d8 t cdrom_release c48498fc t media_changed c4849978 t cdrom_media_changed c48499b4 T cdrom_count_tracks c4849b04 t sanitize_format c4849b6c t cdrom_ioctl c484a8fc T cdrom_sysctl_info c484acf4 t cdrom_procfs_modcount c484ad24 t cdrom_sysctl_register c484ad5c t cdrom_sysctl_unregister c484ad6c t init_module c484ad74 t cleanup_module c484ad87 t .fixup c484ae43 r .rodata c484b8c4 r __ex_table c484b93c r .kstrtab c484b93c R __kstrtab_cdrom_count_tracks c484b94f R __kstrtab_register_cdrom c484b95e R __kstrtab_unregister_cdrom c484b96f R __kstrtab_cdrom_fops c484b980 R __ksymtab_cdrom_count_tracks c484b980 r __ksymtab c484b988 R __ksymtab_register_cdrom c484b990 R __ksymtab_unregister_cdrom c484b998 R __ksymtab_cdrom_fops c484b9a0 d debug c484b9a0 d .data c484b9a4 d keeplocked c484b9a8 d autoclose c484b9ac d autoeject c484b9b0 d lockdoor c484b9b4 d check_media_type c484b9b8 d topCdromPtr c484b9bc D cdrom_fops c484b9f8 d banner_printed.298 c484b9f9 d cdrom_drive_info c484bde4 D cdrom_table c484be3c D cdrom_cdrom_table c484be94 D cdrom_root_table c484beec d initialized.327 c484bef0 d .bss c484bef0 d cdrom_sysctl_header
schleim:/lib/modules/2.2.6/scsi # insmod -m sg.o Sections: Size Address Align .this 0000004c c484d000 2**2 .text 00002228 c484d04c 2**2 .fixup 00000018 c484f274 2**0 .rodata 000004be c484f28c 2**2 __ex_table 00000010 c484f74c 2**2 .data 0000007c c484f75c 2**2 .kstrtab 0000001b c484f7d8 2**0 .bss 00000000 c484f7f4 2**2 __ksymtab 00000010 c484f7f4 2**2
Symbols: 00000000 a sg.c c484d000 d __this_module c484d04c t gcc2_compiled. c484d04c t .text c484d04c t sg_open c484d208 t sg_release c484d2a4 t sg_read c484d434 t sg_write c484d6c8 t sg_ioctl c484decc t sg_poll c484df50 t sg_fasync c484df8c t sg_command_done c484e1d0 t sg_debug_all c484e298 t sg_debug c484e478 t sg_detect c484e4e8 t sg_init c484e584 t sg_attach c484e620 t sg_finish c484e624 t sg_detach c484e6c0 t init_module c484e6dc t cleanup_module c484e72c t sg_shorten_timeout c484e738 t sg_sc_build c484ea60 t sg_sc_undo_rem c484eb80 t sg_get_request c484eba8 t sg_add_request c484ec38 t sg_remove_request c484eca0 t sg_add_sfp c484ed84 t sg_remove_sfp c484ee6c t sg_fb_in_use c484ee90 t sg_low_malloc c484f028 t sg_malloc c484f184 t sg_low_free c484f20c t sg_free c484f24c t sg_clr_scpnt c484f274 t .fixup c484f28c r .rodata c484f2a8 r size_sg_header c484f74c r __ex_table c484f75c d .data c484f75c d sg_version_str c484f760 D sg_big_buff c484f764 d sg_pool_secs_avail c484f768 D sg_template c484f794 d sg_dev_arr c484f798 d sg_fops c484f7d4 d sg_registered.488 c484f7f4 d .bss
---------------------------------------- [X.] Other notes, patches, fixes, workarounds:
I think it'd be interesting how other file systems that can be toasted on a CD behave (iso9660, minix, ...).
I'd also like to note that this is could be a way to test the way file systems handle corrupted blocks.
The only reason "root" is involved in this problem is that "root" had to mount the CD, but there could also be an entry like: /dev/scd0 /cdrom ext2 ro,noauto,user 0 0
This way, any ordinary user could crash the system.
----------------------------------------
Please don't hesitate to write if you need further information or tests. I'd be glad to help you find the error.
Please note that the complete kernel, the System.map and the kernel configuration file that i used to compile the kernel and the Oops output are available at:
http://www.stuttgart.netsurf.de/~tmohr/bug/bugreport.html (There is NO index.html, so you have to use this complete URL).
Best regards, tmohr@stuttgart.netsurf.de
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |