Bug 740336

Summary: gcc may not inline arch_local_irq_save
Product: Red Hat Enterprise MRG Reporter: Steven Rostedt <srostedt>
Component: realtime-kernelAssignee: Red Hat Real Time Maintenance <rt-maint>
Status: CLOSED WONTFIX QA Contact: David Sommerseth <davids>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0CC: bhu, lgoncalv, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-25 19:37:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
patch to fix the bug none

Description Steven Rostedt 2011-09-21 16:58:02 UTC
Created attachment 524246 [details]
patch to fix the bug

Description of problem:

Compiling the MRG kernel myself, the kernel would crash on the rttrace version.
The reason was that it was calling the wakeup tracer in the self tests that
happened to have function tracing enabled which traced arch_local_irq_save().
arch_local_irq_save() is suppose to be inlined, but because CC_OPTIMIZE_INLINING is enabled in the MRG config, my gcc decided it was best not to inline it causing ftrace to trace that function.

The problem arises when we enter the scheduler due to preemption. The preempt scheduler calls local_irq_save() which calls arch_local_irq_save() which gets traced. The wakeup function tracer disables preemption and then enables it later, which happens to notice the NEED_RESCHED flag set and calls back into the preempt_scheduler() code which again calls arch_local_irq_save() which gets traced again and then we continue this loop until we crash.

The simple answer is to not trace arch_local_irq_save(). In fact, we should not trace any of the arch_* functions. A simple patch is attached that makes these functions not traced.

Comment 1 Beth Uptagrafft 2014-09-25 19:37:18 UTC
This issue has not been updated in a while and will be closed WONTFIX.  If you believe this is still an issue on our most recent MRG-2.5 3.10 Realtime release, please file a new issue for further investigation.