Bug 1129660

Summary: [WebUI] Adding users to user group throws Internal server error.
Product: Red Hat Enterprise Linux 6 Reporter: Varun Mylaraiah <mvarun>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: jgalipea, lkrispen, mkosek, mvarun, nkinder, nsoman, pvoborni, rcritten, rmeggins, tlavigne
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.11.15-42.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 07:53:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
IPA Error 907
none
Internal Server Error
none
Netgroups :: Ldapi connection issue
none
httpd error_log
none
Stacktrace attached
none
git patch file (389-ds-base-1.2.11) -- backporting just the NULL idl checking in idl_common.c from the commit a71633d56951dd6c4d0368c790b85628f1598968 nkinder: review+

Description Varun Mylaraiah 2014-08-13 12:37:48 UTC
Description of problem:
Adding users to user group throws Internal server error.

Version-Release number of selected component (if applicable):
ipa-server-3.0.0-42

How reproducible:
100%

Steps to Reproduce:
1. Login as admin. 
2. Navigate to User page
3. Add 10 users (say user00, user01,.....user09, user10)
4. Navigate to User Group page
5. Add a group (say group01) then click "Add and Edit"
6. In Users tab click "ADD"

Actual results:
IPA Error 907 :: cannot connect to u'ldapi://%2fvar%2frun%2fslapd-TESTRELM-COM.socket': LDAP Server Down (ScreenShot-1)
Click Retry
Internal Server Error pops up (ScreenShot-2)

Additional info:
when I tried on CLI but I did not see the error.

Comment 1 Varun Mylaraiah 2014-08-13 12:39:19 UTC
Created attachment 926405 [details]
IPA Error 907

Comment 2 Varun Mylaraiah 2014-08-13 12:40:08 UTC
Created attachment 926406 [details]
Internal Server Error

Comment 4 Martin Kosek 2014-08-13 12:50:01 UTC
Please provide httpd error_log so that we can check the real errors.

Comment 5 Varun Mylaraiah 2014-08-13 13:43:03 UTC
Created attachment 926445 [details]
Netgroups :: Ldapi connection issue

Same error found in Netgroups page as well. After adding 10th netgroup "IPA Error 907" pops up (ScreenShot-3).

Comment 6 Varun Mylaraiah 2014-08-13 13:49:02 UTC
Created attachment 926446 [details]
httpd error_log

Comment 7 Martin Kosek 2014-08-15 09:21:12 UTC
Thanks. This looks as intermittent errors, I could not reproduce them on my set up. I suspect that this may also be an Directory Server issue. Is there anything interesting /var/log/dirsrv/.../errors log?

Comment 8 Varun Mylaraiah 2014-08-17 17:52:25 UTC
I did not see anything interesting in /var/log/dirsrv/.../errors log. Also I have reproduced this bug on multiple machines.I have pasted the details of one of my machines in Comment 9 for your reference.
let me know if you need any further information.

Comment 10 Martin Kosek 2014-08-18 15:47:03 UTC
I see DS crashed, this is why it was not responding:

# grep ns-slapd /var/log/messages
Aug 18 01:07:46 server66ad ns-slapd: Failed to rename errors log file, Netscape Portable Runtime error -5950 (File not found.). Exiting...
Aug 18 04:32:54 server66ad kernel: ns-slapd[21240]: segfault at 0 ip 00007ffddd190ab2 sp 00007ffdba3e15c8 error 4 in libback-ldbm.so[7ffddd15d000+9b000]

I see it also was not able to touch it's log files, did you manipulate with them or the directory they are stored in? It may be related to the crash.

Could you please enable the VM to generate the core for DS so that we can report proper bug to 389-ds-base component? See HOWTO below:

http://directory.fedoraproject.org/wiki/FAQ#Debugging_Crashes

Comment 11 Varun Mylaraiah 2014-08-20 10:56:27 UTC
Created attachment 928759 [details]
Stacktrace attached

I have reproduced the crash and attached the stacktrace.

Comment 12 Martin Kosek 2014-08-20 10:58:48 UTC
Cool! Re-assigning to DS team so that they can fix the crash. Once that is fixed, Web UI should run smoothly again.

Comment 13 Varun Mylaraiah 2014-08-20 12:20:11 UTC
Thank you Martin.

Comment 15 Ludwig 2014-08-21 12:45:44 UTC
The search filter is (&(objectClass=posixaccount)(!(memberOf=cn=group1,cn=groups,cn=accounts,dc=testrelm,dc=com)))"

and the crash is in idl_is_allids() called with a NULL list. 

Looks like this was fixed as a side effect of ticket #47313 (bz1044133), which was not backported to 1.2.11

Comment 16 Ludwig 2014-08-21 16:07:38 UTC
The code was introduce to 1.2.11.15-30 by another backport for a VLV fix, but the check in idl_is_allids is missing

Comment 17 Sankar Ramalingam 2014-08-21 17:28:39 UTC
Request Varun to mark qe_test_coverage+ flag if its automated in IPA.

Comment 20 Noriko Hosoi 2014-08-21 20:12:10 UTC
Created attachment 929355 [details]
git patch file (389-ds-base-1.2.11) -- backporting just the NULL idl checking in idl_common.c from the commit a71633d56951dd6c4d0368c790b85628f1598968

Comment 21 Noriko Hosoi 2014-08-21 20:17:50 UTC
Steps:
The search filter:
(&(objectClass=posixaccount)(!(memberOf=cn=group1,cn=groups,cn=accounts,dc=testrelm,dc=com)))

Entries that satisfy "objectClass=posixaccount" need to exist, while
entries that satisfy "memberOf=cn=group1,cn=groups,cn=accounts,dc=testrelm,dc=com" should not exist.

If the search does not crash the server, the fix is verified.

Comment 22 Noriko Hosoi 2014-08-21 23:05:22 UTC
Thanks to Nathan for reviewing the patch.

Pusehd to 389-ds-base-1.2.11:
   4a16332..488fa12  389-ds-base-1.2.11 -> 389-ds-base-1.2.11
   commit 488fa1229f0f0b80cbe43f2e52c2e2b3aaefe188

Comment 24 Varun Mylaraiah 2014-08-22 09:41:03 UTC
I have upgraded my setup to latest 389-ds-base-1.2.11.15-42.el6.
And I tested manually by adding 10 users,100 users and more than 10 netgroups in IPA-WebUI, no crash observed. Hence marking bug as verified.

tested ipa-server version :: ipa-server-3.0.0-42.el6.x86_64

Comment 25 errata-xmlrpc 2014-10-14 07:53:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1385.html