Projects tigase _server tigase-mix Issues #17
Could not parse new configuration of channel: PubSubException: Only participants and information nodes are supported! (#17)
wojciech.kapcia@tigase.net opened 4 years ago
[2020-09-17 18:28:21:891] [WARNING ] [              in_3-mix ] MixRepository.updateChannelConfiguration(): Could not parse new configuration of channel 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im
tigase.pubsub.exceptions.PubSubException: Only participants and information nodes are supported!
	at tigase.mix.model.ChannelConfiguration.applyFrom(ChannelConfiguration.java:315)
	at tigase.mix.model.ChannelConfiguration.[init](ChannelConfiguration.java:86)
	at tigase.mix.model.MixRepository.updateChannelConfiguration(MixRepository.java:315)
	at tigase.mix.cluster.MixRepositoryClustered.updateChannelConfiguration(SourceFile:35)
	at tigase.mix.model.MixRepository.itemWritten(MixRepository.java:253)
	at tigase.mix.cluster.MixRepositoryClustered.itemWritten(SourceFile:27)
	at tigase.pubsub.repository.cached.CachedPubSubRepository.itemWritten(CachedPubSubRepository.java:617)
	at tigase.pubsub.repository.cached.Items.writeItem(Items.java:125)
	at tigase.pubsub.modules.PublishItemModule.doPublishItems(PublishItemModule.java:131)
	at tigase.pubsub.modules.PublishItemModule.publishItems(PublishItemModule.java:412)
	at tigase.pubsub.modules.PublishItemModule.process(PublishItemModule.java:286)
	at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:164)
	at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:85)
	at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
	at tigase.pubsub.PubSubComponent.processPacket(PubSubComponent.java:191)
	at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:183)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1405)

It seems that this is OK - we just don't support it and that's it. Adjust log level to non-WARNING?

I checked the code and I was wondering if in tigase.mix.model.MixRepository#updateChannelConfiguration we shouldn't return error packet to the client?

Andrzej Wójcik (Tigase) commented 4 years ago

We could change to a non-WARNING level. I'm surprised that it was thrown in here as MixRepository::validateItem() should filter out stanzas with invalid configuration.

wojciech.kapcia@tigase.net commented 4 years ago

Log excerpt:

[2020-09-17 19:25:33:085] [FINER   ] [              in_5-mix ] StanzaProcessor.processPacket()  : Received: [iq id="3E7A65FA-7800-4185-B26E-1CF69E3BD049" type="set" to="5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im" from="joshim@sure.im/1738836652-tigase-1935" xmlns="jabber:client"][pubsub xmlns="http://jabber.org/protocol/pubsub"][publish node="urn:xmpp:mix:nodes:config"][item][x type="submit" xmlns="jabber:x:data"][field type="hidden" var="FORM_TYPE"][value]urn:xmpp:mix:admin:0[/value][/field][field type="jid-single" var="Last Change Made By"][value]joshim@sure.im[/value][/field][field type="jid-multi" var="Owner"][required/][value]joshim@sure.im[/value][/field][field type="jid-multi" var="Administrator"/][field type="text-single" var="End of Life"][value/][/field][field type="list-multi" var="Nodes Present"][option][value]participants[/value][/option][option][value]presence[/value][/option][option][value]information[/value][/option][option][value]allowed[/value][/option][option][value]banned[/value][/option][option][value]jidmap-visible[/value][/option][option][value]avatar[/value][/option][required/][value]participants[/value][value]presence[/value][value]information[/value][value]avatar[/value][/field][field type="list-single" var="Messages Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Presence Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Participants Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Information Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Allowed Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="list-single" var="Banned Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="list-single" var="Configuration Node Access"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]owners[/value][/field][field type="list-single" var="Information Node Update Rights"][option][value]participants[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="list-single" var="Avatar Nodes Update Rights"][option][value]participants[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="boolean" var="Open Presence"][value]1[/value][/field][field type="boolean" var="Participants Must Provide Presence"][value]1[/value][/field][field type="boolean" var="User Message Retraction"][value]false[/value][/field][field type="list-single" var="Administrator Message Retraction Rights"][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]nobody[/value][/field][field type="boolean" var="Participation Addition by Invitation from Participant"][value]1[/value][/field][field type="boolean" var="Private Messages"][value]true[/value][/field][field type="boolean" var="Mandatory Nicks"][value]true[/value][/field][/x][/item][/publish][/pubsub][/iq]
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] StanzaProcessor.process()        : Processing packet: from=sess-man@ip-10-0-19-218.us-west-2.compute.internal, to=null, DATA=[iq id="3E7A65FA-7800-4185-B26E-1CF69E3BD049" type="set" to="5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im" from="joshim@sure.im/1738836652-tigase-1935" xmlns="jabber:client"][pubsub xmlns="http://jabber.org/protocol/pubsub"][publish node="urn:xmpp:mix:nodes:config"][item][x type="submit" xmlns="jabber:x:data"][field type="hidden" var="FORM_TYPE"][value]CData size: 20[/value][/field][field type="jid-single" var="Last Change Made By"][value]CData size: 14[/value][/field][field type="jid-multi" var="Owner"][required/][value]CData size: 14[/value][/field][field type="jid-multi" var="Administrator"/][field type="text-single" var="End of Life"][value/][/field][field type="list-multi" var="Nodes Present"][option][value]CData size: 12[/value][/option][option][value]CData size: 8[/value][/option][option][value]CData size: 11[/value][/option][option][value]CData size: 7[/value][/option][option][value]CData size: 6[/value][/option][option][value]CData size: 14[/value][/option][option][value]CData size: 6[/value][/op ... , SIZE=4215, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set, STABLE_ID=null
        [2020-09-17 19:25:33:085] [FINER   ] [              in_5-mix ] StanzaProcessor.process()        : Handled by module class tigase.pubsub.modules.PublishItemModule
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepositoryClustered.getNodeConfig(): Getting node config wrapNodeConfig, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepositoryClustered.getNode(): Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], isLocalNode(): true
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepository.getNode() : Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], node: Node{creationTime=Thu Sep 17 18:18:43 UTC 2020, deleted=false, name=urn:xmpp:mix:nodes:config, nodeId=6757, nodeAffiliations=tigase.mix.Affiliations@3c42e5c5, nodeSubscriptions=NodeSubscriptions: {}, serviceJid=5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, creator=joshim@sure.im}
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepository.getNodeConfig(): Getting node config, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, node: Node{creationTime=Thu Sep 17 18:18:43 UTC 2020, deleted=false, name=urn:xmpp:mix:nodes:config, nodeId=6757, nodeAffiliations=tigase.mix.Affiliations@3c42e5c5, nodeSubscriptions=NodeSubscriptions: {}, serviceJid=5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, creator=joshim@sure.im}
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] ClusteredNodeStrategy.wrapNodeConfig(): Not wrapping nodeConfig, filterResponse: null
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepositoryClustered.getNode(): Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], isLocalNode(): true
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepository.getNode() : Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], node: Node{creationTime=Thu Sep 17 18:18:43 UTC 2020, deleted=false, name=urn:xmpp:mix:nodes:config, nodeId=6757, nodeAffiliations=tigase.mix.Affiliations@3c42e5c5, nodeSubscriptions=NodeSubscriptions: {}, serviceJid=5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, creator=joshim@sure.im}
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepositoryClustered.getNodeConfig(): Getting node config wrapNodeConfig, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepositoryClustered.getNode(): Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], isLocalNode(): true
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepository.getNode() : Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], node: Node{creationTime=Thu Sep 17 18:18:43 UTC 2020, deleted=false, name=urn:xmpp:mix:nodes:config, nodeId=6757, nodeAffiliations=tigase.mix.Affiliations@3c42e5c5, nodeSubscriptions=NodeSubscriptions: {}, serviceJid=5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, creator=joshim@sure.im}
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepository.getNodeConfig(): Getting node config, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, node: Node{creationTime=Thu Sep 17 18:18:43 UTC 2020, deleted=false, name=urn:xmpp:mix:nodes:config, nodeId=6757, nodeAffiliations=tigase.mix.Affiliations@3c42e5c5, nodeSubscriptions=NodeSubscriptions: {}, serviceJid=5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, creator=joshim@sure.im}
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] ClusteredNodeStrategy.wrapNodeConfig(): Not wrapping nodeConfig, filterResponse: null
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepositoryClustered.getNode(): Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], isLocalNode(): true
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] CachedPubSubRepository.getNode() : Getting node, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeName: urn:xmpp:mix:nodes:config, key: NodeKey[serviceJid = 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, node = urn:xmpp:mix:nodes:config], node: Node{creationTime=Thu Sep 17 18:18:43 UTC 2020, deleted=false, name=urn:xmpp:mix:nodes:config, nodeId=6757, nodeAffiliations=tigase.mix.Affiliations@3c42e5c5, nodeSubscriptions=NodeSubscriptions: {}, serviceJid=5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, creator=joshim@sure.im}
        [2020-09-17 19:25:33:085] [FINEST  ] [              in_5-mix ] Items.writeItem()                : writeItem, serviceJid: 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im, nodeId: 6,757, dao: tigase.pubsub.repository.PubSubDAOPool@5d50e7f6, id: 2020-09-17T19:25:33Z, publisher: joshim@sure.im/1738836652-tigase-1935, item: [item id="2020-09-17T19:25:33Z"][x type="submit" xmlns="jabber:x:data"][field type="hidden" var="FORM_TYPE"][value]urn:xmpp:mix:admin:0[/value][/field][field type="jid-single" var="Last Change Made By"][value]joshim@sure.im[/value][/field][field type="jid-multi" var="Owner"][required/][value]joshim@sure.im[/value][/field][field type="jid-multi" var="Administrator"/][field type="text-single" var="End of Life"][value/][/field][field type="list-multi" var="Nodes Present"][option][value]participants[/value][/option][option][value]presence[/value][/option][option][value]information[/value][/option][option][value]allowed[/value][/option][option][value]banned[/value][/option][option][value]jidmap-visible[/value][/option][option][value]avatar[/value][/option][required/][value]participants[/value][value]presence[/value][value]information[/value][value]avatar[/value][/field][field type="list-single" var="Messages Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Presence Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Participants Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Information Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]anyone[/value][/option][required/][value]participants[/value][/field][field type="list-single" var="Allowed Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="list-single" var="Banned Node Subscription"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="list-single" var="Configuration Node Access"][option][value]participants[/value][/option][option][value]allowed[/value][/option][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]owners[/value][/field][field type="list-single" var="Information Node Update Rights"][option][value]participants[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="list-single" var="Avatar Nodes Update Rights"][option][value]participants[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]admins[/value][/field][field type="boolean" var="Open Presence"][value]1[/value][/field][field type="boolean" var="Participants Must Provide Presence"][value]1[/value][/field][field type="boolean" var="User Message Retraction"][value]false[/value][/field][field type="list-single" var="Administrator Message Retraction Rights"][option][value]nobody[/value][/option][option][value]admins[/value][/option][option][value]owners[/value][/option][required/][value]nobody[/value][/field][field type="boolean" var="Participation Addition by Invitation from Participant"][value]1[/value][/field][field type="boolean" var="Private Messages"][value]true[/value][/field][field type="boolean" var="Mandatory Nicks"][value]true[/value][/field][/x][/item]
        [2020-09-17 19:25:33:084] [FINEST  ] [              in_5-mix ] DomainFilter.filter()            : Filtering (packet): from=c2s@ip-10-0-19-218.us-west-2.compute.internal/10.0.19.218_5222_2.30.102.119_49193, to=sess-man@ip-10-0-19-218.us-west-2.compute.internal, DATA=[iq id="3E7A65FA-7800-4185-B26E-1CF69E3BD049" type="set" to="5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im" from="joshim@sure.im/1738836652-tigase-1935" xmlns="jabber:client"][pubsub xmlns="http://jabber.org/protocol/pubsub"][publish node="urn:xmpp:mix:nodes:config"][item][x type="submit" xmlns="jabber:x:data"][field type="hidden" var="FORM_TYPE"][value]CData size: 20[/value][/field][field type="jid-single" var="Last Change Made By"][value]CData size: 14[/value][/field][field type="jid-multi" var="Owner"][required/][value]CData size: 14[/value][/field][field type="jid-multi" var="Administrator"/][field type="text-single" var="End of Life"][value/][/field][field type="list-multi" var="Nodes Present"][option][value]CData size: 12[/value][/option][option][value]CData size: 8[/value][/option][option][value]CData size: 11[/value][/option][option][value]CData size: 7[/value][/option][option][value]CData size: 6[/value][/option][option][value]CData size: 14[/value][/option][option][value]CData size: 6[/value][/op ... , SIZE=4215, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set, STABLE_ID=dbd4d17b-2567-4099-b258-fbf6ab9ca2c4
        [2020-09-17 19:25:33:086] [FINEST  ] [              in_5-mix ] SessionManager.processPacket()   : Packet processed by: [pep]
        [2020-09-17 19:25:33:091] [WARNING ] [              in_5-mix ] MixRepository.updateChannelConfiguration(): Could not parse new configuration of channel 5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im
        tigase.pubsub.exceptions.PubSubException: Only participants and information nodes are supported!
        at tigase.mix.model.ChannelConfiguration.applyFrom(ChannelConfiguration.java:315)
        at tigase.mix.model.ChannelConfiguration.[init](ChannelConfiguration.java:86)
        at tigase.mix.model.MixRepository.updateChannelConfiguration(MixRepository.java:315)
        at tigase.mix.cluster.MixRepositoryClustered.updateChannelConfiguration(SourceFile:35)
        at tigase.mix.model.MixRepository.itemWritten(MixRepository.java:253)
        at tigase.mix.cluster.MixRepositoryClustered.itemWritten(SourceFile:27)
        at tigase.pubsub.repository.cached.CachedPubSubRepository.itemWritten(CachedPubSubRepository.java:617)
        at tigase.pubsub.repository.cached.Items.writeItem(Items.java:125)
        at tigase.pubsub.modules.PublishItemModule.doPublishItems(PublishItemModule.java:131)
        at tigase.pubsub.modules.PublishItemModule.publishItems(PublishItemModule.java:412)
        at tigase.pubsub.modules.PublishItemModule.process(PublishItemModule.java:286)
        at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:164)
        at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:85)
        at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
        at tigase.pubsub.PubSubComponent.processPacket(PubSubComponent.java:191)
        at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:183)
        at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1405)

payload:

<iq id="3E7A65FA-7800-4185-B26E-1CF69E3BD049" type="set" to="5134f24b-588b-457e-864a-d2e6af00cd8b@mix.sure.im"
    from="joshim@sure.im/1738836652-tigase-1935" xmlns="jabber:client">
    <pubsub xmlns="http://jabber.org/protocol/pubsub">
        <publish node="urn:xmpp:mix:nodes:config">
            <item>
                <x type="submit" xmlns="jabber:x:data">
                    <field type="hidden" var="FORM_TYPE">
                        <value>urn:xmpp:mix:admin:0</value>
                    </field>
                    <field type="jid-single" var="Last Change Made By">
                        <value>joshim@sure.im</value>
                    </field>
                    <field type="jid-multi" var="Owner">
                        <required/>
                        <value>joshim@sure.im</value>
                    </field>
                    <field type="jid-multi" var="Administrator"/>
                    <field type="text-single" var="End of Life">
                        <value/>
                    </field>
                    <field type="list-multi" var="Nodes Present">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>presence</value>
                        </option>
                        <option>
                            <value>information</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>banned</value>
                        </option>
                        <option>
                            <value>jidmap-visible</value>
                        </option>
                        <option>
                            <value>avatar</value>
                        </option>
                        <required/>
                        <value>participants</value>
                        <value>presence</value>
                        <value>information</value>
                        <value>avatar</value>
                    </field>
                    <field type="list-single" var="Messages Node Subscription">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>anyone</value>
                        </option>
                        <required/>
                        <value>participants</value>
                    </field>
                    <field type="list-single" var="Presence Node Subscription">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>anyone</value>
                        </option>
                        <required/>
                        <value>participants</value>
                    </field>
                    <field type="list-single" var="Participants Node Subscription">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>anyone</value>
                        </option>
                        <option>
                            <value>nobody</value>
                        </option>
                        <option>
                            <value>admins</value>
                        </option>
                        <option>
                            <value>owners</value>
                        </option>
                        <required/>
                        <value>participants</value>
                    </field>
                    <field type="list-single" var="Information Node Subscription">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>anyone</value>
                        </option>
                        <required/>
                        <value>participants</value>
                    </field>
                    <field type="list-single" var="Allowed Node Subscription">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>nobody</value>
                        </option>
                        <option>
                            <value>admins</value>
                        </option>
                        <option>
                            <value>owners</value>
                        </option>
                        <required/>
                        <value>admins</value>
                    </field>
                    <field type="list-single" var="Banned Node Subscription">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>nobody</value>
                        </option>
                        <option>
                            <value>admins</value>
                        </option>
                        <option>
                            <value>owners</value>
                        </option>
                        <required/>
                        <value>admins</value>
                    </field>
                    <field type="list-single" var="Configuration Node Access">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>allowed</value>
                        </option>
                        <option>
                            <value>nobody</value>
                        </option>
                        <option>
                            <value>admins</value>
                        </option>
                        <option>
                            <value>owners</value>
                        </option>
                        <required/>
                        <value>owners</value>
                    </field>
                    <field type="list-single" var="Information Node Update Rights">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>admins</value>
                        </option>
                        <option>
                            <value>owners</value>
                        </option>
                        <required/>
                        <value>admins</value>
                    </field>
                    <field type="list-single" var="Avatar Nodes Update Rights">
                        <option>
                            <value>participants</value>
                        </option>
                        <option>
                            <value>admins</value>
                        </option>
                        <option>
                            <value>owners</value>
                        </option>
                        <required/>
                        <value>admins</value>
                    </field>
                    <field type="boolean" var="Open Presence">
                        <value>1</value>
                    </field>
                    <field type="boolean" var="Participants Must Provide Presence">
                        <value>1</value>
                    </field>
                    <field type="boolean" var="User Message Retraction">
                        <value>false</value>
                    </field>
                    <field type="list-single" var="Administrator Message Retraction Rights">
                        <option>
                            <value>nobody</value>
                        </option>
                        <option>
                            <value>admins</value>
                        </option>
                        <option>
                            <value>owners</value>
                        </option>
                        <required/>
                        <value>nobody</value>
                    </field>
                    <field type="boolean" var="Participation Addition by Invitation from Participant">
                        <value>1</value>
                    </field>
                    <field type="boolean" var="Private Messages">
                        <value>true</value>
                    </field>
                    <field type="boolean" var="Mandatory Nicks">
                        <value>true</value>
                    </field>
                </x>
            </item>
        </publish>
    </pubsub>
</iq>
Andrzej Wójcik (Tigase) commented 4 years ago

After investigation it occurred that code was running OK until JIT (Just In Time) compiler kicked in. For some reason it decided that calling constructor which may throw exceptions is not important as returned value was not used. I do not know why it ignored that exceptions were not caught and could change how code will behave.

I've modified code, to ensure that returned value is used and to return value from that method based on created item, to make sure that JIT will not try to optimize that anymore.

I stil think that this issue was caused by JIT error as it altered flow of the program which it should not.

Andrzej Wójcik (Tigase) commented 4 years ago

I've fixed the database (removed invalid channel) and updated installation. I think that this should be solved now.

wojciech.kapcia@tigase.net commented 4 years ago

Just a small, sidenode comment:

After investigation it occurred that code was running OK until JIT (Just In Time) compiler kicked in. For some reason it decided that calling constructor which may throw exceptions is not important as returned value was not used. I do not know why it ignored that exceptions were not caught and could change how code will behave. I stil think that this issue was caused by JIT error as it altered flow of the program which it should not.

While it was a bit surprising behaviour, I don't think it's that unexpected or wrong - JIT in itself may remove "dead code", ie parts of code that doesn't yield result / case any side effects. That particular block of code wasn't returning nor modifying anything hence "doing nothing" - even you yourself added pre-emptively comment: "// this line is required as it validates it configuration is correct!" to avoid it's erroneous removal. I think that the problem boiled down to "controlling by exceptions", and because exceptions are for "exceptional situations" and not executing particular piece of could would/should not yield any exceptional results hence removal by JIT.

Now, I previously suggested (if you deem it as bug) submit it as such to openjdk bugtrack, but considering above I wouldn't consider it as bug per se. I did a small research to see if there are some linterns/validators/etc but there is nothing that would explicitly warning in this case (PMD was the main candidate). What Idea already signals ("unused variable") seems like the closest thing.

Bottomline, we'd have to be conscious about cases like that.

Andrzej Wójcik (Tigase) commented 4 years ago

I think this is now working properly. Let's wait for a while to confirm that.

wojciech.kapcia@tigase.net commented 4 years ago

Seems to be working fine.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Spent time
5h 45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-mix#17
Please wait...
Page is in error, reload to recover