Samba client freeze during write

Asked by jema on 2019-01-09

Hello,
 My issue is that whenever I try to write new files (copy or move) to my file server something in the samba client freezes and I can't do anything samba until the system is rebooted.

To get write access I mount with uid ie "sudo mount //server/share /mountpoint -o user=write,uid=1000".

When this happens the server is still happily serving files to other machines.
If I just read files everything works fine.
If I connect from a windows client there is no issue.

Both client and server are running fully updated, as of posting, bionic.

Using 'dmesg -w' too see what's going on I can see that there is a general protection fault somehow related to cifsd. I am however unable to tell if it is relevant to my issue, from kern.log:

Jan 9 21:03:49 ubnu kernel: [ 410.357213] general protection fault: 0000 [#1] SMP PTI
Jan 9 21:03:49 ubnu kernel: [ 410.357224] Modules linked in: cmac arc4 md4 nls_utf8 cifs ccm fscache rfcomm pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) thunderbolt bnep binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel intel_rapl btusb x86_pkg_temp_thermal intel_powerclamp btrtl coretemp joydev btbcm snd_hda_codec kvm_intel input_leds kvm irqbypass btintel crct10dif_pclmul crc32_pclmul snd_hda_core ghash_clmulni_intel pcbc snd_hwdep snd_pcm bluetooth ecdh_generic snd_seq_midi snd_seq_midi_event aesni_intel snd_rawmidi aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf snd_seq rtsx_pci_ms snd_seq_device
Jan 9 21:03:49 ubnu kernel: [ 410.357357] wmi_bmof snd_timer memstick intel_wmi_thunderbolt snd shpchp soundcore mei_me mei intel_pch_thermal acpi_pad mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 xfs libcrc32c hid_generic usbhid hid rtsx_pci_sdmmc i915 e1000e i2c_algo_bit drm_kms_helper ptp syscopyarea pps_core i2c_i801 sysfillrect sysimgblt rtsx_pci fb_sys_fops drm ahci libahci wmi video
Jan 9 21:03:49 ubnu kernel: [ 410.357447] CPU: 2 PID: 1822 Comm: cifsd Tainted: G OE 4.15.0-43-generic #46-Ubuntu
Jan 9 21:03:49 ubnu kernel: [ 410.357453] Hardware name: /NUC7i3BNB, BIOS BNKBL357.86A.0069.2018.0920.1250 09/20/2018
Jan 9 21:03:49 ubnu kernel: [ 410.357468] RIP: 0010:prefetch_freepointer+0x15/0x30
Jan 9 21:03:49 ubnu kernel: [ 410.357474] RSP: 0018:ffffb16201ae3da0 EFLAGS: 00010282
Jan 9 21:03:49 ubnu kernel: [ 410.357482] RAX: 0000000000000000 RBX: e90527c744fff71a RCX: 0000000000003ea9
Jan 9 21:03:49 ubnu kernel: [ 410.357488] RDX: 0000000000003ea8 RSI: e90527c744fff71a RDI: ffff9d7079255080
Jan 9 21:03:49 ubnu kernel: [ 410.357494] RBP: ffffb16201ae3da0 R08: ffff9d707ed2b650 R09: ffffb16201ae3db0
Jan 9 21:03:49 ubnu kernel: [ 410.357499] R10: ffffb16201ae3de8 R11: 0000000000000000 R12: 0000000001011200
Jan 9 21:03:49 ubnu kernel: [ 410.357505] R13: ffff9d7079255080 R14: ffff9d7016478c40 R15: ffff9d7079255080
Jan 9 21:03:49 ubnu kernel: [ 410.357512] FS: 0000000000000000(0000) GS:ffff9d707ed00000(0000) knlGS:0000000000000000
Jan 9 21:03:49 ubnu kernel: [ 410.357519] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan 9 21:03:49 ubnu kernel: [ 410.357525] CR2: 00007f0a2802d028 CR3: 000000003760a006 CR4: 00000000003606e0
Jan 9 21:03:49 ubnu kernel: [ 410.357530] Call Trace:
Jan 9 21:03:49 ubnu kernel: [ 410.357545] kmem_cache_alloc+0xa2/0x1b0
Jan 9 21:03:49 ubnu kernel: [ 410.357558] ? mempool_alloc_slab+0x15/0x20
Jan 9 21:03:49 ubnu kernel: [ 410.357570] ? wait_woken+0x80/0x80
Jan 9 21:03:49 ubnu kernel: [ 410.357580] mempool_alloc_slab+0x15/0x20
Jan 9 21:03:49 ubnu kernel: [ 410.357590] mempool_alloc+0x71/0x190
Jan 9 21:03:49 ubnu kernel: [ 410.357660] ? smb2_add_credits+0xb0/0x250 [cifs]
Jan 9 21:03:49 ubnu kernel: [ 410.357709] cifs_small_buf_get+0x1a/0x30 [cifs]
Jan 9 21:03:49 ubnu kernel: [ 410.357751] cifs_demultiplex_thread+0x5c7/0xaf0 [cifs]
Jan 9 21:03:49 ubnu kernel: [ 410.357762] ? __schedule+0x299/0x8a0
Jan 9 21:03:49 ubnu kernel: [ 410.357777] kthread+0x121/0x140
Jan 9 21:03:49 ubnu kernel: [ 410.357815] ? cifs_handle_standard+0x190/0x190 [cifs]
Jan 9 21:03:49 ubnu kernel: [ 410.357827] ? kthread_create_worker_on_cpu+0x70/0x70
Jan 9 21:03:49 ubnu kernel: [ 410.357838] ? do_syscall_64+0x73/0x130
Jan 9 21:03:49 ubnu kernel: [ 410.357847] ? SyS_exit_group+0x14/0x20
Jan 9 21:03:49 ubnu kernel: [ 410.357859] ret_from_fork+0x35/0x40
Jan 9 21:03:49 ubnu kernel: [ 410.357866] Code: eb bb 49 8b 74 24 60 48 c7 c7 30 cd 0e a5 e8 93 b9 ea ff eb 90 90 0f 1f 44 00 00 55 48 85 f6 48 89 e5 74 14 48 63 47 20 48 01 c6 <48> 33 36 48 33 b7 40 01 00 00 0f 18 0e 5d c3 66 90 66 2e 0f 1f
Jan 9 21:03:49 ubnu kernel: [ 410.357991] RIP: prefetch_freepointer+0x15/0x30 RSP: ffffb16201ae3da0
Jan 9 21:03:49 ubnu kernel: [ 410.358063] ---[ end trace 9fca55019e520b64 ]---

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2019-01-14
Last reply:
2019-01-10

What is the output of:

lsb_release -a; uname -a; dpkg -l | grep samba

Thanks

jema (zorlax) said : #2

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

Linux ubnu 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ii samba-common 2:4.7.6+dfsg~ubuntu-0ubuntu2.5 all common files used by both the Samba server and client
ii samba-libs:amd64 2:4.7.6+dfsg~ubuntu-0ubuntu2.5 amd64 Samba core libraries
ii vlc-plugin-samba:amd64 3.0.4-1ubuntu0.2 amd64 Samba plugin for VLC

Cheers!

jema (zorlax) said : #3

On a whim I decided to try with smb version specified instead of letting the server and client decide. When I mounted the share with "sudo mount //server/share /mountpoint -o user=write,uid=1000,vers=1.0" everything worked fine.

Mounting with "vers=1.0" sets the protocol, checked on server with "smbstatus", to "NT1". If I leave it out and let auto-negotiation take place the version is "SMB3_02". I tried with "vers=3.0" (SMB3_00) but that also cased a lock and I quite frankly didn't feel like testing SMB2.

It seems to me that if "cifsd" is handling the file transfers then it can't handle more than SMB v1 for writes.
The files I've been trying with have been fairly large, from 500MB to 10GB.

Cheers!

jema (zorlax) said : #4

I'll bump this up to a bug.

I tried with Mint 18 Mate, on different hardware and got the same fault.
Tried SuSE leap 15 KDE on this machine and everything worked as expected.

Have run memtest, for a night, with no errors.

Can you help with this problem?

Provide an answer of your own, or ask jema for more information if necessary.

To post a message you must log in.