Pete Zaitcev (zaitcev) wrote,

Taking Stock

It looks like the Big Bug brouhaha is over, so I find a few issues on my plate now.

  • Under some circumstances, the libusual interacts badly with an initrd. There is a bug, bz#204396, which documents the issue to a certain extent. As far as I can decipher, Fedora kernels started building libusual statically, and boot-time replay in udev fails or never happens. So, if your USB storage device was plugged in across a reboot, it won't be accessible until it's replugged.

    As usual, I expect hordes of confused users to descend on this problem and muddy waters with unrelated reports. Already Harald used the libusual problem as an excuse to move an unrelated bug (bz#158598) with a Mitsumi floppy similarly not recognized on boot. But that bug was open years ago, when libusual did not even exist. Clearly a replay problem.

    For the real problem, building libusual as a module seems like an obvious answer, but it may have undesired consequences. I do not remember just why libusual switched to static. It may be essential for the Anaconda. Because of the Big Bug just recently, I looked at Anaconda's loader2, and it seems to have no provisions to load preload libusual when usb-storage is required.

    Another easy solution is to disable libusual and ub altogether in Fedora and declare the whole experiment failed. Unfortunately, the next step would be to boot ub from Linux entirely, and I'm not quite ready for it.

    So, for now I am looking at making modprobe work normally in the context of initrd. There were other modules hurt and injured besides libusual (I think crc32b was a victim of nash too). This is a big work, but seems like a good thing to do. [Ed: This has nothing to do with the problem. The issue is that libusual is static, and components aren't, so they get separated. Fixing nash's modprobe won't help finding modules which are missing from initrd.]

    {Update: Aww, shoot. I remember how it works now. The CONFIG_USB_LIBUSUAL is made to match CONFIG_USB. If USB core is static, like in Fedora, libusual is static too. This allows its config variable to be a bool instead of trinary. IIRC, I tried to use normal code, but users complained of build errors with some combinations of options, and my Kconfig-fu was not sufficient. For example, what does happen when libusual is a module and ub is a static? The right solution is to force all three (ub, libusual, and usb-storage) to use the same option, either unset, module, or static. But I don't know how. Adrian Bunk would probably help :-).}

    {Update 2006/10/12: The workaround is to run "mkinitrd /boot/initrd-2.6.18-1.XXXX.fc6.img 2.6.18-1.XXXX.fc6". It works, but not a solution of course.}

    {Update: Original implementation blogged in 20050923, 20050924.}

    {Update 2006/10/16: A patch is available. which uses a class in order to know when to retry request_module(), but its fate is not certain at this point.}

  • The unexpectedly popular usbmon, attracted a gentleman from Italy who wrote a patch for libpcap to support it. Now you can use Wireshark to watch your USB traffic. Awesome, right? Yes, but I have to resist this, because this uses the text interface. The right approach is a binary interface, which I declared but never actually implemented. I wrote the guy back and asked 2 weeks.

    {Update 2006/11/25: I just threw a patch at my page at charlotte. Phew.}

  • Xen mouse pointer in PV was suspended to Big Bug, but it needs finishing pronto. BTW, to those who suggested me to use evdev: I appreciate the thought. It would be ideal, except for a) not having stable enumeration, which blows our configuration tools, and b) being bloated, dubious driver which supports, well, evdev. No disrespect to Daniel Stone intended, but reading its code made me concerned.

    {Update 2006/12/11: Got xenpv running, if not working [link].}

  • Anaconda has code to support installation from ub scattered around, but it is not complete. It can load ub (but not libusual) when "ub" is passed on Syslinux command line. But it does not set the bias in libusual (so you have to add libusual.bias="ub"), and it does not create device nodes -- for an extremely convoluted reason related to something called countScsiDisks(). This has to be fixed ASAP, although I suspect that I missed FC-6 no matter what. I should've checked before!

  • If any time remains, I have to make modprobe usb-storage to wait until SCSI scans for already-attached devices complete. In 2.6.9 it was bad enough. Applications loading usb-storage would need to run modprobe, which forked the worked thread, and wait a few seconds for disks to appear. Unfortunately, with a separate scanning thread it became more difficult. First, the scanning thread waits five seconds before doing anything. Second, if a module reload runs across stuck toggles, the current code issues resets. This is great, except that it produces unpredictable delays. If I have more than one USB device (for example, on USB Bladecenter I have a floppy and a CD-ROM), the wrong (empty) device may get ready first, the application detects it, sees that it contains no media and fails.

    Well, of course, in the ideal would I would just tell users to forget usb-storage and use ub if SCSI scanning latencies bother them, but in our universe this is not happening. See item about libusual above.

  • Real work which pays bills has to be done.
Tags: life, linux
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments