Opened 17 years ago
Closed 17 years ago
#2895 closed defect (fixed)
mythbackend CPU temperature code not re-entrant - causes crashes
Reported by: | Owned by: | skamithi | |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | 0.20 |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The code at around httpstatus.cpp line 2487 uses the lm_sensors library. As this library keeps it's status in a static variable it is not re-entrant and crashes the backend if there are two calls to the http service at the same time.
Attachments (1)
Change History (8)
comment:1 Changed 17 years ago by
Owner: | changed from Isaac Richards to skamithi |
---|---|
Priority: | major → minor |
Severity: | high → medium |
Changed 17 years ago by
Attachment: | cpu_temp.diff added |
---|
comment:2 follow-up: 3 Changed 17 years ago by
Status: | new → assigned |
---|
andrew, please test patch and let me know of the results.
comment:3 Changed 17 years ago by
Replying to skamithi:
andrew, please test patch and let me know of the results.
I have built this patch into the atrpms source code for backend version 0.20-149.fc5.at. I have replaced the mythbackend binary on the two slaves and the master server. I am running the system very hard, so it will crash for other reasons. I will report back in a couple of days to see how much of a reduction there has been.
Thanks
comment:4 Changed 17 years ago by
Milestone: | unknown → 0.21 |
---|
comment:5 Changed 17 years ago by
Yum nightly update automatically updated the servers to 0.20-150 and the problem (of course) started again. Once I had patched and rebuilt the failure rate went down from 2 or 3 times an hour to 3 or 4 times a day.
This patch works a treat. Thanks.
It would be fantastic if it could be folded into the 0.20 release. It is a very small change and it has a huge effect on stability in some circumstances (eg mine).
add qmutex lock/unlocking around lmsensor calls.