Problem shutting down with bcache+LUKS+btrfs

Hello all! I've a little problem that I hope someone can help me with.
A have a fresh Arch Install fully upgraded on a Dell Inpiron 15R SE 7520. In this setup, my root partition uses bcache (from kernel 3.10.3-1, not from the AUR package) for SSD caching. On top of bcache I use LUKS and finally on top of all that, btfs.
The setup boots, runs and works, but there is a problem: it won't shutdown.
When I try to shutdown with "halt" or "shutdown -h now" I get:
Detaching DM devices.
Detaching DM 253:0.
Could not detach DM /dev/dm-0: Device or resource busy
Cannot finalize remaining file systems and devices, giving up.
[ 1309.417073] mei_me 0000:00:16.0: stop
[ 1341.773926] ata3.00: exception Emask 0x0 SErr 0x0 action 0x6 frozen
[ 1341.773978] ata3.00: cmd a0/00:00:00:08:00/00:00:00:00:00/a0 tag 0 pio 16392 in
[ 1341.773978]              res 40/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
[ 1341.774038] ata3.00: status: { DRDY }
[ 1341.811061] ata3: COMRESET failed (errno=-16)
[ 1341.848244] ata3: COMRESET failed (errno=-16)
[ 1341.924857] ata3: COMRESET failed (errno=-16)
[ 1341.943453] ata3: COMRESET failed (errno=-16)
[ 1341.943498] ata3: reset failed, giving up
After that it just stays there, complaining from time to time that "poweroff:857" is blocked for more than 120 seconds and never shutdown if i don't hold the power button.
I'm using the shutdown hook on mkinitcpio. To debug the issue I put "/bin/ash" on /run/initramfs/shutdown and dropped into a shell. In the shell I can't "umount" or "crypsetup luksClose" the root partition, all of them accusing "Device or resource busy", even though lsof says there is nothing using it.
It does not appear to cause any form of file system corruption. I noticed that btrfs identifies the partition as a ssd and automatically mounts with that option, even tough only the cache is ssd. I thought maybe that is the problem, but couldn't find an option to disable btrfs from doing this automagically.
Any help is appreciated.

Bolche wrote:all of them accusing "Device or resource busy", even though lsof says there is nothing using it.
Might be a kernel bug. Perhaps dirty pages on the cache device prevent the backing device from being unmounted.
Bolche wrote:I noticed that btrfs identifies the partition as a ssd and automatically mounts with that option, even tough only the cache is ssd. I thought maybe that is the problem, but couldn't find an option to disable btrfs from doing this automagically.
You should be able to invert the option by passing 'nossd', but this definitely shouldn't be related to the problem.

Similar Messages

  • My computer shuts down with an "unrepairable hardware problem" when burning a DVD with Premier Elements 10

    What causes my computer to shut down with a hardware problem while burning a video to DVD from Premier Elements 10?

    air traffic controller
    What computer operating system is your Premiere Elements 10 running on?
    If not asked before, what video card/graphics card does your computer use? NVIDIA GeForce? If so, please read Announcement at top of this forum describing the Premiere Elements 10 NVIDIA GeForce issue and related how to solution information.
    Please review the Adobe document dealing with troubleshooting burn to disc issues
    http://helpx.adobe.com/premiere-elements/kb/troubleshoot-system-errors-freezes-burning.htm l
    After that, we can decide what next if necessary.
    If any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

  • Snow Leopard shutting down with no warning is getting more complex!

    I have a series 1 Macbook Pro and have updated to Snow Leopard. As with most other people I immediately got problems with the "battery Service" message. So, having read all the various posts, and tried re-calibration, I bought a new battery.
    Charged fully and disconnected adaptor. The machine shut down with no warning at about 85%! I tried a few more times after fully charging the battery and it shut down a number of times - 83%, 85%, 89% and 98%. The battery shows a cycle count of 1. The last time it shut down (89%) I decided to try re-starting without plugging the adaptor back in. The machine started and ran up to the point where it properly started Snow Leopard - when it was about to change from the blue screen - at which point it shut down again. I tried this a number of times and it was absolutely conisistant, doing it every time.
    I then had the bright idea of plugging in the adaptor but watching the LED to see what happened. The LED came on green for 1 or 2 seconds, then went red. I then immediately unplugged it again. I then tried to start the machine with battery only. It started perfectly and went on running until down to 15% at which point it shut down, again with no warning. Tried re-starting - it wouldn't! Plugged the adaptor in so that it would charge the battery whilst using the machine. Then, much to my amazement, while the adaptor was still plugged in, and the battery was far from fully charged, the machine shut down - again without warning. That's "it shut down with battery installed AND mains connected". The machine then wouldn't start, with mains connected. It would switch on for a few seconds then shut down again. To get it to start I needed to remove the battery and run it on mains only.
    That's where I am at the moment, running 'mains only' with no battery installed. It looks as if Snow Leopard sets the battery monitor / charging hardware incorrectly on the MBP. Once set incorrectly it looks as if it loses itself!
    Has anyone else experienced anything like this?

    It really doesn't get any better! Well, not a lot. I decided that I'd try yet another brand new battery. I charged it fully, disconnected the mag connector and it ran happily without shutting down - hooray. However, after putting out the message about low power and about to shut down, at about 5%, it ran to about 2% and shut down without warning. It didn't go to sleep.
    I then couldn't get the machine to start again. I reset the SMC and still no joy. it would start to run, flash the screen a couple of times and then die. To get it to run I had to disconnect the battery, start it, then plug the battery back in again. Snow Leopard does appear to do something odd with the charging hardware. It appears to leave it in an odd state.
    You may be right about Battery Update 1.3, but there appears to be no way of installing it under 10.6.8 - unless you know something I don't!
    This is the current battery:
      Manufacturer:          Sony
      Device name:          ASMB012
      Pack Lot Code:          0002
      PCB Lot Code:          0000
      Firmware Version:          102a
      Hardware Revision:          0500
      Cell Revision:          0303
      Charge Information:
      Charge remaining (mAh):          3734
      Fully charged:          No
      Charging:          No
      Full charge capacity (mAh):          5205
      Health Information:
      Cycle count:          2
      Condition:          Normal
      Battery Installed:          Yes
      Amperage (mA):          -2230
      Voltage (mV):          11429
    As you can see, I'm running 'battery only' at the moment!

  • Problems shutting down, starting up

    My IMac has been giving me several problems lately. It sometimes will not go to sleep, and when it does, will not wake up. I have to re-start the computer to wake it up. It often shuts down with no warning or the grey film comes over and says the Mac must be re-started. This morning, I had trouble turning the computer on with the power switch, and when it did turn on, the apple stayed on the computer and the fan turns on loud. I have re-installed the system folder, re-set the PRAM and run Disk Warrier. Any suggestions? My computer is a little over 3 years old.

    Hi jfedor, and a warm welcome to the forums!
    Since your problem is different, feel free to start a new topic, as it will get more attention, and you problem(s) can be addressed specifically.
    Here's the link if it's hard to find where to do it...
    http://discussions.apple.com/post!default.jspa?forumID=758
    Include what color the Install Disk is, and what it says on it, as well as RAM & free Disk space on you eMac!

  • I have MacBook Pro and whenever I start Aperature 3 it stays on for about 5 minutes then it shuts down with an error of shutting down unexpected... anything??

    Hello, I have MacBook Pro and whenever I start Aperature 3 it stays on for about 5 minutes then it shuts down with an error of shutting down unexpected... anything??
    Also does anyone know how to take something from one picture and add it to another in aperature?
    Thank you!!!

    I had the exact same problem. Here is what an Apple Support person told me to do - and it worked like a charm!
    Go to your APPLICATIONS Folder. Find a folder within that folder called TOOLBARS. Remove the ENTIRE folder. Once you remove that folder, your Aperture should work perfectly.
    There is something in that folder that you don't need that messes with Aperture. Try it. Mine worked perfectly!

  • I movie shuts down with one minute left to process movie. How do I fix?

    iMovie shuts down with less than a minute to process. How can I fix? I've tried 4 times now. Memory issue?

    Hi Thersa
    May be some help here.
    *Not knowing the origin to Your problem - General approach when in trouble is as follows:*
    • Free space on internal (start-up) hard disk if it is less than 10Gb should rather have 25Gb
    • Hard disk is untidy: Repair Permissions, Repair Hard disk (Apple Disc Util tool)
    • Delete iDVD pref file - *or rather start a new user/account* - log into this and re-try
    • Program miss-match: iDVD 5.0.2, Mac OS X.4.11 AND QuickTime 7.4.1 - is OK - DON’T work under Leopard
    • Program miss-match: iDVD 6.0.4, Mac OS X.4.11 AND QuickTime 7.4.1 - is OK (might work under Leopard)
    • Program miss-match: iDVD’08 v. 7.0.1, Mac OS X.4.11 AND QuickTime 7.4.1 - is OK (might work under Leopard)
    • iDVD (08) v7 Locate theme folder. Move out iDVD1, iDVD 2 and eventually iDVD4 folders to desktop - re-try
    • Try a Cleaning CD/DVD that cleans the laser lens on the DVD burner/player
    iDVD 6.0.4 and iDVD 7.0.1 are compatible with Mac OS X 10.5 Leopard
    iDVD pref file resides: Mac Hard Disk (start-up HD)/Users/"Your account"/Library/Preferences and is named:
    com.apple.iDVD.plist
    While iDVD is NOT RUNNING - move this file out to desk-top.
    Now restart iDVD.
    Last resort: from Craig: Solved the problem!! Finally!!
    I deleted every iDVD application and folder from my boot drive,
    emptied the trash and then installed iDVD 08 using the customize option
    and I am up and running.
    Yours Bengt W

  • Macbook Pro shuts down with 40% battery left... does not just go to sleep

    Hi,
    Our MacBook Pro has started to shut down with about 40% battery left. After it has shut down, I press the button underneath the computer and 2 our of 5 lights light up on the battery. I wouldn't mind if it just went to sleep but I totally have to restart it and lose everything I have been working on when it died. The computer used to go to sleep when the battery got to 0%, then I could plug it in and keep working.
    I don't know if it's a software issue or a battery issue or a firmware issue.
    Any tips would be MUCH appreciated.
    Thanks a lot.

    I have read so many articles across the internet with people experiencing this problem. This is the conclusion I came to.
    I could not calibrate my battery as my system would hard power down before it got anywhere close to draining the battery entirely. The last 10 cycles on my battery were attempts at calibrating. The most common cause would be because the battery in our macbook pro does contain something close to the charge being reported by the computer, but cannot deliver it. Your fuel gauge is probably not incorrect, especially when the leds on the battery itself show a charge that should be capable of running the machine. Even if it is not calibrated correctly. The internal resistance of the battery itself has compromised the batteries ability to deliver the amperage necessary to run our machines. After finally realizing this, I turned my screen brightness all the way down, and sat all my power settings to max battery life without allowing the machine to go asleep. Then, I went to sleep myself =). In the morning it appeared as though I had a successful calibration and the machine did not power down hard. Depending on how bad of shape your battery is in, this may or may not work. Either way, it didn't matter much. Even with my fuel gauge being correct, if my screen brightness was cranked up and I was doing anything somewhat processor intensive, my battery failed to provide the needed amperage and powered down my system hard again.
    The battery really does have the amount of power it says, it just cannot deliver it as fast as needed. At a slower rate, it will work. A replacement battery is needed. I cannot explain the strange jumps/dips in storage capacity but would guess these numbers are a guide, and more than one environmental factor can change this number. Also, once the internal resistance builds up inside the battery and the inability to calibrate happens, it compunds the problem.
    My machine is a first gen intel macbook pro. A few months after I bought it, I had battery problems and apple replaced my battery. My machine is 31 months old, it's battery is somewhere around 27. I tried to get apple to replace my battery and they told me no. I was 40% healthy @ 207 cycles. Many people complain about this but it seems reasonable to me, I didn't argue. I do believe my battery failed prematurely, however, it was due to a few factors and I do not think it was the batteries fault. My machine was one of those nice overheating first generation macbook pros. To make the matter worse, one of my internal fans stopped working. I knew this as my istat pro program showed me 1 fan @ zero rpm. I figured I had applecare and had work to do, so continued to use the computer for several months. I did quite a bit of video encoding and processor intensive work. When I would get to work in the morning, my granite desktop was really cold, however, after a half hour or so with the macbook pro running the heat would dissipate through it and warm it up nice and comfortable! lol, some may not think this is funny, but it worked well for me. I frequently had over 180 degree cpu temps and the bar above the keyboard being too hot to lay your hand on and keep it there. I am sure some of this excess heat contributed to the premature failure of my battery. The type of batteries in our machines are killed by heat, charge amount, cycles and age. Probably in that order for most users. So, can I blame apple because my unit ran hotter than it should have because their fan failed! eh, maybe, but I am happy with this laptop overall. I have never had a single laptop for more than 15 months and have had this one for over 30 now.
    I ran across this site somewhere, it may have been another user on these forums, I cannot remember. http://www.batteryuniversity.com/partone-19.htm On this page, it talks about our batteries, the effects of heat and level of charge in combination with age. At 77 degrees F., charged to 100% (which is very typical of our machines, or close to it) after one year the battery is 80% as good as it was when it was new. At 32 degrees it is as 94% as good as new after one year. Jump up to 104 F. and the battery is only 65% as good as new after 1 year. Sometimes my computer is running for days and sometimes the environment is warm. Add that to the heat produced by the machine itself and I bet the battery sustained 100 degree temperatures for long periods of time. Just for fun, at 140 degrees and 100% charge in our lithium ion batteries, after only 3 months the capacity is only 60% of its new capacity.
    Anyways, that is my battery story. Sum up. The inability to calibrate is due to the batteries increased internal resistance and inability to deliver the charge at a rate needed by your computer even though it appears healthy, or somewhat healthy. You may be able to calibrate by making your laptop drain less power, turn screen brightness all the way down, turn airport & bluetooth off, let hard disk sleep, and let it go. But that will not stop the hard shut down problem, although the fuel gauge will be more accurate. Think of it like this. a 100 gallon fuel tank on a car full of gas. The fuel gauge is correct, it is full. However, the fuel line connecting the fuel tank to the engine is made of a space age material that shrinks as it ages and is exposed to heat. Eventually the fuel line shrinks to the size of a coffee stirrer or small straw. When the motor is turned off the fuel seeps into the small straw. Start the motor, it begins to sip the fuel from the straw. Rev it up (encode video), the motor demands more gas but cannot get it. The motor stalls out (your computer shuts off). Same idea somewhat. Sorry so long

  • IPhone 5 shuts down with over 30% battery remaining

    My iphone 5 is shutting down with over 30% battery remaining. It used not to shut down with still around 2% remaining but its increasing with every day now. For the last 5 days or so it is shutting down when showing even 30% remaining. When plugged in again, the battery is all drained down. Please someone give some valuable advice.
    thanks
    Ehtasham Shahid

    Sounds like a definite hardware problem. You should still be in warranty, so head over to an Apple Genius Bar and they will either repair or replace it. A replacement will be much more likely, and it's free (if in warranty).
    Good luck!

  • IPhone 5 shuts down with the battery at 40%

    I'm having issues with my iPhone 5. It regularly shuts down with the battery being far from 0%. When I took it to the apple store, a "genius" said that the battery is fine and restored the phone to the factory settings. I set it up as new without touching the backup (with iOS 8), but the iPhone keeps shutting down with a half charged battery. If anythings, the problem only became worse with iOS 8.1. I would appreciate any suggestions on how to fix it.
    The iPhone is out of the warranty and is not eligible for battery replacement. Another issue I have is that the home button often responds with a delay, but I don't know if it's related to the main problem.
    Thanks

    Here's the battery info from iBackupBot:
    CycleCount: 368
    DesignCapacity: 1430
    FullChargeCapacity: 1200

  • Computer shuts down with charge on battery and no warning

    without warning and plenty of charge on my battery my mac book pro shuts down? if it just sits there in sleep unplugged it seems to run fine, but if its unplugged and i try to use it (with a charged battery) it shuts down with out warning. started about 3 months ago. Is the battery just old..?

    It is almost certainly a sign that your battery is dying, timskins.
    The problem is that when batteries deteriorate their internal resistance increases and they are no longer able to deliver power when it is demanded, even though they still have the ability to store it. They may chug along providing low power for quite a bit longer, but when your computer suddenly needs a bit more (because of increased CPU or GPU demand, or the HD spinning up or whatever) it is unable to provide it and the computer shuts down unexpectedly.
    Think of it like driving a car with a bad fuel pump. Your car is driving along a highway with a full tank of gas. Its running smoothly enough. You put your foot down to accelerate up a hill or overtake a another vehicle and the engine dies because the fuel pump can't meet the greater demand for gas. The tank is still pretty full but the fuel can't be pumped in fast enough to keep it running in a high demand situation, so it shuts down.
    See the section dealing with increasing internal resistance in batteries at http://www.batteryuniversity.com/parttwo-31.htm for more about such things, or http://www.buchmann.ca/Chap9-page1.asp for a longer, more technical, account.
    Once this starts happening the only options are to get a new battery or to avoid any work that makes much demand on power (like visiting a "Flash" based website or, when it gets bad enough, even spinning up the HD from a stationary situation.) Unfortunately even with light use the battery will soon reach a point where the regular peaks of CPU and HD use will become too much for it and you will suffer more and more unexpected shutdowns until the battery is replaced.
    My suggestion would be that you take the battery to an AASP or Apple Store, where they can quickly "stress test" the battery for you to make certain that in your case this is, indeed, the problem.
    Rod

  • My iphone 5 is shutting down with 30% battery remaining

    My iphone keep shutting down with approx. 30% battery remaining, sometime 18%, I have to plug it to turn it on again, it is very frustrating. I did reset the phone and it still doing it.   PLEASE HELP!

    Sounds like a definite hardware problem. You should still be in warranty, so head over to an Apple Genius Bar and they will either repair or replace it. A replacement will be much more likely, and it's free (if in warranty).
    Good luck!

  • C309 Photosmart shuts down with a loud bang.

    My HP C309a All in One Photosmart will sometimes shut down with a loud bang in the middle of printing a page. I then pull out the plug from the outlet and reinsert it. The printer then powers up again but provides no error message regarding what happened. Anyone encounter something like this. The computer driving it is an iMac. The software and hardware configuration hass not changed since I started using the C309a, which I received as a warranty replacement from HP in July 2010.

    Just had the same problem.  Would not turn on after the bang and turning off.  Pulled the plug and now it turns on.  Any further info on this problem?
    Thanks for what ever.

  • My itunes keeps shutting down with an windows error

    My itunes keeps shutting down with a windows error everytime i try to convert someting to AAC.

    Im having the same issue. It starts up shutsdown and pops up an error has occured message. I have uninstalled and reinstalled it 3 times and even downloaded the Quicktime and ITunes seperately. But the same message appears everytime. I did discover that it was the Quick time messing up though... so uh this might not help but maybe someone else know something about the Quicktime problem.

  • Satellite M40X-169 when connected to wireless unit shuts down with blue screen and restarts

    Hello.
    I got the problem with my notebook when i'm connecting and getting connected to the wireless network. My notebook is shutting down with blue screen error and then restarts.
    Maybe you can help me to solve this problem, because i can normaly work when i need to be connected.
    Plaese help me.

    Hi
    It is not easy to give you some precise answer but try to remove WLAN card from device manager and restart the unit. You can also check Toshiba download page and try to install the latest WLAN card driver.

  • On start up, says had problem shutting down mac book pro mavericks

    on start up, said had problem shutting down, mac book pro mavericks 10.9.4
    recently loaded dragon dictate

    Welcome to Apple Discussions!
    I am wondering if your hard drive is failing? You might try downloading and running SMART Utility on it:
    http://www.apple.com/downloads/macosx/systemdiskutilities/smartutility.html
    You can download the demo and run it several times for free. It is somewhat more critical than Disk Utility, and may give you earlier warning of impending drive failure.
    You might also want to run the extended version of the Apple Hardware test and see if you get any error codes.
    From the way your hard drive is behaving, it sounds to me like there is something wrong with it. Since reinstalling the OS doesn't solve anything, you are likely dealing with some sort of a hardware issue.
    Good luck!

Maybe you are looking for