Click to See Complete Forum and Search --> : [SOLVED] sx module freezes unit in boot...


irlandes
02-04-2007, 10:32 PM
I have a Dell Inspiron 2650, which has run Mandriva LE 2005 for two years. The other day it refused to boot, locking up right after it says Activating Swap Partitions.

After considerable digging around with a puppy CD, I found it was freezing during sysinit's call to rc.modules, which attempts to load the modules listed in /etc/modprobe.preload. My notes indicate that call to rc.modules corresponds to lines 647 to 652 of sysinit, though at this point, I seem to be somewhat disorganized in my notes.

With a carefully placed gprintf in rc.modules script, I learned it was looping, doing a case/esac on the listed modules, and gprintf printed exactly 16 times before it froze.

Module #16 happens to be sx. When I commented it, the unit seems to boot up normally. I tried un-commenting sx again, and again it froze.

The /var/log/boot.log shows only six modules loading at that part of the sysinit operation, if that means anything, and sx isn't one of them. (slamr; evdev; i8k; nvram; hw_random; intel-agp are the ones shown as loaded by boot.log)

Also, I couldn't seem to locate sx anywhere in the file system, if that means anything. But, I don't think a nonexistent module could freeze the system?

Yet, for unknown reasons, it freezes if modprobe sees that call out in modprobe.preload.

If there is something I might need, or something going wrong with my HD, it would be nice to know, and google shows me nothing on that sx module. I get some stuff, but mostly sx module seems to refer to light measuring equipment. Here on JL I also got nothing.

I hope this is the right place to put this question. Thanks for any help.

leonpmu
02-04-2007, 11:43 PM
Have you done an update recently? Perhaps the module is corrupted or changed... If you haven't , try and upgrade the system and see what happens...

bwkaz
02-05-2007, 08:03 PM
Does the system also freeze if you modprobe sx from a root shell? If so, then it's likely finding the module somewhere (you might even be able to find out where, with modprobe's -v option -- but if the machine freezes before that message gets to the screen, you obviously won't see it), and the module itself is freezing up the machine. If not, then something else that's going on in the rc.modules script is causing the freeze.

irlandes
02-06-2007, 12:25 AM
I just finished a 7 hour trip by bus home from Mexico City. Flooded streets in Puebla, with small hail so thick it looked like snow covering the ground.

Thanks to your answers, and the thoughts they caused me to have, I am hot on the trail. This is my second module problem ever, and the other one I gave up and reinstalled, Mandrake 9.?

I tried the su terminal command: modprobe sx

with the following error message:

FATAL: Error inserting sx (/lib/modules/2.6.11-6mdk/kernel/drivers/char/sx.ko.gz): Input/Output error

Sure sounds like a bad module or its dependency (see below). But, what do I know.

Looked at: man modprobe

and it mentioned modprobe using /lib/modules/2.6.11-6mdk/modules.dep

I looked at that, and there was sx.

/lib/modules/2.6.11-6mdk/kernel/drivers/char/sx.ko.gx:
/lib/modules/2.6.11-6mdk/kernel/drivers/char/generic_serial.ko.gz

generic_serial.ko.gz is shown as a dependency also for epca which apparently installed okay. So, tentatively I am assuming generic_serial is okay (but only tentatively.)

rpm -qfi /lib/modules/2.6.11-6mdk/kernel/drivers/char/sx.ko.gx

shows it is part of package kernel-2.6.11.6mdk

md5sum of sx.ko.gz in HD is:0b8396704c94be6688d608d8ef6924b8

rpm -ql kernel-2.6.11.6mdk | less

shows around 1909 files in that package. Wow!

I have been told that one can uninstall the kernel package on the fly while the machine is running, reinstall the new or original copy, and when you reboot it will be there live and running.

However, I have been online with Mandrake/Mandriva problems since 1999, and simply am not brave enough right now.

Since I temporarily can't find the original install CD's, I am downloading the package kernel-2.6.11.6mdk-1-1mdk.i586.rpm date 04/06/2005

from ftp://ftp.sunet.se/pub/Linux/distributions/Mandriva/official/2005/i586/media/main/

and will attempt to extract the so.ko.gz file with rpm2cpio, then run an md5sum on it and see what I get.

I am not sure the ...mdk-1-1mdk.i586.rpm is the same version I have, since my Rpmdrake only says 2.6.11-6mdk.

I am sleepy after the trip. I will come back tomorrow and report what I find out.

Thanks again for getting my brain to work. It's in there, but sometimes it forgets what its for... :)

bwkaz
02-06-2007, 07:23 PM
Well, the modules.dep just means that sx depends on generic_serial. :)

If the md5sums don't match, then make sure you're looking at the same kernel version -- the modules will all change whenever you install a new kernel. Otherwise, you could look through the MODULE_INIT function of the sx module itself to find out what could return -EIO (because that's what "input/output error" corresponds to). But that may end up being a huge spelunking expedition through the rest of the kernel. :p

irlandes
02-06-2007, 09:29 PM
The md5sums did match on both modules, so and generic_serial, its dependency.

I couldn't get the recommended piped rpm2cpio commands to work, so I had to do it step at a time.

1. Download kernel rpm and put it in a temp directory by itself.

2. rpm2cpio (full package name).rpm > kernel.cpio

3. cpio -idv < kernel.cpio ...which unpacks the entire rpm, with directories in the existing temp directory, where I can md5sum the file.

I made a note to look tomorrow at the MODULE_INIT as you mention. I might get lucky.

I am thus forced to suspect something else in the kernel. I suppose I will need to byte the bullet and try a removal and reinstall of the entire package.

Sure wish I could figure out what that module is for. My wife is just back from a two month vacation north in the States, so my vacation is over, heh, heh. I will try to find some sort of module manual. A problem here is google refuses to look for English or US hits, so I get a lot of stuff that is not that important, and it's in Spanish anyway. Sometimes I gotta' sort through a couple hundred hits to find anything useful.

If sx is for something I never use, I would probably not bother any more
Well, thanks for tips, as always. I am slow right now, but will follow your latest advice ASAP.

bwkaz
02-07-2007, 09:30 PM
According to this:

http://www.mjmwired.net/kernel/Documentation/sx.txt

it seems to be a multi-port serial card. If you don't have any multi-port serial cards (or you don't have any multi-port serial cards made by Specialix), then forget about this driver; you don't need it. :)

(Actually this is why I prefer loading drivers via udev -- you only get this driver loaded if you have a PCI card whose vendor and device match what this driver has in its MODULE_DEVICE_TABLE. Apparently your distro decided to forgo this and load it statically; this is the Wrong Way to do that. ;) Or at least, that's the Wrong Way to do that with recent kernels and a relatively recent udev.)

irlandes
02-08-2007, 01:11 AM
That is really great news. I don't think I have an SX card, but will attempt to look it over in case I missed something. Everything that I normally use seems to work, including sound.

I will try the CD rom tomorrow and see that it works.

There are other things on this machine I don't know much about, for example the PCI card slot, etc. which I only have ever used for wireless card, but I don't use it here with DSL. But, dial up works. NIC works.

Thanks so much for supplying that information. I sure didn't get that hit anywhere.

I am going to look some more, there must be reason Mandriva loaded it, of course that reason could be a mistake.

Edit: I just realized I don't even know what a multiport serial card is, so I have my studying cut out for me. Thanks

bwkaz
02-08-2007, 08:10 PM
Multiport serial cards are (e.g. PCI or ISA) cards that have more than one serial port on them. They're for when you have to hook up to four independent serial barcode printers -- or at least, that's the only thing I've ever used one for. ;)

I got that hit by looking in my kernel tree for the source for the sx module -- drivers/char/sx.c -- and then reading that file. It referenced "Specialix SX series cards", and I did a search on "specialix sx" (no quotes) to find that page; it was the 7th result on Google. So it doesn't really surprise me that you couldn't find it; I only found it because I knew a bit more about what the driver was for. :)

irlandes
02-08-2007, 09:28 PM
I am reminded of the Sherlock Holmes series, where Dr. Watson (?) would tell him he couldn't possibly know something. And, after Sherlock would explain his logic, Dr. Watson would say that was really very simple! In like manner, when you explain it, I understand how you did it.

I suppose that's why you are a moderator, and I am not. :)

I was pretty sure my 2650 has nothing like you describe, but I looked anyway.

RJ-45 for NIC cable; phone modem cable jack; two USB 1.0 ports; a video monitor jack; a parallel printer port. Um, mike and earphone; and Power cord. And, it looks like a plug that is labeled for keyboard or mouse.

Nope, no multi serial port, or even a single one.

At this point, if you don't object, I am going to mark this one effectively solved, since it works, and there is no use for sx module.

I am going to make a note and when/if I install new distro, such as Kubuntu 6.10, will run some sort of disk check, either the linux one or temporarily change partition to fat32 and run disk scan. I think I like linux disk check better, but don't know if it works as well for bad blocks. This really does raise the spectre of sagging hard disk, since memory failure would be more general.

I will also look again at rc.modules, and sysinit.

THANKS!!!!!