Projects tigase _server tigase-muc Issues #148
NPE in VCardModule.process/JDBCMucDAO.updateRoomAvatar (#148)
Closed
wojciech.kapcia@tigase.net opened 2 years ago
[2022-06-12 19:47:01:293] [SEVERE  ] [              in_7-muc ] StanzaProcessor.processPacket()  : java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "tigase.muc.RoomWithId.getId()" is null when processing from=sess-man@ip-172-31-38-91.us-west-2.compute.internal, to=null, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq xmlns="jabber:client" id="YGkHb-SA4Sgz" from="…@sure.im/Conversations.mgHg" type="set" to="…@muc.sure.im"><vCard xmlns="vcard-temp"><PHOTO><TYPE>image/jpeg</TYPE><BINVAL>… ... , SIZE=9193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set, STABLE_ID=null
java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "tigase.muc.RoomWithId.getId()" is null
	at tigase.muc.modules.VCardModule.process(VCardModule.java:139)
	at tigase.component.modules.StanzaProcessor.execute(StanzaProcessor.java:214)
	at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:201)
	at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:103)
	at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
	at tigase.muc.MUCComponent.processPacket(MUCComponent.java:122)
	at tigase.muc.cluster.MUCComponentClustered.processPacket(SourceFile:87)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "tigase.muc.RoomWithId.getId()" is null
	at tigase.muc.repository.JDBCMucDAO.updateRoomAvatar(JDBCMucDAO.java:290)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at tigase.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:75)
	at jdk.proxy2/jdk.proxy2.$Proxy53.updateRoomAvatar(Unknown Source)
	at tigase.muc.repository.MucDAOMDBean.updateRoomAvatar(MucDAOMDBean.java:106)
	at tigase.muc.repository.inmemory.InMemoryMucRepository.updateRoomAvatar(InMemoryMucRepository.java:137)
	at tigase.muc.modules.VCardModule.processSet(VCardModule.java:208)
	at tigase.muc.modules.VCardModule.process(VCardModule.java:132)
	... 7 more
wojciech.kapcia@tigase.net commented 2 years ago

This is same (well, very similar) issue to #issue #142 and boils down to the ID being generated by the database and sometimes not populated on time in the application. @andrzej.wojcik we already discussed it in January and the notion was that "JID is long and uses space" hence using bigint here but... we already have both JID and sha1(JID) columns and indexes so I think we could simply use those instead of autoincremented IDs from the database? What do you think?

Andrzej Wójcik (Tigase) commented 2 years ago

In theory, we could, but it would not solve the issue as you have 2 requests (1 to create room and 1 to set vcard) sent by the client 1 by 1 (without waiting for the result). Due to that, there is a race condition on the server side (in the MUC component) as both requests may be (and most likely are) processed at the same time. Now we have NPE/Internal Server Exception, but without this "id" requirement, we would get failure to update entry on the SQL side (as there may be no room config yet, when vcard is being saved).

I think we should "serialized" room creation and vcard (iq-set) processing on the server side to be on the same thread (we should queue it properly).

wojciech.kapcia@tigase.net commented 2 years ago

Shouldn't those already be processed on same thread and thus be queued? Seems like packetHash() problem?

Though, I'm not sure if storing the room in the repository (i.e. db not InMemory one) is triggered on event thus causing the issue (the RoomWithId.setId() is called only after the call finishes)?

Andrzej Wójcik (Tigase) commented 2 years ago

I think this packetHash() may be correct but depending on a clustering version, it may be routed between cluster nodes, and then packets will end up on a different thread.

AFAIR RoomWithId.setId() is called after room is stored to the database, but it needs to be stored in memory to make sure no other concurrent request will happen (if I'm correct).

wojciech.kapcia@tigase.net commented 2 years ago

I think that it's handled differently - direct storing to the repository was disabled (see https://github.com/tigase/tigase-muc/blob/4288f2620647f520c8a33806764a725b5b395e32/src/main/java/tigase/muc/repository/inmemory/InMemoryMucRepository.java#L169-L169 as result of #epicgames-21 ) and it's handled later on: https://github.com/tigase/tigase-muc/blob/4288f2620647f520c8a33806764a725b5b395e32/src/main/java/tigase/muc/modules/PresenceModuleImpl.java#L365-L365 via tigase.muc.RoomConfig#notifyConfigUpdate(boolean) so while it's done is slightly different place (and later on) it's still should be handled by the same thread so it seems more like concurrency issue and packets not being handled by the same thread (i.e. issue with packetHash()?

Andrzej Wójcik (Tigase) commented 2 years ago

Actually, packetHash() looks ok. I'm not sure what is actually happening here, with just part of a log, but I wonder if it was not possible that room creation (in the database) throw an exception that caused id not to be set while the room was left in the memory (in the Map). That could cause an issue like that.

wojciech.kapcia@tigase.net commented 2 years ago

If there was an exception it wasn't logged, though it seems lack of id after storing to the database should even throw exception (see https://github.com/tigase/tigase-muc/blob/4288f2620647f520c8a33806764a725b5b395e32/src/main/java/tigase/muc/repository/JDBCMucDAO.java#L92-L92). Possibly #issue #145 is also relevant here.

Andrzej Wójcik (Tigase) commented 2 years ago

But this would not set the id nor will it remove the room from the cache of rooms and #issue #145 most likely is caused by the same issue.

Andrzej Wójcik (Tigase) commented 2 years ago

Just a wild guess, didn't someone try to use emoji in localpart of the MUC room?

wojciech.kapcia@tigase.net commented 2 years ago

(private comment) Longer log:

[2022-06-12 19:47:04:061] [FINEST  ] [              in_7-muc ] SessionManager.processPacket()   : Packet processed by: [vcard-temp]
[2022-06-12 19:47:04:061] [FINEST  ] [              in_7-muc ] JabberIqPrivacy.allowed()        : Using privacy list: null
[2022-06-12 19:47:04:061] [FINEST  ] [              in_7-muc ] MobileV2.filter()                : packet without destination
[2022-06-12 19:47:04:061] [FINEST  ] [              in_7-muc ] DomainFilter.filter()            : Filtering (packet): from=c2s@ip-172-31-38-91.us-west-2.compute.internal/192.168.96.2_5223_172.31.13.186_49882, to=sess-man@ip-172-31-38-91.us-west-2.compute.internal, serverAuthorisedStanzaFrom=Optional[ferris_dawn@sure.im/Conversations.mgHg], DATA=<iq xmlns="jabber:client" id="5CNpDxtIdPVH" from="ferris_dawn@sure.im/Conversations.mgHg" type="set" to="azovuka@muc.sure.im"><vCard xmlns="vcard-temp"><PHOTO><TYPE>image/jpeg</TYPE><BINVAL>/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAIQAABtbnRyUkdC
IFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAA
AADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlk
ZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAA
AChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAA
AAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAA
AAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3Bh
cmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADT
LW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAw
ADEANv/bAEMACAUGBwYFCAcGBwkICAkMEwwMCwsMGBESDhMcGB0dGxgbGh8jLCUf ... , SIZE=9193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set, STABLE_ID=d4545b4e-e931-4d82-a302-050eb219b7cf
[2022-06-12 19:47:04:061] [FINEST  ] [              in_7-muc ] DomainFilter.getDomains()        : Domains read from user session: ALL for VHost: sure.im
[2022-06-12 19:47:04:061] [FINEST  ] [              in_7-muc ] MessageRouter.processPacket()    : Processing packet: from=sess-man@ip-172-31-38-91.us-west-2.compute.internal, to=null, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq xmlns="jabber:client" id="5CNpDxtIdPVH" from="ferris_dawn@sure.im/Conversations.mgHg" type="set" to="azovuka@muc.sure.im"><vCard xmlns="vcard-temp"><PHOTO><TYPE>image/jpeg</TYPE><BINVAL>/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAIQAABtbnRyUkdC
IFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAA
AADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlk
ZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAA
AChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAA
AAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAA
AAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3Bh
cmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADT
LW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAw
ADEANv/bAEMACAUGBwYFCAcGBwkICAkMEwwMCwsMGBESDhMcGB0dGxgbGh8jLCUf ... , SIZE=9193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set, STABLE_ID=null
[2022-06-12 19:47:04:061] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): Called for : azovuka@muc.sure.im
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): No componentID matches (fast lookup against exact address): azovuka@muc.sure.im, for map: [s2s@ip-172-31-38-91.us-west-2.compute.internal, amp@ip-172-31-38-91.us-west-2.compute.internal, pubsub@ip-172-31-38-91.us-west-2.compute.internal, socks5@ip-172-31-38-91.us-west-2.compute.internal, muc@ip-172-31-38-91.us-west-2.compute.internal, push@ip-172-31-38-91.us-west-2.compute.internal, http@ip-172-31-38-91.us-west-2.compute.internal, vhost-man@ip-172-31-38-91.us-west-2.compute.internal, message-router@ip-172-31-38-91.us-west-2.compute.internal, sess-man@ip-172-31-38-91.us-west-2.compute.internal, c2s@ip-172-31-38-91.us-west-2.compute.internal, ext@ip-172-31-38-91.us-west-2.compute.internal, eventbus@ip-172-31-38-91.us-west-2.compute.internal, cl-comp@ip-172-31-38-91.us-west-2.compute.internal, ext-disco@ip-172-31-38-91.us-west-2.compute.internal, bosh@ip-172-31-38-91.us-west-2.compute.internal, stats@ip-172-31-38-91.us-west-2.compute.internal, ws2s@ip-172-31-38-91.us-west-2.compute.internal, upload@ip-172-31-38-91.us-west-2.compute.internal, monitor@ip-172-31-38-91.us-west-2.compute.internal, cluster-contr@ip-172-31-38-91.us-west-2.compute.internal, message-archive@ip-172-31-38-91.us-west-2.compute.internal, mix@ip-172-31-38-91.us-west-2.compute.internal]; trying VHost lookup
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): No component name matches (VHost lookup against component name): azovuka@muc.sure.im, for map: [ext, vhost-man, upload, amp, c2s, ws2s, monitor, bosh, push, cl-comp, socks5, ext-disco, stats, eventbus, s2s, http, muc, sess-man, message-archive, cluster-contr, mix, message-router, pubsub], for all VHosts: [hosts count: 35]; trying other forms of addressing
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): Component matched: azovuka@muc.sure.im, for comp: [ext, vhost-man, upload, amp, c2s, ws2s, monitor, bosh, push, cl-comp, socks5, ext-disco, stats, eventbus, s2s, http, muc, sess-man, message-archive, cluster-contr, mix, message-router, pubsub], basename: sure.im
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): Called for : azovuka@muc.sure.im
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): No componentID matches (fast lookup against exact address): azovuka@muc.sure.im, for map: [s2s@ip-172-31-38-91.us-west-2.compute.internal, amp@ip-172-31-38-91.us-west-2.compute.internal, pubsub@ip-172-31-38-91.us-west-2.compute.internal, socks5@ip-172-31-38-91.us-west-2.compute.internal, muc@ip-172-31-38-91.us-west-2.compute.internal, push@ip-172-31-38-91.us-west-2.compute.internal, http@ip-172-31-38-91.us-west-2.compute.internal, vhost-man@ip-172-31-38-91.us-west-2.compute.internal, message-router@ip-172-31-38-91.us-west-2.compute.internal, sess-man@ip-172-31-38-91.us-west-2.compute.internal, c2s@ip-172-31-38-91.us-west-2.compute.internal, ext@ip-172-31-38-91.us-west-2.compute.internal, eventbus@ip-172-31-38-91.us-west-2.compute.internal, cl-comp@ip-172-31-38-91.us-west-2.compute.internal, ext-disco@ip-172-31-38-91.us-west-2.compute.internal, bosh@ip-172-31-38-91.us-west-2.compute.internal, stats@ip-172-31-38-91.us-west-2.compute.internal, ws2s@ip-172-31-38-91.us-west-2.compute.internal, upload@ip-172-31-38-91.us-west-2.compute.internal, monitor@ip-172-31-38-91.us-west-2.compute.internal, cluster-contr@ip-172-31-38-91.us-west-2.compute.internal, message-archive@ip-172-31-38-91.us-west-2.compute.internal, mix@ip-172-31-38-91.us-west-2.compute.internal]; trying VHost lookup
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): No component name matches (VHost lookup against component name): azovuka@muc.sure.im, for map: [ext, vhost-man, upload, amp, c2s, ws2s, monitor, bosh, push, cl-comp, socks5, ext-disco, stats, eventbus, s2s, http, muc, sess-man, message-archive, cluster-contr, mix, message-router, pubsub], for all VHosts: [hosts count: 35]; trying other forms of addressing
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.getLocalComponent(): Component matched: azovuka@muc.sure.im, for comp: [ext, vhost-man, upload, amp, c2s, ws2s, monitor, bosh, push, cl-comp, socks5, ext-disco, stats, eventbus, s2s, http, muc, sess-man, message-archive, cluster-contr, mix, message-router, pubsub], basename: sure.im
[2022-06-12 19:47:04:062] [FINEST  ] [              in_7-muc ] MessageRouter.processPacket()    : 1. Packet will be processed by: muc@ip-172-31-38-91.us-west-2.compute.internal, from=sess-man@ip-172-31-38-91.us-west-2.compute.internal, to=null, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq xmlns="jabber:client" id="5CNpDxtIdPVH" from="ferris_dawn@sure.im/Conversations.mgHg" type="set" to="azovuka@muc.sure.im"><vCard xmlns="vcard-temp"><PHOTO><TYPE>image/jpeg</TYPE><BINVAL>/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAIQAABtbnRyUkdC
IFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAA
AADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlk
ZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAA
AChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAA
AAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAA
AAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3Bh
cmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADT
LW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAw
ADEANv/bAEMACAUGBwYFCAcGBwkICAkMEwwMCwsMGBESDhMcGB0dGxgbGh8jLCUf ... , SIZE=9193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set, STABLE_ID=null
[2022-06-12 19:47:04:063] [SEVERE  ] [              in_7-muc ] StanzaProcessor.processPacket()  : java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "tigase.muc.RoomWithId.getId()" is null when processing from=sess-man@ip-172-31-38-91.us-west-2.compute.internal, to=null, serverAuthorisedStanzaFrom=Optional.empty, DATA=<iq xmlns="jabber:client" id="5CNpDxtIdPVH" from="ferris_dawn@sure.im/Conversations.mgHg" type="set" to="azovuka@muc.sure.im"><vCard xmlns="vcard-temp"><PHOTO><TYPE>image/jpeg</TYPE><BINVAL>/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAIQAABtbnRyUkdC
IFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAA
AADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlk
ZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAA
AChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAA
AAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAA
AAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3Bh
cmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADT
LW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAw
ADEANv/bAEMACAUGBwYFCAcGBwkICAkMEwwMCwsMGBESDhMcGB0dGxgbGh8jLCUf ... , SIZE=9193, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=set, STABLE_ID=null
java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "tigase.muc.RoomWithId.getId()" is null
	at tigase.muc.modules.VCardModule.process(VCardModule.java:139)
	at tigase.component.modules.StanzaProcessor.execute(StanzaProcessor.java:214)
	at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:201)
	at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:103)
	at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
	at tigase.muc.MUCComponent.processPacket(MUCComponent.java:122)
	at tigase.muc.cluster.MUCComponentClustered.processPacket(SourceFile:87)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "tigase.muc.RoomWithId.getId()" is null
	at tigase.muc.repository.JDBCMucDAO.updateRoomAvatar(JDBCMucDAO.java:290)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at tigase.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:75)
	at jdk.proxy2/jdk.proxy2.$Proxy53.updateRoomAvatar(Unknown Source)
	at tigase.muc.repository.MucDAOMDBean.updateRoomAvatar(MucDAOMDBean.java:106)
	at tigase.muc.repository.inmemory.InMemoryMucRepository.updateRoomAvatar(InMemoryMucRepository.java:137)
	at tigase.muc.modules.VCardModule.processSet(VCardModule.java:208)
	at tigase.muc.modules.VCardModule.process(VCardModule.java:132)
	... 7 more

Room data from repo:

mysql> select * from tig_muc_rooms where jid = 'azovuka@muc.sure.im' \G
*************************** 1. row ***************************
             room_id: 4466
                 jid: azovuka@muc.sure.im
            jid_sha1: db3c5a8612d1c8b589773cff3ab9d087f79a3506
                name: ?????-???
              config: <x xmlns="jabber:x:data" type="form"><field var="muc#roomconfig_roomname" label="Natural-Language Room Name" type="text-single"><value>?????-???</value></field><field var="muc#roomconfig_roomdesc" label="Short Description of Room" type="text-single"/><field var="muc#roomconfig_persistentroom" label="Make Room Persistent?" type="boolean"><value>1</value></field><field var="muc#roomconfig_publicroom" label="Make Room Publicly Searchable?" type="boolean"><value>0</value></field><field var="muc#roomconfig_moderatedroom" label="Make Room Moderated?" type="boolean"><value>0</value></field><field var="muc#roomconfig_membersonly" label="Make Room Members Only?" type="boolean"><value>1</value></field><field var="muc#roomconfig_allowinvites" label="Allow Occupants to Invite Others?" type="boolean"><value>1</value></field><field var="muc#roomconfig_allowpm" label="Who Can Send Private Messages?" type="list-single"><value>anyone</value><option label="Anyone"><value>anyone</value></option><option label="Anyone with Voice"><value>participants</value></option><option label="Moderators Only"><value>moderators</value></option><option label="Nobody"><value>none</value></option></field><field var="muc#roomconfig_passwordprotectedroom" label="Password Required to Enter?" type="boolean"><value>0</value></field><field var="muc#roomconfig_roomsecret" label="Password" type="text-single"/><field var="muc#roomconfig_whois" label="Who May Discover Real JIDs?" type="list-single"><value>anyone</value><option label="Moderators Only"><value>moderators</value></option><option label="Anyone"><value>anyone</value></option></field><field var="muc#roomconfig_changesubject" label="Allow Occupants to Change Subject?" type="boolean"><value>0</value></field><field var="muc#roomconfig_enablelogging" label="Enable Public Logging?" type="boolean"><value>0</value></field><field var="logging_format" label="Logging format:" type="list-single"><value>html</value><option label="HTML"><value>html</value></option><option label="Plain text"><value>plain</value></option></field><field var="muc#maxhistoryfetch" label="Maximum Number of History Messages Returned by Room" type="text-single"><value>50</value></field><field var="muc#roomconfig_maxusers" label="Maximum Number of Occupants" type="list-single"><option label="10"><value>10</value></option><option label="20"><value>20</value></option><option label="30"><value>30</value></option><option label="50"><value>50</value></option><option label="100"><value>100</value></option><option label="None"><value>none</value></option></field><field var="muc#roomconfig_maxresources" label="Maximum Number of Single Occupant Resources" type="list-single"><option label="5"><value>5</value></option><option label="10"><value>10</value></option><option label="20"><value>20</value></option><option label="30"><value>30</value></option><option label="50"><value>50</value></option><option label="100"><value>100</value></option><option label="None"><value>none</value></option></field><field var="tigase#presence_delivery_logic" label="Presence delivery logic" type="list-single"><value>PREFERE_PRIORITY</value><option label="PREFERE_LAST"><value>PREFERE_LAST</value></option><option label="PREFERE_PRIORITY"><value>PREFERE_PRIORITY</value></option></field><field var="tigase#presence_filtering" label="Enable filtering of presence (broadcasting presence only between selected groups" type="boolean"><value>0</value></field><field var="tigase#presence_filtered_affiliations" label="Affiliations for which presence should be delivered" type="list-multi"><option label="outcast"><value>outcast</value></option><option label="none"><value>none</value></option><option label="member"><value>member</value></option><option label="admin"><value>admin</value></option><option label="owner"><value>owner</value></option></field><field var="tigase#welcome_messages" label="Send welcome messages on room creation" type="boolean"><value>1</value></field></x>
             creator: ferris_dawn@sure.im
       creation_date: 2022-06-12 15:05:05.697000
             subject: NULL
subject_creator_nick: NULL
        subject_date: NULL
              avatar: image/jpeg;/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAIQAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3BhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADTLW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAwADEANv/bAEMABQQEBAQDBQQEBAYFBQYIDQgIBwcIEAsMCQ0TEBQTEhASEhQXHRkUFhwWEhIaIxocHh8hISEUGSQ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cPfxHSSIJ3Kkjk4ED0rtq26yTzPhGZfvNUFivlnzLon007X6222tjQ7u3SqNyrxtTARPXxgEx6A16f2Y+grbK03HajUQ9wftrQFABjguEyoewScCvdIorUr0NMOcZMK7dNRbxnC9jWaNoWlaBp7dhpNk3a27aQkBOSY81HKj6kk1s6KK7UkuxmNtvLCiijpUkBRRRQBRRRQBSnIEU6KAKKKKAZpU6OsUAUuadIUAUUc0UAUUUdKAKKOlOgFRQKdAKnSoNAFFOKDxQCoooFAGKKKIoAoxRTigFRRTigFRmnRQCop0UAviinRQCop0UAvij4p0UAqdFFAGaM0UUAfFHxRRQC+KfxRRQCop0UAvin8UUUAqfxRRQH//Z
         avatar_hash: 919a5c004fc9ad5875218c4d1489c2eb6aae6c17
wojciech.kapcia@tigase.net commented 2 years ago

But this would not set the id nor will it remove the room from the cache of rooms and #issue #145 most likely is caused by the same issue.

I'm aware of that but as I said - there wasn't any other error/exception and it would definitely result in WARNING so there should be notification.

Just a wild guess, didn't someone try to use emoji in localpart of the MUC room?

From the data - it seems not.

Andrzej Wójcik (Tigase) commented 2 years ago

I do not see a way to get RoomWithId with id set to null if the room is stored in the database. It looks like something that should not happen.

Andrzej Wójcik (Tigase) commented 2 years ago

The weird thing is that creation of a RoomWithId with id set to null is possible only by creating a room. Due to that I think that it was possible that we have an exception here https://github.com/tigase/tigase-muc/blob/31b80bd3f6bd93e27224cc391d96a6d992b1cc4f/src/main/java/tigase/muc/repository/inmemory/InMemoryMucRepository.java#L316

This should leave a trace, but it is the only reason I can think of that would lead to allowing the creation of a room (which would cause an instance of a room with id set to null but creation would fail) but at the same time, it would still have an old room in the database.

wojciech.kapcia@tigase.net commented 2 years ago

Another alternative already mentioned before: concurrency / clustering?

Andrzej Wójcik (Tigase) commented 2 years ago

I do not think that it has anything to do with clustering as, according to timestamps, the room was created hours before its avatar is being set. If so, then it was created and id for it was generated and assigned. Moreover, even avatar was already set for it at least once.

Now, after a few hours, in the database, the room is still there but in the memory, we have a room without an avatar and without an id and that can only happen if the room is created (probably created again?).

If the room was in fact created again, then it would require our method to create a room to fail to check if the room already exists and this is only possible if the loading of all rooms would fail.

Another possibility would be that room was created simultaneously on more than one cluster node, but as single XMPP client connection packets are processed on the local cluster node would require 2 different connections to 2 different cluster nodes to create the same room at the same time... (I do no think this is possible..)

wojciech.kapcia@tigase.net commented 2 years ago

OK, so for now we have no idea what happened. From the discussion we had it was agreed to re-work database (#issue #149). Closing for now.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.3.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-muc#148
Please wait...
Page is in error, reload to recover