#567 Restart of Admin server from console fails on segfault
Closed: wontfix None Opened 11 years ago by nhosoi.

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).

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);

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.

Reviewed by Rich (Thank you!!)

Pushed to master: commit f2a8c2e5e03f288c09325669bc6f5973b1d110c4

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 389-admin,console 1.1.32

7 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/567

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)

3 years ago

Login to comment on this ticket.

Metadata