Incorrect SMS reassembly including stale fragments

REPRODUCIBILITY: once a week or so, not predictable, no clear STR.
OS VERSION: currently, but I’ve seen this problem for many years.
HARDWARE: currently Xperia 10 III, previously observed at least on Xperia XA2 and Xperia X.


Sometimes it happens that the SMS I receive in the Messages app looks broken: the beginning obviously belongs to one SMS while the end belongs to a different one. I’ve observed this with SMS from different senders (although the beginning and the end seem to always belong to the same sender).

As an additional data point, my /var/lib/ofono/<number>/sms_assembly directory contains 185 files in 183 directories named like 0123ABCD-123-3/002, the oldest of which are from December 2022 (which is not long after I installed Sailfish on this phone). As these files seem to contain text fragments looking like SMS text, my best guess would be that stale fragments from SMS never received completely are stored indefinitely. When SMS identifiers, whatever these are, are reused the phone sometimes reassembles the message incorrectly by reusing a stale fragment with the same identifier in place of a fragment received now (and possibly leaving that fragment to confuse reassembly after the next sms id reuse?).


The phone needs a SIM card and some sender needs to send a lot of SMS to it. The behavior seems to be dependent on the amount of use since installation - I’ve seen this on multiple phones and in all cases the problem only became noticeable after a significant amount of use.


No clear STR, see description. I assume reproducing the problem requires receiving many SMS from the same contact, poor network signal and/or some specific sender configuration.


Whole message correctly displayed if possible. Otherwise (if some parts have been lost) I’d prefer either displaying the available part of the message clearly marked as “partial message” or not displaying it at all.


Parts of received messages are replaced with some stale fragments, which can be at least as bad as not receiving it at all.


Storeman, Chum, a few minor native apps, but nothing significant.


(not sure what kind of additional information would be needed here)


unfortunatelly this is a very old bug, which never got fixes. It dates back to Jolla Phone and happend on all four sailfish phones I owned. It was reported many timew, even on together.jolla, e.g. Bug received sms mixed together.
It may fix itself by retirement of SMS :wink:

1 Like

I’d guess that it could be mostly fixed (or at least reduced in normal use) by just cleaning up fragments after a week or so assuming that the remaining parts of this sms have already expired on the network side and thus it won’t ever be completed.

I just checked and I have a lot of directories (named as you describe) with timestamps going back to last December, and always exactly one binary-looking file in it (strings revealed nothing) 50-150 bytes in size. And I have not experienced this bug, at least not regularly.


Yeah, the files are binary. As I receive a lot of SMS in Cyrillic, for me cat $file | iconv -f utf16be -t utf8 (or utf16le for some files) reveals the contained text. Not sure what’s needed to show SMS in English - I think they might use some nonstandard encoding.

1 Like