Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error: Failed to delete old semaphore #1778

Closed
389-ds-bot opened this issue Sep 13, 2020 · 9 comments
Closed

Misleading error: Failed to delete old semaphore #1778

389-ds-bot opened this issue Sep 13, 2020 · 9 comments
Labels
closed: fixed Migration flag - Issue
Milestone

Comments

@389-ds-bot
Copy link

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/48538


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:

/dev/shm/sem.slapd-localhost.stats

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

@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 13, 2020
@389-ds-bot 389-ds-bot added this to the 1.3.6 backlog milestone Sep 13, 2020
@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2016-08-17 12:33:31

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

Closing invalid.

@389-ds-bot
Copy link
Author

Comment from vashirov (@vashirov) at 2016-10-15 17:08:32

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/1.3.6.0 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.

@389-ds-bot
Copy link
Author

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2016-10-18 04:09:51

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

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2017-02-11 22:51:13

Metadata Update from @Firstyear:

  • Issue assigned to Firstyear
  • Issue set to the milestone: 1.3.6 backlog

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2017-05-22 02:51:51

0001-Ticket-48538-Failed-to-delete-old-semaphore.patch

Hey @vashirov does this fix up the warning message for you?

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2017-05-22 02:52:07

Metadata Update from @Firstyear:

  • Custom field reviewstatus adjusted to review (was: ack)

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2017-05-24 17:04:43

master

b81c8ba

1.3.6
ca548a7

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2017-05-24 17:04:46

Metadata Update from @mreynolds389:

  • Custom field reviewstatus adjusted to ack (was: review)
  • Issue close_status updated to: fixed
  • Issue status updated to: Closed (was: Open)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: fixed Migration flag - Issue
Projects
None yet
Development

No branches or pull requests

1 participant