#48538 Misleading error: Failed to delete old semaphore
Closed: wontfix 3 years ago Opened 5 years ago by firstyear.

I received the error

[09/Feb/2016:12:21:26 +101800] - 389-Directory/1.3.5 B2016.040.145 starting up
[09/Feb/2016:12:21:26 +101800] - Failed to delete old semaphore for stats file (/opt/dirsrv/var/run/dirsrv/slapd-localhost.stats). Error 13 (Permission denied).

But there was no such file.

/opt# ls -al /opt/dirsrv/var/run/dirsrv/slapd-localhost.stats
ls: cannot access /opt/dirsrv/var/run/dirsrv/slapd-localhost.stats: No such file or directory

Turns out you need to remove:


We should correctly indicate in the logs what the file is we are trying to access.

I think this is invalid now as lkrispen has removed the semaphores in question.

Closing invalid.

With nunc-stans enabled file /dev/shm/sem.slapd-standalone.stats gets created. And if the instance was killed, it can't clean it up because of selinux denials:

[15/Oct/2016:06:53:03.508211988 -0400] - INFO - main - 389-Directory/ B2016.288.2056 starting up
[15/Oct/2016:06:53:03.510215312 -0400] - EMERG - snmp_collator_create_semaphore - Failed to delete old semaphore for stats file (/var/run/dirsrv/slapd-standalone.stats). Error 13 (Permission denied).

time->Sat Oct 15 06:53:03 2016
type=SYSCALL msg=audit(1476528783.509:538): arch=c000003e syscall=87 success=no exit=-13 a0=7ffccb008cf0 a1=7fe14287a7c1 a2=7fe13fee5a16 a3=7ffccb008ae0 items=0 ppid=1 pid=22093 auid=4294967295 uid=389 gid=389 euid=389 suid=389 fsuid=389 egid=389 sgid=389 fsgid=389 tty=(none) ses=4294967295 comm="ns-slapd" exe="/usr/sbin/ns-slapd" subj=system_u:system_r:dirsrv_t:s0 key=(null)
type=AVC msg=audit(1476528783.509:538): avc: denied { unlink } for pid=22093 comm="ns-slapd" name="sem.slapd-standalone.stats" dev="tmpfs" ino=49935 scontext=system_u:system_r:dirsrv_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file

The message is still misleading, because /var/run/dirsrv/slapd-standalone.stats can be deleted, but /dev/shm/sem.slapd-standalone.stats - can't be.

commit d53ad9a
Writing objects: 100% (12/12), 1.42 KiB | 0 bytes/s, done.
Total 12 (delta 8), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
61c72f9..d53ad9a master -> master

Metadata Update from @firstyear:
- Issue assigned to firstyear
- Issue set to the milestone: 1.3.6 backlog

4 years ago

Metadata Update from @firstyear:
- Custom field reviewstatus adjusted to review (was: ack)

3 years ago

Metadata Update from @mreynolds:
- Custom field reviewstatus adjusted to ack (was: review)
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1778

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

8 months ago

Login to comment on this ticket.