[Home]

Summary:ASTERISK-23996: No core dumps because of res_musiconhold chdir.
Reporter:Walter Doekes (wdoekes)Labels:
Date Opened:2014-07-07 07:17:09Date Closed:2017-03-29 08:16:13
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_musiconhold
Versions:SVN 1.8.28.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Jeez. Finally found out why I didn't get core dumps most of the time.

res_musiconhold does a chdir to a non-writable directory (since r4552). That chdir is completely avoidable, as far as I can tell.

If run quickly enough, that chdir is undone at the end of the function, but because of the race, a second run of the function will take the temporary cwd as old cwd and return to that when finished:
*from now on, you're in a non-writable musiconhold dir, and you get no core dumps (unless you run as root or your moh dirs are writable or your core_pattern is absolutely pathed).*
Comments:By: Friendly Automation (friendly-automation) 2017-03-29 08:16:14.016-0500

Change 5325 merged by Joshua Colp:
res_musiconhold: Don't chdir() when scanning MoH files

[https://gerrit.asterisk.org/5325|https://gerrit.asterisk.org/5325]

By: Friendly Automation (friendly-automation) 2017-03-29 10:12:28.389-0500

Change 5327 merged by zuul:
res_musiconhold: Don't chdir() when scanning MoH files

[https://gerrit.asterisk.org/5327|https://gerrit.asterisk.org/5327]

By: Friendly Automation (friendly-automation) 2017-03-29 14:43:25.405-0500

Change 5326 merged by George Joseph:
res_musiconhold: Don't chdir() when scanning MoH files

[https://gerrit.asterisk.org/5326|https://gerrit.asterisk.org/5326]