processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.07k stars 1.51k forks source link

Invalid byte sequence for encoding #3947

Closed licaon-kter closed 1 year ago

licaon-kter commented 1 year ago

Environment

error.log

[error] <0.450.0>@ejabberd_sql:check_error/2:1282 SQL query 'Q42726653' at {mod_mam_sql,{193,17}} failed: [{severity,'ERROR'},
                                                         {86,<<"ERROR">>},
                                                         {code,<<"22021">>},
                                                         {message,
                                                          <<"invalid byte sequence for encoding \"UTF8\": 0x00">>},
                                                         {file,
                                                          <<"mbutils.c">>},
                                                         {line,1593},
                                                         {routine,
                                                          <<"report_invalid_encoding">>}]

postgresql log

ERROR:  invalid byte sequence for encoding "UTF8": 0x00
ejabberd@ejabberd STATEMENT:  INSERT INTO archive(username, server_host, timestamp, peer, bare_peer, xml, txt, kind, nick) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9);

afaik, before current commit , on e58920b2c6d1af873df3c85eb91709fe6efe0419 and older I was seeing this regarding this query (not sure if related): [error] <0.479.0>@ejabberd_sql:check_error/2:1290 SQL query 'Q42726653' at {mod_mam_sql,{193,17}} failed: <<"timed out">>

nosnilmot commented 1 year ago

Can you reproduce? if so, please:

  1. get debug log to see what message stanza causes this
  2. check if reverting https://github.com/processone/ejabberd/commit/a1cfae8c981e8e957eb79bfda94cc45ccf35b316 gets rid of the 'invalid byte sequence' error

I don't think the timeout is related, but it might be.

licaon-kter commented 1 year ago

I've updated and saw this in the log after 5 or so hours.

Will keep an eye and report if I see it again, no idea on how to repro.

mremond commented 1 year ago

@licaon-kter Should we close this issue ? Do you still think there could be a problem ?

licaon-kter commented 1 year ago

Will reopen if seen again.