Skip to content

Files on SMB-share corrupted while up- and downloading #26457

@ShinjiLE

Description

@ShinjiLE

Steps to reproduce

Using SMB Share

Expected behaviour

Files uploaded and downloaded without corruption

Actual behaviour

Datablocks are truncated to 8192 Bytes

Server configuration detail

Operating system: Linux 5.11.6-1-default #1 SMP Thu Mar 11 16:11:36 UTC 2021 (7358b30) x86_64

Webserver: Apache (fpm-fcgi)

Database: mysql 10.5.9

PHP version:

7.4.16
Modules loaded: Core, date, libxml, pcre, filter, hash, Reflection, SPL, session, SimpleXML, standard, xml, cgi-fcgi, mysqlnd, apcu, bcmath, bz2, ctype, curl, dom, enchant, mbstring, fileinfo, ftp, gd, gettext, gmp, ice, iconv, imagick, intl, json, lzf, exif, memcached, mysqli, openssl, pcntl, PDO, pdo_mysql, pdo_sqlite, zlib, posix, readline, redis, smbclient, sockets, sqlite3, tidy, tokenizer, uuid, xmlreader, xmlwriter, zip, Phar, libsmbclient, Zend OPcache

Nextcloud version: 21.0.1 RC1 - 21.0.1.0

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - activity: 2.14.3
 - admin_audit: 1.11.0
 - announcementcenter: 5.0.0
 - bookmarks: 4.1.0
 - calendar: 2.2.0
 - checksum: 1.1.2
 - cloud_federation_api: 1.4.0
 - comments: 1.11.0
 - contacts: 3.5.1
 - contactsinteraction: 1.2.0
 - dashboard: 7.1.0
 - dav: 1.17.1
 - deck: 1.3.2
 - duplicatefinder: 0.0.6
 - event_update_notification: 1.2.0
 - extract: 1.3.1
 - federatedfilesharing: 1.11.0
 - federation: 1.11.0
 - files: 1.16.0
 - files_external: 1.12.0
 - files_fulltextsearch: 21.0.0
 - files_fulltextsearch_tesseract: 20.0.1
 - files_markdown: 2.3.3
 - files_pdfviewer: 2.1.0
 - files_rightclick: 1.0.0
 - files_sharing: 1.13.1
 - files_texteditor: 2.14.0
 - files_trashbin: 1.11.0
 - files_versions: 1.14.0
 - files_videoplayer: 1.10.0
 - firstrunwizard: 2.10.0
 - fulltextsearch: 21.0.0
 - fulltextsearch_elasticsearch: 21.0.0
 - groupfolders: 9.0.0
 - impersonate: 1.8.0
 - integration_github: 1.0.0
 - integration_mastodon: 1.0.0
 - integration_twitter: 1.0.0
 - issuetemplate: 0.7.0
 - logreader: 2.6.0
 - lookup_server_connector: 1.9.0
 - maps: 0.1.8
 - metadata: 0.13.0
 - music: 1.1.0
 - news: 15.3.2
 - nextcloud_announcements: 1.10.0
 - notes: 4.0.4
 - notifications: 2.9.0
 - notify_push: 0.1.6
 - oauth2: 1.9.0
 - passman: 2.3.7
 - password_policy: 1.11.0
 - phonetrack: 0.6.7
 - photos: 1.3.0
 - polls: 1.8.1
 - previewgenerator: 3.1.1
 - pride: 0.0.3
 - privacy: 1.5.0
 - provisioning_api: 1.11.0
 - recommendations: 1.0.0
 - serverinfo: 1.11.0
 - settings: 1.3.0
 - sharebymail: 1.11.0
 - side_menu: 1.23.1
 - social: 0.4.2
 - spreed: 11.1.1
 - support: 1.4.0
 - survey_client: 1.9.0
 - systemtags: 1.11.0
 - tasks: 0.13.6
 - telephoneprovider: 1.0.3
 - text: 3.2.0
 - theming: 1.12.0
 - twofactor_backupcodes: 1.10.0
 - updatenotification: 1.11.0
 - user_status: 1.1.1
 - viewer: 1.5.0
 - weather_status: 1.1.0
 - workflowengine: 2.3.0
Disabled:
 - accessibility
 - apporder
 - bruteforcesettings
 - circles
 - encryption
 - epubreader
 - files_linkeditor
 - files_trackdownloads
 - flowupload
 - integration_discourse
 - nextbackup
 - suspicious_login
 - talk_matterbridge
 - talk_simple_poll
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "nextcloud.mybase.selfhost.de",
        "cloudnext.mybase.selfhost.de"
    ],
    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
    "default_phone_region": "DE",
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "tempdirectory": "\/var\/tmp\/nextcloudtemp",
    "overwrite.cli.url": "https:\/\/nextcloud.mybase.selfhost.de",
    "knowledgebaseenabled": true,
    "dbtype": "mysql",
    "version": "21.0.1.0",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "updater.release.channel": "beta",
    "appstore.experimental.enabled": true,
    "maintenance": false,
    "loglevel": 3,
    "debug": false,
    "htaccess.RewriteBase": "\/",
    "activity_use_cached_mountpoints": true,
    "session_keepalive": true,
    "session_lifetime": 86400,
    "versions_retention_obligation": "auto",
    "trashbin_retention_obligation": "auto",
    "enable_previews": true,
    "preview_max_x": 2560,
    "preview_max_y": 1600,
    "preview_max_filesize_image": 200,
    "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
    "preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore --convert-to pdf --outdir ",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\TIFF",
        "OC\\Preview\\SVG",
        "OC\\Preview\\Postscript",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\PDF",
        "OC\\Preview\\Font",
        "OC\\Preview\\Epub",
        "OC\\Preview\\StarOffice",
        "OC\\Preview\\HEIC",
        "OC\\Preview\\KRITA"
    ],
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "log_type": "syslog",
    "logfile": "\/var\/log\/nextcloud.log",
    "logfilemode": 416,
    "log_rotate_size": 104857600,
    "syslog_tag": "Nextcloud",
    "memcache.distributed": "\\OC\\Memcache\\Memcached",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "filelocking.enabled": "true",
    "filelocking.ttl": 3600,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "timeout": 0,
        "dbindex": 0,
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "memcached_servers": [
        [
            "192.168.1.10",
            11211
        ],
        [
            "192.168.1.50",
            11211
        ]
    ],
    "data-fingerprint": "790e9a77b6ee76b2af214c8f58d75dfd",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpsecure": "tls",
    "mysql.utf8mb4": true,
    "allow_user_to_change_display_name": true,
    "auth.bruteforce.protection.enabled": true,
    "ldapIgnoreNamingRules": false,
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "theme": "",
    "app_install_overwrite": [
        "fulltextsearch",
        "fulltextsearch_elasticsearch",
        "files_fulltextsearch",
        "files_fulltextsearch_tesseract",
        "passman",
        "pride",
        "checksum",
        "files_markdown",
        "telephoneprovider",
        "circles",
        "camerarawpreviews",
        "files_external_gdrive",
        "music",
        "facerecognition",
        "groupfolders",
        "side_menu",
        "metadata",
        "issuetemplate"
    ],
    "updater.secret": "***REMOVED SENSITIVE VALUE***"
}

Are you using external storage, if yes which one: smb

Are you using encryption:

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Operating system:

Logs

Web server error log
Insert your web server log here 
Nextcloud log
Apr 08 10:37:33 rin libsmbclient[2213]: {"reqId":"ipoKR7FMx5eRhV7BUHwF","level":3,"time":"2021-04-08T08:37:33+00:00","remoteAddr":"84.134.23.233","user":"shinji","app":"PHP","method":"GET","url":"/index.php/apps/files/api/v1/thumbnail/256/256/Bilder/Photos/2021/04/IMG_20210408_103713.jpg","message":"{\"Exception\":\"Error\",\"Message\":\"fread(): Icewind\\\\SMB\\\\Native\\\\NativeReadStream::stream_read - read 253952 bytes more data than requested (262144 read, 8192 max) - excess data will be lost at /srv/www/vhosts/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#55\",\"Code\":0,\"Trace\":[{\"function\":\"onError\",\"class\":\"OC\\\\Log\\\\ErrorHandler\",\"type\":\"::\",\"args\":[2,\"fread(): Icewind\\\\SMB\\\\Native\\\\NativeReadStream::stream_read - read 253952 bytes more data than requested (262144 read, 8192 max) - excess data will be lost\",\"/srv/www/vhosts/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php\",55,{\"count\":8192}]},{\"file\":\"/srv/www/vhosts/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php\",\"line\":55,\"function\":\"fread\",\"args\":[null,8192]},{\"file\":\"/srv/www/vhosts/nextcloud/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php\",\"line\":96,\"function\":\"stream_read\",\"class\":\"Icewind\\\\Streams\\\\Wrapper\",\"type\":\"->\",\"args\":[8192]},{\"function\":\"stream_read\",\"class\":\"Icewind\\\\Streams\\\\CallbackWrapper\",\"type\":\"->\",\"args\":[8192]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/Preview/ProviderV2.php\",\"line\":92,\"function\":\"file_put_contents\",\"args\":[\"/tmp/oc_tmp_XQQFAM\",null]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/Preview/Image.php\",\"line\":50,\"function\":\"getLocalFile\",\"class\":\"OC\\\\Preview\\\\ProviderV2\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"}]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/Preview/GeneratorHelper.php\",\"line\":63,\"function\":\"getThumbnail\",\"class\":\"OC\\\\Preview\\\\Image\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"},2560,1600]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/Preview/Generator.php\",\"line\":244,\"function\":\"getThumbnail\",\"class\":\"OC\\\\Preview\\\\GeneratorHelper\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Preview\\\\JPEG\"},{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"},2560,1600]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/Preview/Generator.php\",\"line\":140,\"function\":\"getMaxPreview\",\"class\":\"OC\\\\Preview\\\\Generator\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Files\\\\SimpleFS\\\\SimpleFolder\"},{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"},\"image/jpeg\",\"\"]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/Preview/Generator.php\",\"line\":109,\"function\":\"generatePreviews\",\"class\":\"OC\\\\Preview\\\\Generator\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"},[{\"width\":256,\"height\":256,\"crop\":true,\"mode\":\"fill\"}],\"image/jpeg\"]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/PreviewManager.php\",\"line\":190,\"function\":\"getPreview\",\"class\":\"OC\\\\Preview\\\\Generator\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"},256,256,true,\"fill\",null]},{\"file\":\"/srv/www/vhosts/nextcloud/apps/files/lib/Controller/ApiController.php\",\"line\":130,\"function\":\"getPreview\",\"class\":\"OC\\\\PreviewManager\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"},256,256,true]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":218,\"function\":\"getThumbnail\",\"class\":\"OCA\\\\Files\\\\Controller\\\\ApiController\",\"type\":\"->\",\"args\":[256,256,{\"__class__\":\"OC\\\\Files\\\\Node\\\\File\"}]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":127,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[{\"__class__\":\"OCA\\\\Files\\\\Controller\\\\ApiController\"},\"getThumbnail\"]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/AppFramework/App.php\",\"line\":157,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[{\"__class__\":\"OCA\\\\Files\\\\Controller\\\\ApiController\"},\"getThumbnail\"]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/private/Route/Router.php\",\"line\":302,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\",\"args\":[\"APIController\",\"getThumbnail\",{\"__class__\":\"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer\"},{\"x\":\"256\",\"y\":\"256\",\"file\":\"Bilder/Photos/2021/04/IMG_20210408_103713.jpg\",\"_route\":\"files.API.getThumbnail\"}]},{\"file\":\"/srv/www/vhosts/nextcloud/lib/base.php\",\"line\":993,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\",\"args\":[\"/apps/files/api/v1/thumbnail/256/256/Bilder/Photos/2021/04/IMG_20210408_103713.jpg\"]},{\"file\":\"/srv/www/vhosts/nextcloud/index.php\",\"line\":37,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\",\"args\":[]}],\"File\":\"/srv/www/vhosts/nextcloud/lib/private/Log/ErrorHandler.php\",\"Line\":92,\"CustomMessage\":\"--\"}","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"21.0.1.0"}
Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

720-1455-max

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions