Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603450 - net-dns/bind occasionaly not restart after system crash if run in chroot environment
Summary: net-dns/bind occasionaly not restart after system crash if run in chroot envi...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
Depends on:
Reported: 2016-12-22 10:29 UTC by Vanni Della Ricca
Modified: 2023-01-13 13:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

patch to add bind to /run in ${CHROOT}/run (named-init.patch,422 bytes, patch)
2016-12-22 10:29 UTC, Vanni Della Ricca
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vanni Della Ricca 2016-12-22 10:29:16 UTC
Created attachment 457096 [details, diff]
patch to add bind to /run in ${CHROOT}/run

Occasionally named fail to restart after system crash if it running chrooted.
The named pid file is stored in ${CHROOT}/run/named/ that not is bind to /run or is not a tmpfs. If system crash occurred none clean pid file at boot.
If at the moment of start bind there is an other process whit old named pid it's fail to start with:
start-stop-daemon: /usr/sbin/named is already running 

To reproduce (simulate) this issue follow this steps:
1. stop named and create a ${CHROOT}/run/named/ with an possible pid (eg. an daemon stat before named or an kernel thread
2. restart system

At restart named fail to star whit this message:
this messages
 * Starting chrooted named ...
 * Mounting chroot dirs
 * Checking named configuration ...                                                                                                    [ ok ]
 * start-stop-daemon: /usr/sbin/named is already running                                                                               [ !! ]
 * ERROR: named failed to start

An fix to this problem is to bind ${CHROOT}/run to /run in named init script.
I attach an patch to init file to bind /run