Skip to contentSkip to conversation

Bug#715019: linux-image-3.10-rc7-amd64: Bcache (with cache on LVM?) stops system from shutting down

DISCUSSION Ben Hutchings 2 participants 2 messages Jul 10, 2013 5 messages not in the archive bcache (block layer cache)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20130705135658.9757.33407.reportbug@domo-b

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAL3dRBXX8Ex3iNE1v8N4pswqwh08enGPih0sP_ubpqUmbctdHA@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): CAL3dRBXX8Ex3iNE1v8N4pswqwh08enGPih0sP_ubpqUmbctdHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw
Quoted 3 lines · Jarno Elonen

Ok, I tried to take a photo but apparently the camera was set for very low resolution. :/ Anyway, a few pictures attached, and here's also a manual transcript of a few lines:

[...]

Quoted 16 lines

[242866.xxxxxx] ata5.00: exception Emask 0x0 SAct 0x0 SError 0x0 action 0x6 frozen
[242866.xxxxxx] ata5.00: failed command: FLUSH CACHE EXT [242866.xxxxxx] ata8.00: exception Emask 0x0 SAct 0x0 SError 0x0 action 0x6 frozen
[242866.xxxxxx] ata8.00: failed command: FLUSH CACHE EXT [242866.xxxxxx] ata8.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[242866.xxxxxx] res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask
0x4 (timeout)
[242866.xxxxxx] ata8.00: status { DRDY }
[242867.xxxxxx] ata5.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
...
[242877.xxxxxx] ata3: COMRESET failed (errno=-16) [242877.xxxxxx] ata5: COMRESET failed (errno=-16)
...

Quoted 1 line

These kinds of splurs com up once in a minute or so.

This suggests to me that LVM is *not* part of the problem, but instead the disks are being shut down before bcache has been quiesced.

bcache developers - is this supposed to just work, or does the init system need to do (or not do) something special for bcache devices?

Ben.

Signature · 2 lines
Ben Hutchings
It is easier to write an incorrect program than to understand a correct one.

A message that is not in the archive (sent off-list or not yet received): 1373496148.24446.21.camel-nDn/Rdv9kqW9Jme8/[email protected]

#6 lore raw
Quoted 21 lines · Ben Hutchings
Quoted 3 lines · Jarno Elonen

Ok, I tried to take a photo but apparently the camera was set for very low resolution. :/ Anyway, a few pictures attached, and here's also a manual transcript of a few lines:

[...]

Quoted 16 lines

[242866.xxxxxx] ata5.00: exception Emask 0x0 SAct 0x0 SError 0x0 action 0x6 frozen
[242866.xxxxxx] ata5.00: failed command: FLUSH CACHE EXT [242866.xxxxxx] ata8.00: exception Emask 0x0 SAct 0x0 SError 0x0 action 0x6 frozen
[242866.xxxxxx] ata8.00: failed command: FLUSH CACHE EXT [242866.xxxxxx] ata8.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[242866.xxxxxx] res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask
0x4 (timeout)
[242866.xxxxxx] ata8.00: status { DRDY }
[242867.xxxxxx] ata5.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
...
[242877.xxxxxx] ata3: COMRESET failed (errno=-16) [242877.xxxxxx] ata5: COMRESET failed (errno=-16)
...

Quoted 7 lines
Quoted 1 line

These kinds of splurs com up once in a minute or so.

This suggests to me that LVM is *not* part of the problem, but instead the disks are being shut down before bcache has been quiesced.

bcache developers - is this supposed to just work, or does the init system need to do (or not do) something special for bcache devices?

This is supposed to work - bcache has a reboot notifier, which shuts stuff down.

I _suspect_ what might be going on (I've seen the same issue myself with bcache + md) is stacked block devices breaks it - which makes sense; the block devices have to be torn down in the right order (because they depend on each other) but the reboot notifier stuff just runs all the notifiers one after the other, synchronously. And I can't just put the asynchronous magic in the bcache code because, well, returning from our notifier is how the core stuff knows that everything should be done shutting down that can be.

I haven't actually tried to look and check that this is what's going on, but if it is the right solution is for the reboot notifier to run all the callbacks asynchronously.