Menu

#91 vhba-Hibernate and Suspend dont work with vhba loaded

None
closed
nobody
None
vhba-module
default
2015-10-22
2015-07-15
No

I use Debian 8 and compiled and installed all the latest CDemu release packages. With the vhba module loaded Hibernate and Suspend does not work. It gives the following message:

Freezing of tasks failed after 20.007 seconds (0 tasks refusing to freeze, wq_busy=1):

Without vhba loaded Hibernate and Suspend work.
Regards,
Andreas

Discussion

  • Henrik Stokseth

    Henrik Stokseth - 2015-07-23

    There's a number of different userspace solutions for handling power management so even though one could add scripts to shut down and restart CDEmu, this would not be portable.

    To make matters worse, by the time the kernel module notices there is a PM state transition, user programs (including the CDEmu daemon) is frozen, and I am guessing this is what is causing this issue.

    I don't know how to fix this, but thanks for reporting.

     

    Last edit: Henrik Stokseth 2015-08-15
  • Henrik Stokseth

    Henrik Stokseth - 2015-08-21

    Was going through some docs and from what I can see, in the case of userspace solutions the way to handle this is to use notifiers.

    Document: /usr/share/doc/linux-doc/power/notifiers.txt

    It works like an early warning system, to enable doing stuff before suspend is called.

    From another document I read that one driver can effectively prevent the system from entering suspend etc. I wonder if this is the case for VHBA as it does not register any PM callbacks. Although adding dummy ones is simple and I beleve sufficient as I think nothing needs saving in special PM memory.

    There is still the need to have notifiers notify userspace deamon, but at present there is no real two-way communication between the driver and the daemon. All I/O is initiated by the daemon and this needs to change obviously...

    Hopefully it should be enough to signal the daemon to stop I/O in the event of suspend happening. With an empty work-queue and dummy PM callbacks I'm hoping that should make the driver go to sleep without any problems.

     
  • Rok Mandeljc

    Rok Mandeljc - 2015-10-18

    Hey,

    sorry for belated response on this issue. I have been trying to reproduce it on my machines, but with no success.

    Or rather, back in July I did a quick test on my Fedora laptop, and got the "freezing of tasks failed" error as well - but only if cdemu daemon was running (in other words, if virtual device was created by the kernel module), and only with hibernation, while suspend worked fine (or it was the other way around). Later, when I got back from vacation and tried to reproduce the issue again, I could not.

    So my guess is that one or more updates of kernel/system libraries that were pushed in between solved the issue on my laptop. I now tried with Debian jessie as well, but also with no success - though my guess would be that between July's 8 and today's 8.2, several kernel updates were pushed as well.

    So, can you please confirm that you are still experiencing this issue, and if so, provide the version of kernel you are using? Thanks!

    Regads,
    Rok

     
  • Andreas Wirooks

    Andreas Wirooks - 2015-10-22

    Hi Rok,
    you are right. One of the kernel-updates must have fixed the problem. I reinstalled cdemu and now hibernate works fine.

    I can't tell you the kernel version i used back then. Because the update check runs every day it must be the version from debian at that time which was:
    3.16.7-ckt11-1

    Actually i run:
    3.16.7-ckt11-1+deb8u5
    Kind regards,
    Andreas

     
    • Rok Mandeljc

      Rok Mandeljc - 2015-10-22

      Hey Andreas,

      thank you for the feedback, it is much appreciated.

      It is good news that hibernate works fine now, although I would feel better if the actual cause of the issue was discovered. I tried downgrading to 3.16.7-ckt11-1, but it makes no difference for me. So for now I will be closing the bug report as I cannot reproduce the issue, but will keep an eye out for it. Similarly, should you encounter the issue again, please (re)open a bug report. Thanks!

      Regards,
      Rok

       
  • Rok Mandeljc

    Rok Mandeljc - 2015-10-22
    • status: open --> closed
    • Milestone: -->
     

Log in to post a comment.