-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 6/29/12 10:26 AM, Carlos E. R. wrote:
Hi,
I have been investigating why s2disk crashes (halts) randomly when attempting to hibernate my desktop machine. This has been working well for years, but since about 2..3 months, it fails.
The symptom is that s2disk halts after printing this message:
Snapshotting system
there is no disk activity, nothing. I have to power cycle.
What I have done is hack the suspend_system() function in suspend.c, adding messages that get printed to the screen so that I can see where it gets stuck. After doing the modification, system refused to crash for a week, till a day ago: finally, I got a crash after the "step 1.2" message:
sprintf(message, "Snapshotting system - step 1.1"); printf("%s: %s\n", my_name, message); if (set_image_size(snapshot_fd, image_size)) { error = errno; break; } sprintf(message, "atomic_snapshot - step 1.2"); printf("%s: %s\n", my_name, message); <=========== if (atomic_snapshot(snapshot_fd, &in_suspend)) { error = errno; break; }
So, it appears that atomic_snapshot() fails, and fails to report, and kernel crashes silently. So I added printf statementst there:
static int atomic_snapshot(int dev, int *in_suspend) { int error; printf("Atomic_snapshot: 1");
error = ioctl(dev, SNAPSHOT_CREATE_IMAGE, in_suspend); printf(", 2"); if (error && errno == ENOTTY) { printf(", 3 (err)"); report_unsupported_ioctl("SNAPSHOT_CREATE_IMAGE"); error = ioctl(dev, SNAPSHOT_ATOMIC_SNAPSHOT, in_suspend); } printf(", 4\n"); return error; }
I did two successful hibernations, and it failed on the third, printing only:
Atomic_snapshot: 1
Thus it is the ioctl() function call that is not returning!
Yep, this is where it would have to fail. That's the kernel entry point to create the snapshot. There is a ton of heavy lifting that goes along with it behind the scenes in kernel-space. Unfortunately, the now-common way of adding events (tracepoints) doesn't really help here since there'd be no way to dump them. Historically, most suspend problems are driver issues. If you have some time, try unloading individual modules before attempting the suspend. Once you're able to suspend reliably again, it should be clear which module is at fault. I'd start with the usb audio driver. - -Jeff
Now I need some dev to look at it further. I'm no kernel developper, I'm stuck here.
You can have a look at the report:
- -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJP+vBAAAoJEB57S2MheeWyvicQAInXiAj+I1Uh+7WWZldgF7GL m1LHmAdj1YoCWiFsy8vSdhTsb7OednP5f0k2T8KVC1ZGEZ2hC7dzf8vBeKtxLhDf 5+BsL2N+PrUxDHeuw0X9scyAcn3ODfLRoy3X74qx+9BvWk1C+fPMRHky503H/5OX F5kkyIPusmfStbtmoF6BcYGOba0AOKnZv2nR2qpVCuAKtVEDpNA44T0TdxKWsart 6wlmP22MmO6XcgBxtjs1LPfoKG2lV/3U/w0BnPGxSijFttEn6E+c+jqtn2AIxBNH jn5/H9BezUZOxj9f2fP3zko8G/YQatTHKGX5PnZVr7rY92r3xpcxDomih0qt4f4c RCN0+sHQt4dNjDblbak1qzke6y9ORqYrun0RI8yLbLNpN7ovbzT/UpVah7dLkQiK kOVQ7e8iZaPDDkPwpuy65JqduFBL2Rz7xaO0VlhTtQKCHvwz2Y0ypoYdGvrnTmSN xhnuO3r3HRdxJFL0a/Y6+yw170DCz2Kcz156T23MaP+Mu6JuuM3dogBLJgCIOLZ0 Ym8vnQPVc3hQdpzcKvEnZPceIsF/Muz7LlYyuQGfh+g6cTwjTm44XDKXkx0Hv+ho d5YPnrdRdt4YWuJ/4n3i5fKUePve6dRTwj15X7rCIDbcrP2LeCiLDhTcX8kvPOEd QXiMQLtqCx+NN7l7gemG =SXO3 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org