Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #61155 > unrolled thread
| Started by | Santiago García Mantiñán <manty@debian.org> |
|---|---|
| First post | 2018-06-05 15:10 +0200 |
| Last post | 2020-11-12 11:40 +0100 |
| Articles | 5 — 5 participants |
Back to article view | Back to linux.debian.kernel
Bug#900821: linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba Santiago García Mantiñán <manty@debian.org> - 2018-06-05 15:10 +0200
Bug#900821: linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba "Troxler, Ciril" <ciril.troxler@komaxgroup.com> - 2018-07-05 17:50 +0200
Processed: Re: Bug#900821: linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba "Debian Bug Tracking System" <owner@bugs.debian.org> - 2018-07-27 09:40 +0200
Bug#900821: linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba Stefan Fritsch <sf@sfritsch.de> - 2019-04-21 10:40 +0200
Bug#900821: Dimas <dimas.sc@gmail.com> - 2020-11-12 11:40 +0100
| From | Santiago García Mantiñán <manty@debian.org> |
|---|---|
| Date | 2018-06-05 15:10 +0200 |
| Subject | Bug#900821: linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba |
| Message-ID | <vXjSN-65r-1@gated-at.bofh.it> |
Package: src:linux Version: 4.9.88-1+deb9u1 Severity: important Dear Maintainer, I've found that when you mount a filesystem being served by samba on a host running apache and serve the files on this filesystem over apache, you'll get garbage mixed with the file content. This means that you get the right length but the file's content gets corrupted. This only happens when serving the files from samba, if you serve them from Windows the problem doesn't appear. I have found this problem in a pure Debian stable installation (Stretch), but I have tested this on a pure testing (Buster) installation with even worst results, the download breaks and the kernel shows this: [ 649.547840] WARNING: CPU: 6 PID: 1573 at /build/linux-43CEzF/linux-4.16.12/lib/iov_iter.c:695 copy_page_to_iter+0x1dd/0x2f0 [ 649.547844] Modules linked in: cmac arc4 md4 nls_utf8 cifs ccm dns_resolver fscache amd64_edac_mod edac_mce_amd radeon ccp rng_core joydev kvm sg evdev ttm k10temp drm_kms_helper serio_raw pcspkr shpchp drm irqbypass i2c_algo_bit hpilo hpwdt ipmi_si ipmi_devintf button ipmi_msghandler ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic fscrypto ecb crypto_simd cryptd glue_helper aes_x86_64 hid_generic usbhid hid sd_mod ohci_pci qla2xxx hpsa nvme_fc scsi_transport_fc scsi_transport_sas psmouse uhci_hcd ohci_hcd ehci_pci nvme_fabrics ehci_hcd scsi_mod nvme_core usbcore bnx2 i2c_piix4 usb_common [ 649.547943] CPU: 6 PID: 1573 Comm: wget Tainted: G W 4.16.0-2-amd64 #1 Debian 4.16.12-1 [ 649.547945] Hardware name: HP ProLiant BL465c G6 , BIOS A13 12/08/2009 [ 649.547953] RIP: 0010:copy_page_to_iter+0x1dd/0x2f0 [ 649.547956] RSP: 0018:ffffad6602defc58 EFLAGS: 00010297 [ 649.547960] RAX: 0000000000008000 RBX: ffffd65a085b1000 RCX: 0000000000000003 [ 649.547963] RDX: 0000000000008075 RSI: 017fffc000008000 RDI: 00000000085b1000 [ 649.547965] RBP: 000000000000148b R08: 0000000000002000 R09: ffff9ca6e457cd24 [ 649.547968] R10: ffff9ca6e20df8e8 R11: 000000000000548b R12: ffffad6602defdf0 [ 649.547970] R13: 0000000000006bea R14: 0000000000000040 R15: 0000000000000001 [ 649.547974] FS: 00007f0978403780(0000) GS:ffff9ca6e7cc0000(0000) knlGS:0000000000000000 [ 649.547977] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 649.547980] CR2: 00005592e97b3078 CR3: 0000000223f6c000 CR4: 00000000000006e0 [ 649.547983] Call Trace: [ 649.548001] skb_copy_datagram_iter+0x175/0x280 [ 649.548010] tcp_recvmsg+0x279/0xb90 [ 649.548019] ? set_fd_set+0x38/0x50 [ 649.548024] ? core_sys_select+0x2a4/0x2d0 [ 649.548032] inet_recvmsg+0x58/0xd0 [ 649.548038] sock_read_iter+0x94/0xf0 [ 649.548047] new_sync_read+0xe9/0x140 [ 649.548060] vfs_read+0x89/0x130 [ 649.548066] SyS_read+0x52/0xc0 [ 649.548075] do_syscall_64+0x6c/0x130 [ 649.548082] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 649.548089] RIP: 0033:0x7f0976eb7061 [ 649.548091] RSP: 002b:00007ffec8800db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 649.548095] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f0976eb7061 [ 649.548097] RDX: 0000000000002000 RSI: 00005592e97afc70 RDI: 0000000000000003 [ 649.548100] RBP: 000000000010113b R08: 00007ffec8800cd0 R09: 00007f0978403780 [ 649.548102] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000002000 [ 649.548105] R13: 00005592e97afc70 R14: 0000000000000000 R15: 00005592e97b1c80 [ 649.548108] Code: ff ff 48 89 c5 41 83 ae 28 0a 00 00 01 48 83 c4 10 48 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f b6 49 69 48 d3 e0 e9 a6 fe ff ff <0f> 0b 31 ed eb dc 85 c9 0f 84 ad 00 00 00 31 ed eb d0 4d 01 f5 [ 649.548180] ---[ end trace 5c988a789d68247f ]--- Doing several md5sums of the files directly on the cifs filesystem will allways result in the same md5, also doing dd if=file|md5sum, however wget http://localhost/file -O -|md5sum will result on a different code each time. The same tests running the same Stretch machine with Jessie's kernel will work Ok. Like I've said I've been able to replicate this on standard Stretch and Buster configs. These are the steps to replicate... install: apt-get install samba apache2 cifs-utils add to smb.conf to create a ftp share and then: service smbd reload [ftp] writable = no locking = no path = /srv/ftp public = yes browseable = no generate a file to be served: dd if=/dev/zero of=/srv/ftp/100Mzero bs=1024k count=100 mount the share on the web directory to serve it: mount.cifs //localhost/ftp /var/www/html/ test the local access of the cifs: md5sum /srv/ftp/100Mzero 2f282b84e7e608d5852449ed940bfc51 /srv/ftp/100Mzero Acces the file over apache: wget http://localhost/100Mzero -O - 2>/dev/null|md5sum 2b0ac997ed705924db55cf5f45ad3c88 - Like I said, changing to a Jessie's kernel this works ok, changing to a Buster 4.16 kernel or testing on a full Buster setup gives similar problem but http transfer is interrupted and kernel shows previous message. Also serving the file from Windows works ok. So this is a problem when serving from Samba (both Stretch or Buster versions) to a Apache ( md5sum or dd of the file directily over cifs mount works ok). If you need any other info to replicate don't hesitate to ask. Thanks in advance. Regards.
[toc] | [next] | [standalone]
| From | "Troxler, Ciril" <ciril.troxler@komaxgroup.com> |
|---|---|
| Date | 2018-07-05 17:50 +0200 |
| Message-ID | <w8eG5-7YB-3@gated-at.bofh.it> |
| In reply to | #61155 |
Package: src:linux
Version: 4.9.82-1+deb9u3
Dear Maintainer,
while we were investigating a problem, we found that we are affected by this bug.
We found some information you might find useful:
Another workaround than using an older kernel is to set the EnableSendFile directive to on.
http://httpd.apache.org/docs/2.4/mod/core.html#EnableSendfile
Without this setting, about 1/3 of the results are correct.
Mostly there are a few wrong results that are served more than once.
$ for i in {1..100} ; do wget -O- http://localhost/file | md5sum ; done | sort | uniq -c | sort -r
27 ca1014c32a2074b10b94461c1aa121d0 -
4 01e4b0e9bc0666697f6494e93ea03c67 -
2 77a39ffc2021e92e43d7b0320aa24d31 -
2 3ea2b0369a4357b7343304760c9a604b -
1 fe2918ea421b449f66c70472b4becfb5 -
1 fc5a29070cb70371ecb235e56d372d9d -
...
Regards.
Note:
This e-mail is for the named person's use only. It may contain confidential and/or privileged information. If you have received this e-mail in error, please notify the sender immediately and delete the material from any system. Any unauthorized copying, disclosure, distribution or other use of this information by persons or entities other than the intended recipient is prohibited.
Thank You.
[toc] | [prev] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2018-07-27 09:40 +0200 |
| Subject | Processed: Re: Bug#900821: linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba |
| Message-ID | <wg5vX-5gD-3@gated-at.bofh.it> |
| In reply to | #61155 |
Processing control commands: > found -1 4.9.110-1 Bug #900821 [src:linux] linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba Marked as found in versions linux/4.9.110-1. > tags -1 + confirmed Bug #900821 [src:linux] linux-image-4.9.0-6-amd64: apache reads wrong data over cifs filesystems served by samba Added tag(s) confirmed. -- 900821: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900821 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [next] | [standalone]
| From | Stefan Fritsch <sf@sfritsch.de> |
|---|---|
| Date | 2019-04-21 10:40 +0200 |
| Message-ID | <xPgaZ-83p-3@gated-at.bofh.it> |
| In reply to | #61155 |
Hi, by default, apache uses mmap, so probably mmap is broken on cifs. An alternate workaround should be to set EnableMMAP off in the apache config. Cheers, Stefan
[toc] | [prev] | [next] | [standalone]
| From | Dimas <dimas.sc@gmail.com> |
|---|---|
| Date | 2020-11-12 11:40 +0100 |
| Subject | Bug#900821: |
| Message-ID | <Baibf-7dV-3@gated-at.bofh.it> |
| In reply to | #61155 |
[Multipart message — attachments visible in raw view] — view raw
Affected by this bug too! It gave us a good headache today! https://askubuntu.com/questions/1291685/apache-file-on-mounted-folder-corrupted-file/1291690
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web