-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nextcloud > 27.1.3.2 : Configuring Redis as session handler Segmentation fault (core dumped) #2106
Comments
Note : If i set an old version of Nextcloud (27.0.2.1) to have the downgrade error, container is well starting and logs mentions that datas are matching version 27.1.3.2 :
By the way i can use docker exec to explore container if needed Thanks |
On an other impacted instance i''m sure it was running well in version 27.1.3.2 because i used on the 2023/11/24 the Nextcloud security Scan which gave :
This instance was impacted the same day as the main one i'm talking in this topic and was non-essential (almost no datas) so i broke it and i made a fresh new one working only in 27.0.2 So the problem impacting my two instances, upgraded as same time, occurred after using them with version 27.1.3.2. |
By the way, how is it possible to pull the specific 27.1.3.2 image ? My docker instance was cleaned and I don't have it. Via docker hub it seems I can't specify precisely to use it. If so, I could get my Nextcloud instance back (which will be great for me cause I need it) and prove the problem occurs with superiors versions. Thanks |
I confirm that with the provided Base version - apache docker-compose.yml content ont this page, so by really having a fresh instance, the problem occurs :
But when I set a previous nextcloud tag (for example 27.0) it works :
Please, while waiting a solution, would it be possible, at least for a short while, to let the 27.1.3.2 image on docker available so i could restart my instance with it ? I'm stucked..... Thank you very much. (and sorry again for my english) |
Still stuck.... Please...if someone could have a look 🙏 Thanks |
I believe I started facing the same issue on a rather long-living installation back in mid-September. First this started happening after the upgrade from 26.0.3 to 26.0.6. Due to one of my own maintenance oversights I didn't make a backup before the upgrade (live and learn I guess, even minor upgrades like this can break things big time), but I managed to partially roll things back and upgrade to 26.0.4 which still functioned fine with Redis. Now, months later, I'm getting back to this properly and armed with backups, so drastic experiments are now an option 💪 With the help of
…a-a-a-and then it segfaults. Since I'm running a small server with only a few users and apps, lack of Redis isn't such a big concern for me, but if I can help with tracking down the culprit, I can spare some time. I'm just not sure where to look at this point. The culprit seems to be whatever's connecting Nextcloud and Redis. For easier reference, here are the versions of Nextcloud I ran with Redis (v5):
PS: this seems to affect Docker images both based on Alpine and on Debian. At least I've seen it happen on both. I can't recall which ones were which at this point unfortunately. |
Found another case of the same issue happening in the forums, with the same workaround (removing Redis entirely): https://help.nextcloud.com/t/nextcloud-docker-segmentation-fault-during-upgrade/175063 |
My hypothesis would be the upgrade of redis PHP module to 6.0 and beyond:
Notice the first version 6.0 was used on was 26.0.5 — right in the gap of versions where breakage seems to start in my experiments. |
Oh !!! Thank you very much for your help ! 🤗 It's late here and I'm going to sleep. I'll will check all of these next morning ! Will have good sleep 🤗 |
It was late and i did'nt realize that i alradeay tested using it without redis. Take this docker-compose yml i made for purpose tests i have just tested again now :
So there is nos redis service. In this case where Nextcloud 27.0.2 image is specified, Nextcloud's container starts well. But if (after clearing all volume's datas so i'ts fresh) i don't set a version or at least 27.1, it won't start and i'll get the segmentation fault. So it's not specifically related to redis, nor to my docker host because it's very related to version superior to 27.1.3.2 (as i could determine because my main instance was working whit this one) and i can't downgrade datas to version 27.0.2 My problem is i'm stucked because i can't pull this specific image (27.1.3.2) at least to wait a solution with versions superior to it. (Sorry for my English, hoping all is clear enough). Thanks. |
Ah. Right, dependency upgrades run in parallel in major branches. Makes sense. In 27, the last version of Nextcloud to use phpredis below 6 was exactly 27.0.2 with 5.3.7. A matching change in two branches causing a breakdown is way beyond coincidence. As a workaround I would suggest replacing it with phpredis 5.3.7 with a custom Dockerfile. If that works out, we probably want to downgrade it in the original Dockerfiles here and report the problem upstream, to either Nextcloud or phpredis, depending on what it is. |
Is the tag
Then you can go into the container terminal and look around there, I kinda sus about the |
I started migrating datas to a container forced to use version 27.0.2 because I really need a working instance. When it will be done, I'll try what you mentioned on an other fresh instance to determine what is possible to do when this problem occurs. Have to wait a little before starting doing this. I'll keep you in touch on this thread 😉 |
For your particular situation, @AceDenghar, 27.1.4 is out already, which 27.1.3.2 should upgrade to nicely. But the issue with Redis connectivity is still there, and as far as I can tell, it's caused by the upgrade of phpredis (the Redis client for PHP) to version 6.0. The current upgrade script does not seem to be concerned whatsoever about major upgrades, it just picks the latest versions available. |
There was a similar issue in #2071. phpredis 5.x is no longer supported. I think they do not support multiple (major) versions at all. |
Well, an unsupported version is arguably better than a broken one. But it's a tough call, I hear you. Running unsupported versions is risky too. I have barely any experience troubleshooting PHP apps unfortunately, especially native parts. I can wield Docker with relative confidence though. Anything I can help with here? |
Would you like to report this upstream? AFAIK this crash has not yet been reported. |
(Some tinkering later) So I started comparing configuration files between installations and one line in - 'password' => getenv('REDIS_HOST_PASSWORD'),
+ 'password' => (string) getenv('REDIS_HOST_PASSWORD'), …and I can confirm that it fixes the problem in my original installation and will probably help everyone else. 🎉 So two questions:
edit: |
Nice finding!
IMHO a crash is never a valid behaviour. I'd rather expect an error on misconfiguration.
No, the config files are in upgrade.exclude and only created for new installations. |
Agreed. A'ight, I'll send a report to phpredis in a bit, will link it here.
I figured that's how it works right now, yeah, but if there's a backwards-incompatible change in configurations, like this one, how is a user of the image supposed to learn about it? |
Also, Nextcloud 28 has worked around the issue: nextcloud/server#38568 |
The fix for phpredis is in the |
I can confirm that this solution works! I had 2 installations, one working (that just didn't have a password definition line in |
Closing as nothing remains to be done here. Also #2120 was merged and released in v2024.6.2 images: https://github.com/nextcloud/docker/releases/tag/v2024.6.2 |
Hi,
Since last week i'm experiencing this issue with nextcloud 21.1.3 :
Here is my docker-compose.yml file :
Pulling latest image does not work anymore (i was waiting for 27.1.4 to test).
Even if i'm creating a fresh docker instance using the default yml file etc, i have the same issue with branch 27.1 (last version mentionned in config.php is 27.1.3).
But i'm able to create a new instance via 27.0.2, it's running fine.
So i suspect a change in 27.1 (i think it was between 27.1.2 and 27.1.3) but can't downgrade, and container is still starting so i can't use docker exec to explore.
Sorry for my english, and for your help.
The text was updated successfully, but these errors were encountered: