Bug 859226
Summary: | iptables and other tools unable to log to rsyslog | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise MRG | Reporter: | evcz | ||||
Component: | realtime-kernel | Assignee: | Luis Claudio R. Goncalves <lgoncalv> | ||||
Status: | CLOSED ERRATA | QA Contact: | David Sommerseth <davids> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 2.2 | CC: | bhu, jkastner, lgoncalv, ovasik, williams | ||||
Target Milestone: | 2.2.2 | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
Cause: A subtlety in the relation between preemption depth (preempt_count) and the raw spinlocks in the PREEMPT_RT based kernels led to a context where printk buffers were never flushed to the console.
Consequence: Some time after boot, after a certain condition was triggered, kernel generated log would stop reaching the console and system log (rsyslog).
Fix: That specific verification of the preempt_count variable was adapted to the reality of the Realtime kernel.
Result: Logs generated by the kernel are successfully sent to both the console and the system log, according to the system configuration.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-12-04 19:59:14 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
evcz
2012-09-20 20:30:07 UTC
don't know if this might be useful... noticed that when pushing the system resulting in: "kernel: sched: RT throttling activated" logged also previous log lines get written to messages The "kernel: sched: RT throttling activated" message means RT tasks have been running uninterruptedly, leaving no time for the non-RT tasks to run. As that may lead the system to an unconsistent state, there is a tunable failsafe that will preempt the RT tasks and let the non-RT tasks run for a giver period of time. The bandwidth limiting of RT tasks is controlled by: /proc/sys/kernel/sched_rt_period_us /proc/sys/kernel/sched_rt_runtime_us The default is a 950000us runtime with a period of 1000000us. So, if RT tasks have been running for more than 950ms in the last 1s, they are throttled so that non-RT tasks have a minimal CPU share. Writing "-1" to /proc/sys/kernel/sched_rt_runtime_us disables the bandwidth limitting. The other interesting datapoint is that if you are seeing this message you either have a CPU hog task running on your system (that could be startving other kernel threads -- leading to delays in logging and other tasks) or you have a very old version of _rtctl_ that is unaware of the kernel threads naming change in MRG-2.2. I suggest updating rtctl first and running the tests again, to confirm. Hi, that "error" got written into the log while I was trying to stress test a machine (xeon e1230 (4xcore + 4xHT)) with 8 tasks running in realtime using "100% CPU" each one The issue I'm reporting here is that logging to syslog does not work (either from iptables and nor from other tools like network when using tcpdump in promiscuos mode)... the only time I saw logging working was during that specific "stress test". rtctl should be already up-to-date: rpm -qa rtctl rtctl-1.9-5.el6rt.noarch tried on another server with a new install. and can confirm that issuing: iptables -I INPUT 1 -m limit --limit 100/m --limit-burst 100 -j LOG --log-level 4 --log-ip-options --log-prefix "Test iptables logging: " results in nothing being logged to /var/log/messages Could you please run a test? When ran the iptables command line you suggested, I saw the data on dmesg but noticed it was not reproduced on the console. When I ran the command line below, during the time it took to complete the command, there was output from iptables at the console. The command line was: cat /proc/consoles yes, can confirm that issuing: cat /proc/consoles resulted in data being logged while the task was running. That's similar to what happens when pushing the system till the "RT throttling activated" kicks in. Created attachment 617625 [details]
fix printk flush of messages
Thanks Steven Rostedt for pointing me out to this patch sent by Frank Rowand. This patch indeed solves the issue.
We are just verifying whether we will be able to release a hotfix kernel containing this change or it will be part of the next Errata kernel.
---
It will be released soon as a hotfix kernel. sounds great let me know if I've to do some betatesting, got a few spare machines I can experiment on. thank you, best regards Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-1491.html |