Re: 14-CURRENT: www/nextcloud: php occ/web access : Segmentation fault

2021-06-30 Thread Bakul Shah
On Jun 28, 2021, at 1:39 PM, O. Hartmann  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> 
> Hello,
> 
> we ran into serious trouble here with an www/nextcloud installation on a 
> recent 14-CURRENT
> (FreeBSD 14.0-CURRENT #23 main-n247612-e6dd0e2e8d4: Mon Jun 28 18:08:20 CEST 
> 2021 amd64).
> Ports tree is up to date and ports are built via traditional "make". Port 
> www/nextcloud, all
> mod_ ports and even every php-* port (php74 is installed and default) has 
> been recompiled
> within the last two weeks via "portmaster -f".
> 
> The phenomenon occured back a couple of weeks, when access from the web via 
> cjromoum and/or
> firefox reported out of the sudden "Secure Connection Failed". I checked the 
> Apache
> 2.4 server's certificate (self signed,never had been an issue so far), but 
> there seems no
> issue to exist.
> It got very strange when I tried to perfom an upgrade and/or check via
> 
> cd /usr/local/www/nextcloud
> su -m -c "/usr/local/bin/php ./occ upgrade"
> 
> Whenever I access occ, I receive an @"Segmentation fault".
> The I checked the server's error log and I found for each access of the 
> nextcloud instance an
> entry like
> 
> [Tue Jun 01 06:04:40.667026 2021] [core:notice] [pid 81123:tid 34374492160] 
> AH00052: child pid
> 24598 exit signal Segmentation fault (11)
> 
> Well, I'm out of ideas, it seems nextcloud, php or apache ar all in 
> combination do have a
> serious problem hard to come by with 14-CURRENT (another instance running on 
> 12.2-RELENG
> doesn't have any issues).
> 
> Can someone hint me to what to do track this nasty error?

Some general ideas:

You can use ktrace and tcpdump to capture in some detail what is going on.
ktrace can tell you if there was a failing open near the crash (often due to
the "all the world is linux" syndrome). There should be a core dump connected
to the segfault - make sure coredumpsize limit is not set to 0. You may be
able to get a stacktrace from it. You can then compile the offending program
with -g and capture file:line with gdb. You can then pore over the source
code and add some checks or traps of your own (if you are guessing what the
bug may be). Also look at /var/log/messages for anything unusual. ["Unusual"
may become more apparent as you gain debugging experience.]

If you have a bug report, adding such relevant details may be of help to others.

Note that if you switch to a different version of *some* s/w piece, the
problem may disappear. That may be fine if you are under time pressure and
just want to work around the problem but in general it is better to try to
catch the bug without changing its environment.




Re: 14-CURRENT: www/nextcloud: php occ/web access : Segmentation fault

2021-06-30 Thread Michael Gmelin



On Wed, 30 Jun 2021 20:05:43 +0200
"O. Hartmann"  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Am Mon, 28 Jun 2021 23:34:44 +0200
> Michael Gmelin  schrieb:
> 
> > > On 28. Jun 2021, at 22:41, O. Hartmann 
> > > wrote:
> > > 
> > > -BEGIN PGP SIGNED MESSAGE-
> > > Hash: SHA512
> > > 
> > > 
> > > Hello,
> > > 
> > > we ran into serious trouble here with an www/nextcloud
> > > installation on a recent 14-CURRENT (FreeBSD 14.0-CURRENT #23
> > > main-n247612-e6dd0e2e8d4: Mon Jun 28 18:08:20 CEST 2021 amd64).
> > > Ports tree is up to date and ports are built via traditional
> > > "make". Port www/nextcloud, all mod_ ports and even every php-*
> > > port (php74 is installed and default) has been recompiled within
> > > the last two weeks via "portmaster -f".
> > > 
> > > The phenomenon occured back a couple of weeks, when access from
> > > the web via cjromoum and/or firefox reported out of the sudden
> > > "Secure Connection Failed". I checked the Apache 2.4 server's
> > > certificate (self signed,never had been an issue so far), but
> > > there seems no issue to exist. It got very strange when I tried
> > > to perfom an upgrade and/or check via
> > > 
> > > cd /usr/local/www/nextcloud
> > > su -m -c "/usr/local/bin/php ./occ upgrade"
> > > 
> > > Whenever I access occ, I receive an @"Segmentation fault".
> > > The I checked the server's error log and I found for each access
> > > of the nextcloud instance an entry like
> > > 
> > > [Tue Jun 01 06:04:40.667026 2021] [core:notice] [pid 81123:tid
> > > 34374492160] AH00052: child pid 24598 exit signal Segmentation
> > > fault (11)
> > > 
> > > Well, I'm out of ideas, it seems nextcloud, php or apache ar all
> > > in combination do have a serious problem hard to come by with
> > > 14-CURRENT (another instance running on 12.2-RELENG doesn't have
> > > any issues).
> > > 
> > > Can someone hint me to what to do track this nasty error?
> > > 
> > > Thanks in advance,
> > > 
> > 
> > Do you have a minimal setup to reproduce? Could you try building
> > all ports against OpenSSL from ports?
> > 
> > -m
> > 
> > 
> >   
> > > oh
> > > 
> > > - -- 
> > > O. Hartmann
> > > 
> > > Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
> > > Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs.
> > > 4 BDSG). -BEGIN PGP SIGNATURE-
> > > 
> > > iHUEARYKAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYNozlwAKCRA4N1ZZPba5
> > > Rx2nAPwNf9014LCwIKdjN1lxdiESP0daa97tqvFsZiOM8OgpmAD+M6pmqlCVG6TE
> > > HyuCprAwjwvP9zxov3BDaVmJRI3ZpAw=
> > > =z4d+
> > > -END PGP SIGNATURE-
> > 
> >   
> 
> I had already filed a PR regarding this probleme, here is the link:
> 
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256844
> 
> Building all ports against OpenSSL from ports would exceed the
> capabilities of my hosts, the box in question is under load and an
> older Ivy-Bridge XEON with limited speed, so that would take days. I
> hoped the problem could be isolated otherwise ...

I found this issue on the nextcloud issue tracker:
https://github.com/nextcloud/server/issues/25761

Based on that, you should enable apcu for php CLI by adding this
to your php.ini:

  apc.enable_cli=1

which should fix `occ upgrade'.

No idea if it works, but it sounds similar enough to give it a shot.

Cheers
Michael

p.s. see also https://www.php.net/manual/en/apcu.configuration.php


> - -- 
> O. Hartmann
> 
> Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
> Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4
> BDSG). -BEGIN PGP SIGNATURE-
> 
> iHUEARYKAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYNyykgAKCRA4N1ZZPba5
> R68PAPwIioYhbPZ4DXLbJXKsWuAYUr9oZRgwMiTqhpqqwBIwCgEAwmcxE/ZpQ3Og
> 0mXO2DBqBNv+RAFQ7U/3qSnOlKeAdgQ=
> =0VYB
> -END PGP SIGNATURE-



-- 
Michael Gmelin



Re: 14-CURRENT: www/nextcloud: php occ/web access : Segmentation fault

2021-06-30 Thread O. Hartmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Am Mon, 28 Jun 2021 23:34:44 +0200
Michael Gmelin  schrieb:

> > On 28. Jun 2021, at 22:41, O. Hartmann  wrote:
> > 
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA512
> > 
> > 
> > Hello,
> > 
> > we ran into serious trouble here with an www/nextcloud installation on a 
> > recent 14-CURRENT
> > (FreeBSD 14.0-CURRENT #23 main-n247612-e6dd0e2e8d4: Mon Jun 28 18:08:20 
> > CEST 2021 amd64).
> > Ports tree is up to date and ports are built via traditional "make". Port 
> > www/nextcloud,
> > all mod_ ports and even every php-* port (php74 is installed and default) 
> > has been
> > recompiled within the last two weeks via "portmaster -f".
> > 
> > The phenomenon occured back a couple of weeks, when access from the web via 
> > cjromoum and/or
> > firefox reported out of the sudden "Secure Connection Failed". I checked 
> > the Apache
> > 2.4 server's certificate (self signed,never had been an issue so far), but 
> > there seems no
> > issue to exist.
> > It got very strange when I tried to perfom an upgrade and/or check via
> > 
> > cd /usr/local/www/nextcloud
> > su -m -c "/usr/local/bin/php ./occ upgrade"
> > 
> > Whenever I access occ, I receive an @"Segmentation fault".
> > The I checked the server's error log and I found for each access of the 
> > nextcloud instance
> > an entry like
> > 
> > [Tue Jun 01 06:04:40.667026 2021] [core:notice] [pid 81123:tid 34374492160] 
> > AH00052: child
> > pid 24598 exit signal Segmentation fault (11)
> > 
> > Well, I'm out of ideas, it seems nextcloud, php or apache ar all in 
> > combination do have a
> > serious problem hard to come by with 14-CURRENT (another instance running 
> > on 12.2-RELENG
> > doesn't have any issues).
> > 
> > Can someone hint me to what to do track this nasty error?
> > 
> > Thanks in advance,
> >   
> 
> Do you have a minimal setup to reproduce? Could you try building all ports 
> against OpenSSL
> from ports?
> 
> -m
> 
> 
> 
> > oh
> > 
> > - -- 
> > O. Hartmann
> > 
> > Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
> > Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
> > -BEGIN PGP SIGNATURE-
> > 
> > iHUEARYKAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYNozlwAKCRA4N1ZZPba5
> > Rx2nAPwNf9014LCwIKdjN1lxdiESP0daa97tqvFsZiOM8OgpmAD+M6pmqlCVG6TE
> > HyuCprAwjwvP9zxov3BDaVmJRI3ZpAw=
> > =z4d+
> > -END PGP SIGNATURE-  
> 
> 

I had already filed a PR regarding this probleme, here is the link:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256844

Building all ports against OpenSSL from ports would exceed the capabilities of 
my hosts, the
box in question is under load and an older Ivy-Bridge XEON with limited speed, 
so that would
take days. I hoped the problem could be isolated otherwise ...

- -- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-BEGIN PGP SIGNATURE-

iHUEARYKAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYNyykgAKCRA4N1ZZPba5
R68PAPwIioYhbPZ4DXLbJXKsWuAYUr9oZRgwMiTqhpqqwBIwCgEAwmcxE/ZpQ3Og
0mXO2DBqBNv+RAFQ7U/3qSnOlKeAdgQ=
=0VYB
-END PGP SIGNATURE-


Re: 14-CURRENT: www/nextcloud: php occ/web access : Segmentation fault

2021-06-28 Thread Michael Gmelin



> On 28. Jun 2021, at 22:41, O. Hartmann  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> 
> Hello,
> 
> we ran into serious trouble here with an www/nextcloud installation on a 
> recent 14-CURRENT
> (FreeBSD 14.0-CURRENT #23 main-n247612-e6dd0e2e8d4: Mon Jun 28 18:08:20 CEST 
> 2021 amd64).
> Ports tree is up to date and ports are built via traditional "make". Port 
> www/nextcloud, all
> mod_ ports and even every php-* port (php74 is installed and default) has 
> been recompiled
> within the last two weeks via "portmaster -f".
> 
> The phenomenon occured back a couple of weeks, when access from the web via 
> cjromoum and/or
> firefox reported out of the sudden "Secure Connection Failed". I checked the 
> Apache
> 2.4 server's certificate (self signed,never had been an issue so far), but 
> there seems no
> issue to exist.
> It got very strange when I tried to perfom an upgrade and/or check via
> 
> cd /usr/local/www/nextcloud
> su -m -c "/usr/local/bin/php ./occ upgrade"
> 
> Whenever I access occ, I receive an @"Segmentation fault".
> The I checked the server's error log and I found for each access of the 
> nextcloud instance an
> entry like
> 
> [Tue Jun 01 06:04:40.667026 2021] [core:notice] [pid 81123:tid 34374492160] 
> AH00052: child pid
> 24598 exit signal Segmentation fault (11)
> 
> Well, I'm out of ideas, it seems nextcloud, php or apache ar all in 
> combination do have a
> serious problem hard to come by with 14-CURRENT (another instance running on 
> 12.2-RELENG
> doesn't have any issues).
> 
> Can someone hint me to what to do track this nasty error?
> 
> Thanks in advance,
> 

Do you have a minimal setup to reproduce? Could you try building all ports 
against OpenSSL from ports?

-m



> oh
> 
> - -- 
> O. Hartmann
> 
> Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
> Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
> -BEGIN PGP SIGNATURE-
> 
> iHUEARYKAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYNozlwAKCRA4N1ZZPba5
> Rx2nAPwNf9014LCwIKdjN1lxdiESP0daa97tqvFsZiOM8OgpmAD+M6pmqlCVG6TE
> HyuCprAwjwvP9zxov3BDaVmJRI3ZpAw=
> =z4d+
> -END PGP SIGNATURE-




14-CURRENT: www/nextcloud: php occ/web access : Segmentation fault

2021-06-28 Thread O. Hartmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512


Hello,

we ran into serious trouble here with an www/nextcloud installation on a recent 
14-CURRENT
(FreeBSD 14.0-CURRENT #23 main-n247612-e6dd0e2e8d4: Mon Jun 28 18:08:20 CEST 
2021 amd64).
Ports tree is up to date and ports are built via traditional "make". Port 
www/nextcloud, all
mod_ ports and even every php-* port (php74 is installed and default) has been 
recompiled
within the last two weeks via "portmaster -f".

The phenomenon occured back a couple of weeks, when access from the web via 
cjromoum and/or
firefox reported out of the sudden "Secure Connection Failed". I checked the 
Apache
2.4 server's certificate (self signed,never had been an issue so far), but 
there seems no
issue to exist.
It got very strange when I tried to perfom an upgrade and/or check via

cd /usr/local/www/nextcloud
su -m -c "/usr/local/bin/php ./occ upgrade"

Whenever I access occ, I receive an @"Segmentation fault".
The I checked the server's error log and I found for each access of the 
nextcloud instance an
entry like

[Tue Jun 01 06:04:40.667026 2021] [core:notice] [pid 81123:tid 34374492160] 
AH00052: child pid
24598 exit signal Segmentation fault (11)

Well, I'm out of ideas, it seems nextcloud, php or apache ar all in combination 
do have a
serious problem hard to come by with 14-CURRENT (another instance running on 
12.2-RELENG
doesn't have any issues).

Can someone hint me to what to do track this nasty error?

Thanks in advance,

oh

- -- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-BEGIN PGP SIGNATURE-

iHUEARYKAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYNozlwAKCRA4N1ZZPba5
Rx2nAPwNf9014LCwIKdjN1lxdiESP0daa97tqvFsZiOM8OgpmAD+M6pmqlCVG6TE
HyuCprAwjwvP9zxov3BDaVmJRI3ZpAw=
=z4d+
-END PGP SIGNATURE-