SMB External Storage OC 10.1.0

I’ve been having issues with external storage on my Ubuntu 16.04 Server

I’ve attached shares from Windows 2016 Server, when I try to open certain files- at this point majority of them I get this error in Apache

[Tue Apr 02 08:24:47.618455 2019] [core:notice] [pid 10639] AH00051: child pid 10695 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Tue Apr 02 08:24:47.618539 2019] [core:notice] [pid 10639] AH00051: child pid 10696 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Tue Apr 02 08:24:47.618622 2019] [core:notice] [pid 10639] AH00051: child pid 10778 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Tue Apr 02 08:24:47.618705 2019] [core:notice] [pid 10639] AH00051: child pid 10784 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Tue Apr 02 08:24:48.621357 2019] [core:notice] [pid 10639] AH00051: child pid 10711 exit signal Segmentation fault (11), possible coredump in /etc/apache2

I can access this file from a windows share without a problem and can copy it to my desktop

More Info: SMBv1 is enabled on the server
I’ve tried removing the php-smbclient and using smbclient but that one is not working properly, the status shows as green even when I enter random stuff in the external storage but then I can’t obviously mount the storage. When I try to enter the right details it still fails and just shows red, with and without specifying a domain, so I’ve gone back to php-smbclient.

What’s really strange is that once I cut a file that throws the error and put it back in the original location it works fine.
The Security permissions on the file are the same when I cut and paste back. No idea what to look for

Double-check you’re using a compiled php-smbclient library for the same php version your server is using. There might be problems if you’re using phpX and the library is compiled for phpY.

In addition, check if the same problem happens with other servers.

I am using whatever is available in the Ubuntu 16.04 repositories.
It doesn’t appear to be a permission issue, I tried scanning the files using the occ, thought maybe they needed to be re-scanned, that didn’t help.

Even if I log in as domain admin and mount the d$ share, it will time out on certain files (no matter the extension) I Just get Secure Connection Failed in the web browser.

apt-cache policy php-smbclient
php-smbclient:
  Installed: 0.8.0~rc1-2build1
  Candidate: 0.8.0~rc1-2build1
  Version table:
 *** 0.8.0~rc1-2build1 500
        500 http://au.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.8.0~rc1-2 500
        500 http://au.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

cat /etc/php/7.0/mods-available/smbclient.ini
extension=smbclient.so

Here’s a log of the working and non working file, the working files is only working because I moved it out of the folder and pasted it back:
https://pastebin.com/raw/03a4g1dC

Permissions are identical, there’s no inheritance set on the folder. So strange

You were helping me with the other issue where I was testing the upgrade and a fresh install on Ubuntu 18.04
Still investigating that as well

One important thing I forgot to mention is that these are DFSR shares,
I get this error when I scan files in 18.04
Couldn’t resolve \DfsrPrivate

Thanks

DFSR is another component to look into. I’d recommend you to isolate the problem as much as possible. Right now you have quite a bunch of components in a chain, and one of them is failing causing the chain to break.

I guess the chain is something like below.

OC -> php-libsmbclient -> libsmbclient -> DFSR -> SMB server

As far as I know, the apache’s segmentation fault might be caused by problems in the native code of the library. This means that the problem should be reproducible without ownCloud.

https://github.com/eduardok/libsmbclient-php has some examples at the bottom to use the library. I think you can use them to test if the problem still happens or not. If a simple code like that still crashes, the problem isn’t really related to ownCloud.

Thanks for the tip, I’ve used the open example on one of the files I know throws an error and yes I get the same error in Apache. Will try and post on the github
Cheers

Hey,

i think if a segmentation fault is happening then this looks to me like a serious bug in either Apache or a PHP extension like php-smbclient where ownCloud can’t do anything about it.

So i think the best is indeed probably to report this issue to the php-smbclient bugtracker or as an alternative to update php-smbclient to a newer version.

Hey,

so it seems this was now already reported to the developer of php-smbclient or am i wrong?

Thanks for the help guys,
Yes I have reported it but not sure if more info is needed