[Bug] MMS doesn't send pictures when Patchmanager is installed

Sorry, yes reboot was done according to the OP.

Hi,
Yes, here it is right after a fresh OS flash + Storeman + Chum install. Strangely, I could see more errors on uninstallation than on install of Patchmanager…

> 2022-01-09 17:12:57|install|libsailfishcryptopluginapi|0.2.21-1.5.1.jolla|armv7hl||jolla|5aa60f1f87704da44dc45db4f044125d5628b63ccb43e04f25aa3021e24e8296|
> 2022-01-09 17:12:57|install|sailfishsecretsdaemon|0.2.21-1.5.1.jolla|armv7hl||jolla|64415cd79b168eae570190617c6645d295884f4a2de2c02e644da6bdb572b7e9|
> 2022-01-09 17:12:58|install|sailfishsecretsdaemon-secretsplugin-common|0.2.21-1.5.1.jolla|armv7hl||jolla|e6c36b12b579234d35c726b20ccab2f6d3bf0e5bab709e003638ce8ee594956f|
> 2022-01-09 17:12:58|install|sailfishsecretsdaemon-secretsplugins-default|0.2.21-1.5.1.jolla|armv7hl||jolla|a9bffcc38402955786289718a9ca25db0f7863bc938cfb87567b5eea512ecd43|
> 2022-01-09 17:12:59|install|harbour-storeman|0.2.11+sfos4.2.20210918134855.2.g1945da7-1.34.1.jolla|armv7hl|root@XperiaXA2-DualSIM|mentaljam-obs|bd21432253dbde8399f6a0686040002aef1f53367f7eb8d026305ed8489a3960|
> 2022-01-09 17:22:24|radd   |PK_TMP_DIR|dir:/var/tmp/TmpDir.36TlQN|
> 2022-01-09 17:22:24|command|root@XperiaXA2-DualSIM|'/usr/libexec/packagekitd'|
> 2022-01-09 17:22:24|install|sailfishos-chum|0.3.0-1.5.1.jolla|noarch|root@XperiaXA2-DualSIM|PK_TMP_DIR||
> 2022-01-09 17:22:25|rremove|PK_TMP_DIR|
> 2022-01-09 17:22:25|rremove|PK_TMP_DIR|
> 2022-01-09 17:22:51|radd   |PK_TMP_DIR|dir:/var/tmp/TmpDir.A7VnFM|
> 2022-01-09 17:22:51|command|root@XperiaXA2-DualSIM|'/usr/libexec/packagekitd'|
> 2022-01-09 17:22:51|install|sailfishos-chum-gui|0.3.1-1.3.1.jolla|armv7hl|root@XperiaXA2-DualSIM|PK_TMP_DIR||
> 2022-01-09 17:22:52|rremove|PK_TMP_DIR|
> 2022-01-09 17:29:35|command|root@XperiaXA2-DualSIM|'/usr/libexec/packagekitd'|
> 2022-01-09 17:29:35|install|patch|2.7.6+git1-1.5.1.jolla|armv7hl||jolla|eeff6558c1d6765cd95a04914f6368165d001351a985b2e7d17442a2a210213d|
> 2022-01-09 17:29:35|install|unzip|6.0-1.5.3.jolla|armv7hl||jolla|43af45a207c04e85f1798ff8d5cb71bfd41b20eb9c07b1cf7d08bb4dedb1d4fa|
> # 2022-01-09 17:29:38 patchmanager-3.2.0-1.armv7hl.rpm installed ok
> # Additional rpm output:
> # Installing patchmanager: pre section
> # Installing patchmanager: post section
> # sed: /etc/ld.so.preload: No such file or directory
> # 
> 2022-01-09 17:29:38|install|patchmanager|3.2.0-1|armv7hl|root@XperiaXA2-DualSIM|openrepos-Patchmanager|f720033fdf7001b58b8b894cecd248001ff77bac|
> 2022-01-09 17:57:22|command|root@XperiaXA2-DualSIM|'/usr/libexec/packagekitd'|
> # 2022-01-09 17:57:23 patchmanager-3.2.0-1.armv7hl removed ok
> # Additional rpm output:
> # Uninstalling patchmanager: preun section
> # ERROR: ld.so: object '/usr/lib/libpreloadpatchmanager.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
> # Uninstalling patchmanager: postun section
> # ERROR: ld.so: object '/usr/lib/libpreloadpatchmanager.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
> # ERROR: ld.so: object '/usr/lib/libpreloadpatchmanager.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
> # 
> 2022-01-09 17:57:23|remove |patchmanager|3.2.0-1|armv7hl|root@XperiaXA2-DualSIM|

I couldn’t send MMS messages for a long time with Xperia 10 ii. After uninstalling Patchmanager sending them works again. Thanks for the report!

By chance, testing to get MMS back was successful on the 3rd installed app.
I wouldn’t have liked to have to reinstall/reboot all of them to find the problem :upside_down_face: :grinning:

Nice find, @ric9k - I can also reproduce this.

I’ve tried stracing jolla-messages, sailfish-share and commhistoryd and I’ve yet to find an explanation (the second one is a new process at each share popover).

sailfish-share seems to be passing a descriptor to jolla-messages and the messages app makes a 0x20000-byte buffered copy into /tmp/sailfish-share_XYZ then something goes wrong, by the time it passes it to commhistoryd the file is already unlinked (looks like jolla-messages does this, not sure about the timing).

Looks like you do get a preview of the file in the message, but when you hit send the file is already gone (hence the error you found).

There may be some open() bugs in the preloading library of patchmanager, I have yet to see its role here, will need to dig further.


Since the separate sailifsh-share process was introduced in SFOS 4.3.0, I’d also be curios if anyone has a previous version to check if the bug was there too.

1 Like

I’m on freshly flashed licenced 4.3.0.12 on Xperia XA2 Ultra, with Patchmanager installed, and I do NOT have problems with sending MMS. On the contrary, I have problems with receiving MMS, if the message only contains a multimedia file (image, audio, etc.) but no text - as reported here.

Hmm maybe it’s a 64-bit thing :thinking:

I’ve seen this PR from @pvuorela recently in libcommhistory :

It looks like a race condition, but I cannot figure out why Patchmanager is consistently putting in on the wrong path…

2 Likes

In this case patchmanager should introduce a infinitesimal delay of checking that the path starts with tmp and bailing querying the patchmanager service for a patched file.

Thanks for your find @dcaliste! I’ve built that branch and the results seem better (i.e image loads, MMS says sending…).
If you are blocked by this and want to use patchmanager, upgrade to this libcommhistory-qt5-1.11.12+jb56314.fix_mms_race package (aarch64 only) package: Show nemo:devel:hw:xiaomi:tucana / libcommhistory - SailfishOS Open Build Service

If anything goes wrong, for 4.3.0.12 you need to downgrade libcommhistory to 1.11.11-1.11.1.jolla

2 Likes

Great you guys found something!
I could test it too on armv7 but have no sdk neither would know how.
But no hurry.

I did try building armv7hl on OBS, but did not test it. Use with caution: State of Repository sailfish_latest_armv7hl for home:b100dian:commhistoryd / libcommhistory - SailfishOS Open Build Service

2 Likes

Thanks,
For a normal usage, du I only need to rmp install libcommhistory-qt5-1.11.12?

I think -declarative and -tools too. Since I actually installed them from the repo it was easier for me. Maybe you should use zypper ar to add that repository, zypper ref and the zypper up libcommhistory-qt5

@vlagged Brilliant!
Thank you for that and for de-noobing me.

For other new users, if useful, I did:

$ devel-su
$ pkcon install zypper
$ zypper ar https://repo.sailfishos.org/obs/home:/b100dian:/commhistoryd/sailfish_latest_armv7hl/home:b100dian:commhistoryd.repo
$ zypper ref
$ zypper up libcommhistory-qt5

Installed Patchmanager, rebooted.
SMS in and out work, MMS in and out work (wifi).

It complained about repomd.xml and packages being unsigned.
That’s expected, isn’t it?

1 Like

Yes, public OBS does not sign…
Thanks for confirming that it works - and welcome to the world of watching github PRs to see when the fix will be merged then watching the text changelog to see when the fix will be delivered in a sailfish update:) If you get this package listed as conflicting at the next update, you need to downgrade it first to the version above with something like zypper install --oldpackage package-name-x.x.x

1 Like

Ok. Now, the bug is in my head: How will I remember to downgrade before upgrading? :–)
Thanks again.
Cheers

1 Like

Only if it shows up on the OS update screen as a problem package need you worry about it.

BTW the PR is merged now and tagged as 1.11.13 in master. This means the fix will be generally available in some next release

Sorry, I don’t know what is PR?

I may even add that it has been backported in a upgrade-4.4.0 branch with the tag 1.11.11.1. So it may resonnably be part of the coming 4.4 release.

@ric9k, a PR is a pull request in Github. A public mechanism where some code in development is reviewed before being included in the main code. About the release, if you have installed the 1.11.12 package, you will see a message during UI upgrade saying to revert the libcommhistory-qt5. You can do it, as explained by @vlagged. In my experience, you can also leave it like that, the upgrade automatically downgrading it to the official 1.11.11.1 (the downgrade will not raise any issue, as far as I know, since the changes between the two version don’t require data migration, conflicting files…).

1 Like

Got it. Thank you very much.