BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000975 [BusyBox] Kernel Module Support minor always 07-28-06 06:03 08-23-06 10:15
Reporter anthony View Status public  
Assigned To integrator
Priority normal Resolution fixed  
Status closed   Product Version 1.2.x
Summary 0000975: Simultaneous modprobes on aliases which reference the same module fail
Description I have a module uhci-hcd

There is a reference in modules.alias which looks like:
  alias pci:v*d*sv*sd*bc0Csc03i00* uhci-hcd

If the uhci_module is not loaded and I enter:
  modprobe pci:v00008086d00002659sv00001028sd00000182bc0Csc03i00
It succeeds

If the uhci_module is loaded and I enter:
  modprobe pci:v00008086d00002659sv00001028sd00000182bc0Csc03i00
It succeeds

If the uhci_module is not loaded and I enter:
  modprobe pci:v00008086d00002659sv00001028sd00000182bc0Csc03i00 &
  modprobe pci:v00008086d00002659sv00001028sd00000182bc0Csc03i00 &
One modprobe succeeds
One modprobe fails with:
  insmod: cannot insert '.../uhci-hcd.ko': File exists (-1)

While the example above is somewhat contrived, it simulates how udev operates when it tries to populate /dev during boot in a case where a number of devices need the same module and it's not loaded (udev with the RUN+= directive fires off a backgrounded modprobe for each device).
Additional Information
Attached Files  975-parallel_execution [^] (896 bytes) 08-20-06 14:42

- Relationships

- Notes
(0001550)
integrator
07-28-06 09:17
edited on: 07-28-06 09:17

We have a race here when two modprobe run in //, and one is loading a module which depends on a module loaded by the other.

Then two insmod are spawned which try to load the same module in turn. Once the first has suceeded, the second fails because the module is already loaded.

Thus, one of the modprobe fails, but it has no way (for now I hope) to know why.

The most obvious and _incorrect_ way to fix this would be to ignore loading errors, but that would be only a workaround.

Lemme think about it over the WE...

 
(0001551)
VEvgeniy
07-28-06 20:59

issue 0000941
...
2. modules alias file return module name as "*_*" (for exam. sis_agp).
=> if use name "pci:..." for load module module not load!
...
problem not fixed!

I'm replace "_" symbol to "-" in modules.alias, and my udev work.
 
(0001561)
integrator
08-04-06 12:53

Reminder sent to: anthony

"anthony",

Could you please test the attached patch, please?

Thanks,
Yann E. MORIN.
 
(0001565)
anthony
08-11-06 16:15
edited on: 08-11-06 16:17

I had to change the patch from
  int rc2 = wait4pid(spawn(argv));
to
  int rc2 = wait4pid(bb_spawn(argv));

and also add a
  #include <errno.h>

at the beginning to make the patch apply, and then to make the patched file compile.

The result was that the patch *DIDN'T* work. modprobe still returns an error code, and I still get three lines of error messages on stderr.

I put some debug code into the patched file, and can confirm that the if succeeds, and the code
  rc = rc2 ; /* only last module matters */
is executed.

 
(0001574)
integrator
08-20-06 14:44

Reminder sent to: anthony

"anthony",

Could you please re-test the new attached patch, please?

Thanks,
Yann E. MORIN.
 
(0001579)
integrator
08-23-06 10:15

svn r15906.
 

- Issue History
Date Modified Username Field Change
07-28-06 06:03 anthony New Issue
07-28-06 06:03 anthony Status new => assigned
07-28-06 06:03 anthony Assigned To  => BusyBox
07-28-06 09:17 integrator Note Added: 0001550
07-28-06 09:17 integrator Assigned To BusyBox => integrator
07-28-06 09:17 integrator Note Edited: 0001550
07-28-06 20:59 VEvgeniy Note Added: 0001551
08-04-06 12:51 integrator Issue Monitored: integrator
08-04-06 12:52 integrator File Added: 975-parallel_execution
08-04-06 12:53 integrator Note Added: 0001561
08-06-06 01:08 integrator File Deleted: 975-parallel_execution
08-06-06 01:08 integrator File Added: 975-parallel_execution
08-11-06 16:15 anthony Note Added: 0001565
08-11-06 16:17 anthony Note Edited: 0001565
08-20-06 14:41 integrator File Deleted: 975-parallel_execution
08-20-06 14:42 integrator File Added: 975-parallel_execution
08-20-06 14:44 integrator Note Added: 0001574
08-23-06 10:15 integrator Status assigned => closed
08-23-06 10:15 integrator Note Added: 0001579
08-23-06 10:15 integrator Resolution open => fixed
08-23-06 10:15 integrator Fixed in Version  => 1.2.x


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker