Bug 810258 - Arithmetic exception in slapi-nis
Summary: Arithmetic exception in slapi-nis
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: slapi-nis
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-05 13:27 UTC by Rob Crittenden
Modified: 2012-04-22 03:42 UTC (History)
2 users (show)

Fixed In Version: slapi-nis-0.41-1.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-18 22:54:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rob Crittenden 2012-04-05 13:27:56 UTC
Description of problem:

Trying to tweak an NIS mapping rule and I ended up with a non-startable 389-ds instance. gdb reports the error as an arithmetic exception, I also saw it reported as a floating point exception.

Version-Release number of selected component (if applicable):

389-ds-base-1.2.10.4-2
slapi-nis-0.40-1

The backtrace is:

#0  0x00007ffff14a3c08 in format_link (state=0x7f3010, pb=0xc, e=0x0, 
    group=0x99df00 "\300}\232", set=0x8 <Address 0x8 out of bounds>, 
    args=<optimized out>, disallowed=0x0, outbuf=0x9a4ba1 "I\231c8", 
    outbuf_len=4095, outbuf_choices=0x7ffffffebd50, rel_attrs=0x971ed8, 
    ref_attrs=0x971ef0, inref_attrs=0x971ef8, ref_attr_list=0x971f00, 
    inref_attr_list=0x971f08) at format.c:2981
#1  0x00007ffff14a0523 in format_expand (state=0x7f3010, pb=0x99edd0, 
    e=0x99d090, group=0x99f970 "greyoak.com", set=0x971850 "netgroup", 
    fmt=<optimized out>, disallowed=0x0, outbuf=0x9a4ba0 "(I\231c8", 
    outbuf_len=4096, outbuf_choices=0x7ffffffebd50, rel_attrs=0x971ed8, 
    ref_attrs=0x971ef0, inref_attrs=0x971ef8, ref_attr_list=0x971f00, 
    inref_attr_list=0x971f08) at format.c:3959
#2  0x00007ffff14a1703 in format_format (state=0x7f3010, parent_pb=0x9a19f0, 
    e=0x99d090, group=0x99f970 "greyoak.com", set=0x971850 "netgroup", 
    fmt=0x9a477b "(%link(\"%ifeq(\\\"hostCategory\\\",\\\"all\\\",\\\"\\\",\\\"%collect(\\\\\\\"%{externalHost}\\\\\\\",\\\\\\\"%deref(\\\\\\\\\\\\\\\"memberHost\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"fqdn\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"%deref_r(\\\\\\\\\\\\\\\"member\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"fqdn\\\\\\\\\\\\\\\")"..., disallowed=0x0, choices=0x7ffffffebd50, rel_attrs=0x971ed8, 
    ref_attrs=0x971ef0, inref_attrs=0x971ef8, ref_attr_list=0x971f00, 
    inref_attr_list=0x971f08, data_length=0x7ffffffebd5c) at format.c:4048
#3  0x00007ffff14a2f13 in format_get_data_set (state=0x7f3010, 
    pb=<optimized out>, e=<optimized out>, group=<optimized out>, 
    set=<optimized out>, fmt=<optimized out>, disallowed=0x0, 
    rel_attrs=0x971ed8, ref_attrs=0x971ef0, inref_attrs=0x971ef8, 
    ref_attr_list=0x971f00, inref_attr_list=0x971f08, 
    data_lengths=0x7ffffffebe48) at format.c:4157
#4  0x00007ffff14a56e5 in format_merge (state=0x7f3010, pb=0x9a19f0, 
    e=0x99d090, group=0x99f970 "greyoak.com", set=0x971850 "netgroup", 
    args=<optimized out>, disallowed=0x0, outbuf=0x9a09e0 "hH\231c8", 
    outbuf_len=4096, outbuf_choices=0x0, rel_attrs=0x971ed8, 
    ref_attrs=0x971ef0, inref_attrs=0x971ef8, ref_attr_list=0x971f00, 
    inref_attr_list=0x971f08) at format.c:2022
#5  0x00007ffff14a0523 in format_expand (state=0x7f3010, pb=0x9a19f0, 
    e=0x99d090, group=0x99f970 "greyoak.com", set=0x971850 "netgroup", 
    fmt=<optimized out>, disallowed=0x0, outbuf=0x9a09e0 "hH\231c8", 
    outbuf_len=4096, outbuf_choices=0x0, rel_attrs=0x971ed8, 
    ref_attrs=0x971ef0, inref_attrs=0x971ef8, ref_attr_list=0x971f00, 
    inref_attr_list=0x971f08) at format.c:3959
#6  0x00007ffff14a1703 in format_format (state=0x7f3010, parent_pb=0x971ac0, 
    e=0x99d090, group=0x99f970 "greyoak.com", set=0x971850 "netgroup", 
    fmt=0x991e70 "%merge(\" \",\"%deref_f(\\\"member\\\",\\\"(objectclass=ipanisNetgroup)\\\",\\\"cn\\\")\",\"(%link(\\\"%ifeq(\\\\\\\"hostCategory\\\\\\\",\\\\\\\"all\\\\\\\",\\\\\\\"\\\\\\\",\\\\\\\"%collect(\\\\\\\\\\\\\\\"%{externalHost}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"%deref(\\\\\\\\\\\\\\\\"..., disallowed=0x0, 
    choices=0x0, rel_attrs=0x971ed8, ref_attrs=0x971ef0, inref_attrs=0x971ef8, 
    ref_attr_list=0x971f00, inref_attr_list=0x971f08, data_length=0x9a1c90)
    at format.c:4048
#7  0x00007ffff14a2e2c in format_get_data (state=<optimized out>, 
    pb=<optimized out>, e=<optimized out>, group=<optimized out>, 
    set=<optimized out>, fmt=<optimized out>, disallowed=0x0, 
    rel_attrs=0x971ed8, ref_attrs=0x971ef0, inref_attrs=0x971ef8, 
    ref_attr_list=0x971f00, inref_attr_list=0x971f08, data_length=0x9a1c90)
    at format.c:4119
#8  0x00007ffff14973da in backend_gather_data (state=0x7f3010, pb=0x971ac0, 
    e=0x99d090, domain=0x99f970 "greyoak.com", map=0x971850 "netgroup", 
    single_formats=0x991e60, group_formats=0x0, disallowed_chars=0x0, 
    rel_attrs=0x971ed8, ref_attrs=0x971ef0, inref_attrs=0x971ef8, 
    ref_attr_list=0x971f00, inref_attr_list=0x971f08, 
    ret_lengths=0x7ffffffec2d8, ret_n_singles=0x7ffffffec2f8, 
    ret_singles=0x7ffffffec2c0, ret_n_groups=0x7ffffffec2fc, 
    ret_groups=0x7ffffffec2c8, ret_group_lengths=0x7ffffffec2e8)
    at back-nis.c:255
#9  0x00007ffff1497af1 in backend_set_entry (pb=0x971ac0, e=0x99d090, 
    data=0x971eb0) at back-nis.c:375
#10 0x00007ffff149ab26 in backend_shr_set_entry (set_data=<optimized out>, 
    e=<optimized out>, pb=<optimized out>) at back-shr.c:273
#11 backend_shr_set_entry_cb (e=<optimized out>, callback_data=<optimized out>)
    at back-shr.c:284
#12 0x0000003a7f89cb40 in send_ldap_search_entry_ext (pb=0x971ac0, e=0x99d090, 
    ectrls=0x0, attrs=0x0, attrsonly=0, send_result=0, nentries=0, urls=0x0)
    at ldap/servers/slapd/result.c:1255
#13 0x0000003a7f89d76c in send_ldap_search_entry (pb=<optimized out>, 
    e=<optimized out>, ectrls=<optimized out>, attrs=<optimized out>, 
    attrsonly=<optimized out>) at ldap/servers/slapd/result.c:814
#14 0x0000003a7f881937 in iterate (pb=0x971ac0, be=0x823490, 
    pnentries=0x7fffffff0548, pagesize=-1, pr_statp=0x7fffffff0554, 
    send_result=1) at ldap/servers/slapd/opshared.c:1346
#15 0x0000003a7f881d97 in send_results_ext (pb=0x971ac0, 
    nentries=0x7fffffff0548, pagesize=-1, pr_stat=0x7fffffff0554, 
    send_result=1) at ldap/servers/slapd/opshared.c:1584
#16 0x0000003a7f882fa9 in op_shared_search (pb=0x971ac0, send_result=1)
    at ldap/servers/slapd/opshared.c:764
#17 0x0000003a7f88e505 in search_internal_callback_pb (pb=0x971ac0, 
    callback_data=0x7fffffff4a80, prc=0, 
    psec=0x7ffff149ab10 <backend_shr_set_entry_cb>, prec=0)
    at ldap/servers/slapd/plugin_internal_op.c:798
#18 0x00007ffff149c487 in backend_shr_set_config_entry_add (state=0x7f3010, 
    parent_pb=0x998530, e=<optimized out>, group=<optimized out>, 
    set=<optimized out>) at back-shr.c:430
#19 0x00007ffff1498694 in backend_set_config_entry_add_cb (e=0x8cced0, 
    callback_data=0x7fffffffd260) at back-nis.c:732
#20 0x0000003a7f89cb40 in send_ldap_search_entry_ext (pb=0x998530, e=0x8cced0, 
    ectrls=0x0, attrs=0x0, attrsonly=0, send_result=0, nentries=0, urls=0x0)
    at ldap/servers/slapd/result.c:1255
#21 0x0000003a7f89d76c in send_ldap_search_entry (pb=<optimized out>, 
    e=<optimized out>, ectrls=<optimized out>, attrs=<optimized out>, 
    attrsonly=<optimized out>) at ldap/servers/slapd/result.c:814
#22 0x0000003a7f881937 in iterate (pb=0x998530, be=0x76ca50, 
    pnentries=0x7fffffff8d28, pagesize=-1, pr_statp=0x7fffffff8d34, 
    send_result=1) at ldap/servers/slapd/opshared.c:1346
#23 0x0000003a7f881d97 in send_results_ext (pb=0x998530, 
    nentries=0x7fffffff8d28, pagesize=-1, pr_stat=0x7fffffff8d34, 
    send_result=1) at ldap/servers/slapd/opshared.c:1584
#24 0x0000003a7f882fa9 in op_shared_search (pb=0x998530, send_result=1)
    at ldap/servers/slapd/opshared.c:764
#25 0x0000003a7f88e505 in search_internal_callback_pb (pb=0x998530, 
    callback_data=0x7fffffffd260, prc=0, 
    psec=0x7ffff1498610 <backend_set_config_entry_add_cb>, prec=0)
    at ldap/servers/slapd/plugin_internal_op.c:798
#26 0x00007ffff149c8a7 in backend_shr_startup (state=0x7f3010, 
    parent_pb=<optimized out>, 
    filter=0x7ffff14ac560 "(&(objectClass=*)(nis-base=*)(nis-domain=*)(nis-map=*))") at back-shr.c:592
#27 0x00007ffff14aa2a0 in plugin_startup (pb=0x8e0a50) at plug-nis.c:91
#28 0x0000003a7f88a589 in plugin_call_func (list=0x7f3430, operation=212, 
    pb=0x8e0a50, call_one=1) at ldap/servers/slapd/plugin.c:1450
#29 0x0000003a7f88b276 in plugin_call_one (pb=<optimized out>, operation=212, 
    list=<optimized out>) at ldap/servers/slapd/plugin.c:1418
#30 plugin_dependency_startall (argc=3, argv=0x7fffffffe5a8, 
    errmsg=<optimized out>, operation=212) at ldap/servers/slapd/plugin.c:1207
#31 0x000000000040eb4a in main (argc=3, argv=0x7fffffffe5a8)
    at ldap/servers/slapd/main.c:1154

The rule that reproduces this is:

%merge(" ","%deref_f(\"member\",\"(objectclass=ipanisNetgroup)\",\"cn\")","(%link(\"%ifeq(\\\"hostCategory\\\",\\\"all\\\",\\\"\\\",\\\"%collect(\\\\\\\"%{externalHost}\\\\\\\",\\\\\\\"%deref(\\\\\\\\\\\\\\\"memberHost\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"fqdn\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"%deref_r(\\\\\\\\\\\\\\\"member\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"fqdn\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"%deref_r(\\\\\\\\\\\\\\\"memberHost\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"member\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"fqdn\\\\\\\\\\\\\\\")\\\\\\\")\\\")\",\"%ifeq(\\\"hostCategory\\\",\\\"all\\\",\\\"\\\"\\,\"-\\\")\",\",\",\"%ifeq(\\\"userCategory\\\",\\\"all\\\",\\\"\\\",\\\"%collect(\\\\\\\"%deref(\\\\\\\\\\\\\\\"memberUser\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"uid\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"%deref_r(\\\\\\\\\\\\\\\"member\\\\\\
\\\\\\\\\",\\\\\\\\\\\\\\\"uid\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"%deref_r(\\\\\\\\\\\\\\\"memberUser\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"member\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"uid\\\\\\\\\\\\\\\")\\\\\\\")\\\")\",\"%ifeq(\\\"userCategory\\\",\\\"all\",\\\"\\\",\\\"-\\\")\"),%{nisDomainName:-})")

Comment 1 Rob Crittenden 2012-04-05 13:31:26 UTC
It looks like I have a syntax error in this part:

%ifeq(\\\"hostCategory\\\",\\\"all\\\",\\\"\\\"\\,\"-\\\")

I goofed on the escapes. Probably shouldn't crash though.

Comment 2 Rob Crittenden 2012-04-05 13:59:02 UTC
I managed to goof twice in this. In the last ifeq for userCategory there are two missing escapes for the quote after all.

Once I fixed these two problems slapi-nis is working as expected.

Comment 3 Fedora Update System 2012-04-10 21:32:08 UTC
slapi-nis-0.41-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/slapi-nis-0.41-1.fc16

Comment 4 Fedora Update System 2012-04-10 21:32:23 UTC
slapi-nis-0.41-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/slapi-nis-0.41-1.fc17

Comment 5 Fedora Update System 2012-04-10 21:32:54 UTC
slapi-nis-0.41-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/slapi-nis-0.41-1.fc15

Comment 6 Fedora Update System 2012-04-12 01:07:52 UTC
Package slapi-nis-0.41-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing slapi-nis-0.41-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-5684/slapi-nis-0.41-1.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-04-18 22:54:08 UTC
slapi-nis-0.41-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2012-04-22 03:29:34 UTC
slapi-nis-0.41-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2012-04-22 03:42:20 UTC
slapi-nis-0.41-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.