Skip to contentSkip to conversation

USB stability - possibly printer related

DISCUSSION Stanislav Meduna 5 participants 9 messages Oct 14, 2001 – Oct 19, 2001

lore
Share & tools
lore
#0 lore raw

Hello,

I would like to ask whether anyone is using USB printer support in recent kernels and with what results.

I had quite bad crashes on my fresh Mandrake 8.1 installation, one of them was so bad that it brought the filesystem into a FUBAR state - I had to reinstall. I strongly suspect the USB part of the kernel to be responsible for this.

My hardware:
Abit BP6 motherboard, 2 x Celeron, 512 MB RAM, IBM DJNA-371350 disk on the classic controller, IBM IC35L040AVER07-0 disk on the HPT 366 controller, root USB hub on the 440BX chipset, "noname" USB hub, HP PSC 750 printer/scanner/copier connected to the hub, no other switched-on USB devices at the time of my experiments (otherwise I have Compaq iPAQ PocketPC and HP 315 digital camera; the camera works quite OK under Linux with usb-storage).

Before anyone suspects the hardware: I have _zero_ problems with the HPT 366 (I have my /home there, doing compiles there etc), I don't have APIC problems more often than is "normal" on the BP6 (one in several days) and just to be sure I checked memory with memtest86 and disk drives with the vendor tools. The machine dual boots with W2K, which also run reliably - I have both system and data on the disk on the HPT. I am using the newest BIOS available for the mobo.

Incidentally the W2K also has problems with the printer and I must switch all the devices on in the correct order, otherwise I get bluescreen, but this is probably due to a crappy HP driver and I don't think that it is relevant for Linux problems.

The filesystems are ext2 and I am using the hpoj OfficeJet software included in the Mandrake distribution to communicate with the printer.

Unfortunately the problems are not 100% reproducible - sometimes it works, sometimes it does not. Some datapoints collected so far:

- The most frequent symptom is a lockup - I send something to the printer, it prints a few lines and then the machine locks up - no mouse reaction etc. SysRq does work, but despite sync - unmount - boot sequence I get some fs problems on the subsequent reboot.

- I have problems with both Mandrake's kernel (heavily patched 2.4.8) and vanilla 2.4.12

- It does not matter whether I use uhci or usb-uhci

- It does not seem to be a SMP issue (or at least not only a SMP issue), uniprocessor kernel also did have problems

- The worst crash had another symptoms shortly before - a few Oopsen in processes completely unrelated to printing (unfortunately the Oops data were lost after the fs exitus :-() and messages stating that some processes cannot be started.

- I got a corruption of the files that were surely _not_ opened for writing.

- At least one another person on a local mailing list got very similar problem - loaded USB modules, got a lockup and lost sd_mod and /usr/bin/kdeinit - this time not with a printer, but using usb-storage (which needs sd_mod)

I am an experienced Linux user and I am willing to test suggested patches etc (just allow some delays, I usually have time for Linux on weekends only). I am however no kernel guru and I am afraid I cannot help in active searching for the bug in the code myself.

I already posted to the linux-usb mailing list, but got no response. I reported the problem also on the Mandrake Bugzilla - the 8.1 is probably the first distribution that brings the USB printing very close to the user (in another distros it requires more action and a knowledgeable person to set up a USB printing). If there are more cases like mine, this can harm Linux in general :-(

A related question: As I stated before also files that were not written to, but were opened short before the lockup, got corrupted. This was not my experience with Linux and ext2 before, actually I found the ext2 quite resistant to corruptions resulting from the lockups - whether induced by experimenting with some drivers, or a few powerfails. Now I had one crash destroying the filesystem and at least one another requiring manual fsck. Is this quite normal (and my good experience was a statistical deviation), or does this also suggest a memory corruption occuring somewhere? I don't quite get how a r/o file can get corrupted in the case of lockup - yes, the inode is modified because of atime update, but the new data either are written, or do not make it to the disk - both cases should not cause a corruption.

Please, Cc: replies to me - I read l-k irregularly.

Regards

Signature · 1 line
                                 Stano
#1 lore raw

I know I've attempted to use the same IBM hard drive on the HPT366 controller with little success. I got hangups until I moved it back to the secondary IDE controller.

Otherwise, with 2.4.8 I could print to my Lexmark E310 printer using USB fine.

One thing I have noticed is that, with the 2.4 kernels, my system doesn't like sharing IRQs as well as the 2.2 kernels. So you may want to see what devices share interrupts with your USB controller, and move the cards if necessary.

#2 lore raw

Hello,

Quoted 3 lines

I know I've attempted to use the same IBM hard drive on the HPT366 controller with little success. I got hangups until I moved it back to the secondary IDE controller.

There was a BIOS update targeting problems with the newer IBM drives on the 366 - what HPT BIOS did give you problems?

Quoted 4 lines

One thing I have noticed is that, with the 2.4 kernels, my system doesn't like sharing IRQs as well as the 2.2 kernels. So you may want to see what devices share interrupts with your USB controller, and move the cards if necessary.

Thanks for a tip - I'll try it. Hopefully the two are not USB and HPT :-S

Regards

Signature · 1 line
                                                          Stano
#3 lore raw

I will have to reboot to find this out. However, it was the latest available a couple months ago when I bought the drive, and found out the normal BIOS for the regular IDE controllers hung the computer when it hit the 40GB drive during boot.

-----Original Message-----
From: Stanislav Meduna [mailto:[email protected]]
Sent: Monday, October 15, 2001 2:03 AM
To: Kevin Krieser; [email protected]
Subject: Re: USB stability - possibly printer related

Hello,

Quoted 2 lines

I know I've attempted to use the same IBM hard drive on the HPT366 controller with little success. I got hangups until I moved it back to

the

Quoted 1 line

secondary IDE controller.

There was a BIOS update targeting problems with the newer IBM drives on the 366 - what HPT BIOS did give you problems?

Quoted 4 lines

One thing I have noticed is that, with the 2.4 kernels, my system doesn't like sharing IRQs as well as the 2.2 kernels. So you may want to see what devices share interrupts with your USB controller, and move the cards if necessary.

Thanks for a tip - I'll try it. Hopefully the two are not USB and HPT :-S

Regards
--
Stano

#4 lore raw
Quoted 4 lines

I will have to reboot to find this out. However, it was the latest available a couple months ago when I bought the drive, and found out the normal BIOS for the regular IDE controllers hung the computer when it hit the 40GB drive during boot.

There are various ways around this. One bizarre one for Linux boxes is to set the box to boot off a floppy, stick a boot floppy into it and then tell the BIOS there is no IDE drive on hda. Linux for most controllers will find it anyway

#5 lore raw
In reply to Kevin Krieser

Hello,

Quoted 4 lines

One thing I have noticed is that, with the 2.4 kernels, my system doesn't like sharing IRQs as well as the 2.2 kernels. So you may want to see what devices share interrupts with your USB controller, and move the cards if necessary.

For the record: in my setup the USB controller has its own interrupt.

ide2 shares one with the ISDN card (Elsa Quickstep PCI) - I had no problems with this in several months I am using this setup.

Regards

Signature · 1 line
                                                Stano
#6 lore raw
In reply to Stanislav Meduna
Quoted 4 lines · Stanislav Meduna

I had quite bad crashes on my fresh Mandrake 8.1 installation, one of them was so bad that it brought the filesystem into a FUBAR state - I had to reinstall. I strongly suspect the USB part of the kernel to be responsible for this.

I too have had problems exactly like you describe. RedHat 7.1. I start getting oopes from the printer module and the system will not shut down. Once rebooted the primary file system is totally hosed. fsck could not make heads or tails out of it. This has happened twice. I have not had time to risk killing my system again but it appears to be either related to postscript printing or the lm_sensors modules. Do you by chance use lm_sensors?

Quoted 9 lines

My hardware:
Abit BP6 motherboard, 2 x Celeron, 512 MB RAM, IBM DJNA-371350 disk on the classic controller, IBM IC35L040AVER07-0 disk on the HPT 366 controller, root USB hub on the 440BX chipset, "noname" USB hub, HP PSC 750 printer/scanner/copier connected to the hub, no other switched-on USB devices at the time of my experiments (otherwise I have Compaq iPAQ PocketPC and HP 315 digital camera; the camera works quite OK under Linux with usb-storage).

My hardware:
FIC AD11 motherboard.
AMD 1.4 Athlon
512 SDRAM
40GB Western Digital
NVIDIA GeForce 2 (XFree driver not NVIDIA binary ones) HP 648C USB printer

The only other USB device I use is a Logitech mouse.

Quoted 2 lines

Unfortunately the problems are not 100% reproducible - sometimes it works, sometimes it does not. Some datapoints collected so far:

I am pretty sure I can make it happen again but I don't have the time to reinstall my system right now...

Quoted 5 lines

- The most frequent symptom is a lockup - I send something to the printer, it prints a few lines and then the machine locks up - no mouse reaction etc. SysRq does work, but despite sync - unmount - boot sequence I get some fs problems on the subsequent reboot.

Although I do not get lockups the printer symptoms are the same. Partial output then tons of oopes spilled to the console.

Quoted 2 lines

- I have problems with both Mandrake's kernel (heavily patched 2.4.8) and vanilla 2.4.12

Vanilla 2.4.10. I have not had this happen on 2.4.12 but I have really been avoiding anything I thought might cause this again.

Quoted 1 line

- It does not matter whether I use uhci or usb-uhci

I use usb-uhci

Quoted 4 lines

- The worst crash had another symptoms shortly before - a few Oopsen in processes completely unrelated to printing (unfortunately the Oops data were lost after the fs exitus :-() and messages stating that some processes cannot be started.

In my case whatever programs were running appears to continue to run fine. Starting new processes did not work.

Quoted 2 lines

- I got a corruption of the files that were surely _not_ opened for writing.

Here too. Many system libs were corrupted. When fsck tried to repair the file system it spewed all kinds of errors about libs.

Quoted 4 lines

- At least one another person on a local mailing list got very similar problem - loaded USB modules, got a lockup and lost sd_mod and /usr/bin/kdeinit - this time not with a printer, but using usb-storage (which needs sd_mod)

I do not use usb-storage.

Dan

#7 lore raw

Hi,

Quoted 3 lines

I have not had time to risk killing my system again but it appears to be either related to postscript printing or the lm_sensors modules. Do you by chance use lm_sensors?

No, I don't.

Quoted 2 lines

I am pretty sure I can make it happen again but I don't have the time to reinstall my system right now...

I can experiment, provided that only the mounted partitions can be hosed this way. But if this is some memory corruption, maybe anything could go wrong...

Quoted 6 lines
Quoted 2 lines

- I got a corruption of the files that were surely _not_ opened for writing.

Here too. Many system libs were corrupted. When fsck tried to repair the file system it spewed all kinds of errors about libs.

Kernel gurus: it seems this is a common symptom. Could someone give some explanation/speculation, what mechanismus can lead to this kind of corruption (not necessarily related to USB)?

Regards

Signature · 1 line
                                   Stano
#8 lore raw
In reply to Dan Siemon

I've heard others (Alan Cox?) say that the USB subsystem was not entirely MP safe. I saw similar problems with my SMP system. Usually, it'd lock just after printing a few lines. If I let the system sit for a while without rebooting, it'd start printing "random" parts of files. (I'm guessing that these parts are not random at all, but I don't know how they relate... maybe location on disk..? Anyway...) My guess is that some pointer to the location of the data to send to the printer gets mucked with and it sends the kernel off to never-never land... Just a guess as I've gone back to a UP system.

pete

Quoted 29 lines · Stanislav Meduna

Hi,

Quoted 3 lines

I have not had time to risk killing my system again but it appears to be either related to postscript printing or the lm_sensors modules. Do you by chance use lm_sensors?

No, I don't.

Quoted 2 lines

I am pretty sure I can make it happen again but I don't have the time to reinstall my system right now...

I can experiment, provided that only the mounted partitions can be hosed this way. But if this is some memory corruption, maybe anything could go wrong...

Quoted 6 lines
Quoted 2 lines

- I got a corruption of the files that were surely _not_ opened for writing.

Here too. Many system libs were corrupted. When fsck tried to repair the file system it spewed all kinds of errors about libs.

Kernel gurus: it seems this is a common symptom. Could someone give some explanation/speculation, what mechanismus can lead to this kind of corruption (not necessarily related to USB)?

Regards

Signature · 1 line
                                   Stano