[asterisk-bugs] [JIRA] (ASTERISK-19867) asterisk fails to lower its priority when astcanary dies

Walter Doekes (JIRA) noreply at issues.asterisk.org
Sat Sep 17 11:35:01 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-19867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Walter Doekes updated ASTERISK-19867:
-------------------------------------

    Affects Version/s: 11.23.1

> asterisk fails to lower its priority when astcanary dies
> --------------------------------------------------------
>
>                 Key: ASTERISK-19867
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-19867
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Utilities/astcanary
>    Affects Versions: 1.8.7.2, 1.8.11.1, 1.8.12.0, 11.23.1
>         Environment: Debian GNU/Linux 6 (squeeze)
> Linux 2.6.32-5-686 and 2.6.32-5-686-bigmem
> GNU libc 2.11
>            Reporter: Xavier Hienne
>
> When astcanary dies, asterisk is supposed to lower its priority and return to the SCHED_OTHER scheduling policy.
> This is not what I'm observing on Linux: apparently, the death of astcanary is detected by the watching thread, but it fails to change the priority of all other asterisk threads. I suspect that only the watching thread sees its priority changed (just before dying) and this might be the expected behavior of sched_setscheduler() with pid=0.
> Here is how to reproduce this issue:
> $ ps u $(pidof astcanary asterisk)
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> root     31854  6.8  3.3  34732 17120 ?        Ssl  15:59   0:00 /usr/sbin/asterisk -p -M 1000
> root     31855  0.0  0.1   2892   772 ?        S    15:59   0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 31854
> $ chrt -p $(pidof asterisk)
> pid 31854's current scheduling policy: SCHED_RR
> pid 31854's current scheduling priority: 10
> $ killall astcanary 
> (after some time => WARNING[31856] asterisk.c: The canary is no more...)
> $ chrt -p $(pidof asterisk)
> pid 31854's current scheduling policy: SCHED_RR
> pid 31854's current scheduling priority: 10
> => asterisk is still at its highest priority



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list