Score:0

Force-unload or reset a crashed linux driver

cn flag

What options do I have to hard-reset a linux driver?

I have a problem with my USB-connected dvb tuners. They crash from time to time with a stack trace in the kernel log and disappear from the device manager. The application (tvheadend, which runs in a docker container) freezes and is not killable anymore, and the docker container can't shutdown, not even being killed.

As all this is connected to an unstable state of the driver, I wonder if it's possible to force-unload or reset it so that I can startup the whole dvb subsystem again without rebooting the machine?

The drivers in my case are si2157 and em28xx*. Unloading using modprobe -r for all dvb-relevant modules fails because the devices are still in use by the frozen process.

Score:0
in flag

Unloading modules can be done with rmmod -f Do note the part below where it says DANGEROUS

This might not work if it is completely blocked, The best approach might to try and get the drivers fixed, Maybe not to a "working" state, but at least to a "if it crashes make it possible to unload and retry" state

Usage:
        rmmod [options] modulename ...
Options:
        -f, --force       forces a module unload and may crash your
                          machine. This requires Forced Module Removal
                          option in your kernel. DANGEROUS
        -s, --syslog      print to syslog, not stderr
        -v, --verbose     enables more messages
        -V, --version     show version
        -h, --help        show this help
cn flag
nope, `rmmod -f mc videodev tveeprom em28xx dvb_core em28xx_dvb` fails with errors like `could not remove module em28xx: Resource temporarily unavailable`, so far no solution found except rebooting the server
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.