#567 Restart of Admin server from console fails on segfault
Closed: Fixed None Opened 7 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


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

3 years ago

Login to comment on this ticket.