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

Restart of Admin server from console fails on segfault #567

Closed
389-ds-bot opened this issue Sep 12, 2020 · 5 comments
Closed

Restart of Admin server from console fails on segfault #567

389-ds-bot opened this issue Sep 12, 2020 · 5 comments
Labels
closed: fixed Migration flag - Issue

Comments

@389-ds-bot
Copy link

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


https://bugzilla.redhat.com/show_bug.cgi?id=887394 (Red Hat Directory Server)

Description of problem:
Restart of Admin server from console goes to infinite loop - /var/log/messages
show segfault:

[root@dstet jrusnack]# tail /var/log/messages
Dec 14 15:25:08 dstet rtkit-daemon[1943]: Sucessfully made thread 2092
of process 2079 (/usr/bin/pulseaudio) owned by '500' RT at priority 5.
Dec 14 15:25:09 dstet rtkit-daemon[1943]: Sucessfully made thread 2139
of process 2139 (/usr/bin/pulseaudio) owned by '500' high priority at
nice level -11.
Dec 14 15:25:09 dstet pulseaudio[2139]: pid.c: Daemon already running.
Dec 14 15:30:33 dstet kernel: restartsrv[2826]: segfault at 400 ip
0032a055 sp bfefecac error 4 in libplc4.so[329000+4000]
Dec 14 15:30:33 dstet abrtd: Directory 'ccpp-2012-12-14-15:30:33-2826'
creation detected
Dec 14 15:30:33 dstet abrt[2827]: Saved core dump of pid 2826
(/usr/lib/dirsrv/cgi-bin/restartsrv) to
/var/spool/abrt/ccpp-2012-12-14-15:30:33-2826 (806912 bytes)
Dec 14 15:30:40 dstet kernel: Bridge firewalling registered
Dec 14 15:30:49 dstet abrtd: Sending an email...
Dec 14 15:30:50 dstet abrtd: Email was sent to: root@localhost
Dec 14 15:30:50 dstet abrtd: New problem directory
/var/spool/abrt/ccpp-2012-12-14-15:30:33-2826, processing

Version-Release number of selected component (if applicable):
registered and updated RHEL6.3 with RHDS 9.0

389-ds-base-1.2.10.2-20.el6_3.i686
389-ds-base-libs-1.2.10.2-20.el6_3.i686
389-admin-1.1.25-1.el6.i386
redhat-ds-9.0.0-1.el6.i386

Additional info:
Restart of admin server from shell succeeds. This issue was reproduced on both
i386 and x86_64 systems with same configuration (both VMs).
@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 12, 2020
@389-ds-bot 389-ds-bot added this to the 389-admin,console 1.1.32 milestone Sep 12, 2020
@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2013-01-31 05:43:21

Stacktrace:
(gdb) bt

0  0x00000036196015de in PL_strncpyz (dest=0x7fff2d349b00 "\200\034`", 
    src=0x400 <Address 0x400 out of bounds>, max=4200865)
    at ../../../mozilla/nsprpub/lib/libc/src/strcpy.c:46
1  0x000000000040155d in main (argc=<value optimized out>, 
    argv=<value optimized out>) at admserv/cgi-src40/restartsrv.c:190

The order of the argument 2 and 3 for PL_strncpyz is not correct:
./cgi-src40/restartsrv.c: PL_strncpyz(line, sizeof(line), "/bin/systemctl restart " PACKAGE_NAME ".service");
./cgi-src40/restartsrv.c: PL_strncpyz(line, sizeof(line), "service " PACKAGE_NAME " restart");

/usr/include/nspr4/plstr.h
PR_EXTERN(char *) PL_strncpyz(char *dest, const char *src, PRUint32 max);

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2013-01-31 06:35:06

git patch file (admin-server master)
0001-Ticket-567-Restart-of-Admin-server-from-console-fail.patch

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2013-01-31 06:42:33

Bug description: The order of the argument 2 and 3 for
PL_strncpyz was not correct.
Definition of PL_strncpyz:
char * PL_strncpyz(char *dest, const char *src, PRUint32 max);

Fix description: This patch exchanges the 2nd and 3rd arguments.

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2013-02-01 03:48:28

Reviewed by Rich (Thank you!!)

Pushed to master: commit f2a8c2e5e03f288c09325669bc6f5973b1d110c4

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2017-02-11 22:59:05

Metadata Update from @nhosoi:

  • Issue assigned to nhosoi
  • Issue set to the milestone: 389-admin,console 1.1.32

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