[Gta04-owner] dbus crashing with SIGBUS after suspend/resume

EdorFaus edorfaus at xepher.net
Sat Aug 3 18:39:11 CEST 2013


On 07/01/2013 03:35 PM, Radek Polak wrote:
> i have quite tracked it down to the patch that enabled omap_off_mode.

I've been running with the v56 kernel for a little while (which disabled 
off_mode), and dbus no longer crashes for me, so this does indeed appear 
to be the cause (thank you for figuring it out).

> and it dbus crashed after like 2 calls

> Attached is diff between these two branches. Maybe it helps?

I noticed something suspicious in the diff that seems to align with the 
2 calls part.

It may just be that I'm too unfamiliar with this code to see something 
obvious, but in the arch/arm/mach-omap2/pm34xx.c file there's this part:

+		if (strcmp(pwrst->pwrdm->name, "core_pwrdm") == 0) {
+			static int times = 0;
+			times++;
+			if (times == 1)
+				pwrst->next_state = PWRDM_POWER_RET;
+			if (times == 2)
+				pwrst->next_state = PWRDM_POWER_OFF;
+		}

which adds a static int, and increments it on every call - but never 
resets it, and only does anything the first two times (which aligns with 
only 2 calls working properly).

I don't know if this is actually called during suspend/resume, or 
whether it's actually relevant even so, but I figured I should mention 
it in any case, just in case I was onto something.

By the way, if it isn't supposed to do anything after the second time, 
but is still called repeatedly, there's actually a tiny bug in it (which 
is admittedly very unlikely to be triggered): since the int is 
incremented always, it will eventually overflow and become 1 again...

Frode Austvik

More information about the Gta04-owner mailing list