You are not logged in.

#1 2012-11-18 08:13:40

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

App freeze on accessing Samba shares

Hi,

I really didn't want to have to make a topic on this, as I've searched all over the place and I'm beginning to wonder if I'm the only one with this problem (unless I've somehow missed something).

Basically I have some Samba shares set up like this in my fstab:

# Share Mounts
//<address>/share1 /home/eldersnake/Shares/share1 cifs noauto,x-systemd.automount,users,uid=eldersnake,gid=users,password= 0 0
//<address>/share2 /home/eldersnake/Shares/share2 cifs noauto,x-systemd.automount,users,uid=eldersnake,gid=users,credentials=<credentials location> 0 0

The problem is periodically, trying to access/mount these shares through let's say, Dolphin (but it happens in any file manager I try) causes the program to simply hang. It will stay there, hung and cannot be killed, even with the "kill -9" command. Only rebooting gets rid of the process.

And looking at the process list with KDE's system monitor lists the affected program status as "disk sleep". Again, it cannot be killed. I've seen this happen with my file manager, Clementine (when I tried to open up a file, therefore it opened up the file dialog and I clicked on a share mount) and even in my terminal...
Even running

sudo mount /home/eldersnake/Shares/share1

for example, nothing happens. The terminal is simply hung and never completes.

I say this happens periodically because sometimes it seems to work just fine. Then some days, it does the above consistently. I'm really unable to pin it down.

Anyway I removed the x-systemd.automount option from fstab and so far I have not been able to reproduce this problem. I'd file a bug report but I can't help but wonder if I've missed something obvious and I'm unsure how to provide evidence that it's systemd specifically causing the problem. Thanks for any help.

EDIT: I should add this occasionally also happens on a separate machine, my netbook. Again, only after adding the systemd automount line to the fstab file.

Also manually mounting the share with

 sudo mount -t cifs <share> <directory>

always works fine. It's simply when using the fstab entry combined with systemd automount.

EDIT: Took systemd-automount out of the title as I am not sure its the cause anymore.

Last edited by ElderSnake (2012-11-24 00:02:24)


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#2 2012-11-18 15:35:38

pvibert
Member
Registered: 2011-07-18
Posts: 12

Re: App freeze on accessing Samba shares

Do you see anything in dmesg while the problem is occurring?

Offline

#3 2012-11-18 23:18:51

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: App freeze on accessing Samba shares

Unfortunately not. Just...nothing.

It's such an odd issue. Like I said, the affected apps just hang and then you cannot kill them no matter what you do. I've never seen that in Linux before.


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#4 2012-11-19 09:07:17

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: App freeze on accessing Samba shares

There are a few "advisories" knocking about with regards to systemd.automount - the links to which I can't immediately find...

My fstab lines for lan shares looks like this:

//REMOTE-MACHINE-NAME/music/Albums	/mnt/Albums	cifs	username=<local-username>,password=<local-password>,uid=1000,gid=100,noauto,x-systemd.automount,rw	0	0

Things of note - in comparison to the line you are using...

1) You are using a text entry for uid/gid - numeric values can be found with "id" command
2) You are not marking shares as RW - though that may be by design
3) I am too lazy / have no need / do not employ a credentials file - might be an idea to take it out the equation until you have it up and running.


Other stuff you don't make mention of:

Do the local mount points exist with correct permissions?
Can you browse the shares through filemangler? (thunar / spacefm etc)
Different mount methods may use different ports - is the port exploited by fstab mount firewalled at the other end? <--- no evidence - just a thought wink


Best bet with this type of problem is to start with the very basics and then employ the more advance features (RW access / credential file) as you get stuff working wink

Last edited by satanselbow (2012-11-19 09:11:10)

Offline

#5 2012-11-19 15:12:10

Beemer
Member
Registered: 2012-05-02
Posts: 13

Re: App freeze on accessing Samba shares

Not sure if this will fix your issue, but I had the same problem.

Previously, I only had "extra/smbclient 3.6.9-1" installed and I could connect to samba shares without issue. 
Once I updated to using systemd, I experienced the 'hang' that you describe.  I'm not sure if this is a systemd or just that the packages were updated/changed but installing and running "extra/samba" fixed the issue.

As root:

pacman -S samba
systemctl enable smbd
systemctl start smbd
systemctl status smbd

That last command isn't necessary but I've noticed systemctl doesn't seem to output any success/fail message on start/stop/restart. 

Anyways, after installing/enabling/running smbd, the samba shares you connect to should work again.

Brent

Offline

#6 2012-11-20 03:16:44

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: App freeze on accessing Samba shares

Well I seem like a right idiot right now, last night, even without systemd.automount defined in fstab, I experienced it again D:

I felt certain this was related to automount, but yeah... this is why I didn't file a bug against it.

ATM, I've set about changing/simplifying it up a bit as satanselbow suggested and right now it's working fine. But I'll keep testing it and if it happens again, I'll also install smbd as Beemer suggests. Although it seems strange it would require the Samba daemon itself?

Nevertheless, I've seen stranger things so I don't doubt it, but I'll see how we go.

Last edited by ElderSnake (2012-11-20 03:17:20)


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

#7 2012-11-23 23:28:52

ElderSnake
Member
From: Australia
Registered: 2010-12-09
Posts: 97

Re: App freeze on accessing Samba shares

Okay, still happening. Often I reboot and everything works fine but sometime later, can be 10 mins...could be 10 hours, this problem re-emerges.

I did however manage to catch this in dmesg

[ 4448.046038] kernel BUG at fs/dcache.c:2138!
[ 4448.046041] invalid opcode: 0000 [#1] PREEMPT SMP 
[ 4448.046046] Modules linked in: fuse msr des_generic ecb md4 md5 hmac nls_utf8 cifs fscache usb_storage uas joydev hid_generic snd_usb_audio snd_usbmidi_lib snd_rawmidi usbhid snd_seq_device hid snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_timer nvidia(PO) snd r8169 soundcore iTCO_wdt psmouse serio_raw acpi_cpufreq mperf coretemp mii evdev microcode firewire_ohci firewire_core crc_itu_t gpio_ich intel_agp i2c_i801 iTCO_vendor_support intel_gtt i2c_core lpc_ich processor pcspkr button vboxdrv(O) ext4 crc16 jbd2 mbcache sd_mod sr_mod cdrom ata_generic uhci_hcd pata_acpi pata_jmicron ata_piix libata scsi_mod ehci_hcd usbcore usb_common
[ 4448.046115] CPU 1 
[ 4448.046120] Pid: 3062, comm: pool Tainted: P           O 3.6.6-1-ARCH #1 Gigabyte Technology Co., Ltd. EP45-DS3/EP45-DS3
[ 4448.046123] RIP: 0010:[<ffffffff81195843>]  [<ffffffff81195843>] __d_rehash+0x83/0xf0
[ 4448.046133] RSP: 0018:ffff88009c627b88  EFLAGS: 00010286
[ 4448.046136] RAX: 00000000000176bd RBX: ffff880040ff7ddc RCX: 0000000000000013
[ 4448.046138] RDX: ffffc90000002000 RSI: ffffc900000bd5e8 RDI: ffff880040ff7d80
[ 4448.046141] RBP: ffff88009c627ba8 R08: 0000000000010000 R09: ffff88009c627fd8
[ 4448.046143] R10: ffff8800a751a4a0 R11: 0000000000000000 R12: ffff880040ff7d80
[ 4448.046146] R13: 0000000000000000 R14: 00000000fffffffe R15: 000000000000010f
[ 4448.046149] FS:  00007fb76933c700(0000) GS:ffff8800bfc80000(0000) knlGS:0000000000000000
[ 4448.046152] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 4448.046154] CR2: 00007fb74c0010b8 CR3: 000000003cb77000 CR4: 00000000000007e0
[ 4448.046157] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4448.046160] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 4448.046163] Process pool (pid: 3062, threadinfo ffff88009c626000, task ffff8800638fa850)
[ 4448.046164] Stack:
[ 4448.046166]  ffff8800a4af7e00 0000000000000000 ffff880040ff7ddc ffff880040ff7d80
[ 4448.046172]  ffff88009c627bb8 ffffffff811958e6 ffff88009c627bd8 ffffffff8119591c
[ 4448.046176]  0000000000000000 ffff8800a4914480 ffff88009c627c38 ffffffffa0e6c973
[ 4448.046181] Call Trace:
[ 4448.046187]  [<ffffffff811958e6>] _d_rehash+0x36/0x40
[ 4448.046191]  [<ffffffff8119591c>] d_rehash+0x2c/0x40
[ 4448.046201]  [<ffffffffa0e6c973>] cifs_lookup+0x263/0x360 [cifs]
[ 4448.046210]  [<ffffffffa0e6cab2>] cifs_atomic_open+0x42/0x230 [cifs]
[ 4448.046214]  [<ffffffff81197fa5>] ? d_lookup+0x35/0x60
[ 4448.046218]  [<ffffffff8118eadf>] do_last+0x56f/0xea0
[ 4448.046223]  [<ffffffff8118f4ca>] path_openat+0xba/0x520
[ 4448.046227]  [<ffffffff8118fc91>] do_filp_open+0x41/0xa0
[ 4448.046232]  [<ffffffff8119c766>] ? alloc_fd+0xd6/0x120
[ 4448.046237]  [<ffffffff8117e9d6>] do_sys_open+0xf6/0x1e0
[ 4448.046241]  [<ffffffff8117eae1>] sys_open+0x21/0x30
[ 4448.046246]  [<ffffffff81499f2d>] system_call_fastpath+0x1a/0x1f
[ 4448.046248] Code: 48 89 16 0f ba 36 00 65 48 8b 04 25 f0 c6 00 00 83 a8 44 e0 ff ff 01 48 8b 80 38 e0 ff ff a8 08 75 0b 48 83 c4 10 5b 41 5c 5d c3 <0f> 0b e8 96 c2 2f 00 eb ee 49 89 c4 48 89 c3 41 83 ac 24 44 e0 
[ 4448.046295] RIP  [<ffffffff81195843>] __d_rehash+0x83/0xf0
[ 4448.046300]  RSP <ffff88009c627b88>
[ 4448.046322] ---[ end trace 822cd52e99a52b51 ]---
[ 4448.046327] note: pool[3062] exited with preempt_count 1
[ 4448.055386] ------------[ cut here ]------------
[ 4448.055393] kernel BUG at fs/dcache.c:2138!
[ 4448.055396] invalid opcode: 0000 [#2] PREEMPT SMP 
[ 4448.055401] Modules linked in: fuse msr des_generic ecb md4 md5 hmac nls_utf8 cifs fscache usb_storage uas joydev hid_generic snd_usb_audio snd_usbmidi_lib snd_rawmidi usbhid snd_seq_device hid snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_timer nvidia(PO) snd r8169 soundcore iTCO_wdt psmouse serio_raw acpi_cpufreq mperf coretemp mii evdev microcode firewire_ohci firewire_core crc_itu_t gpio_ich intel_agp i2c_i801 iTCO_vendor_support intel_gtt i2c_core lpc_ich processor pcspkr button vboxdrv(O) ext4 crc16 jbd2 mbcache sd_mod sr_mod cdrom ata_generic uhci_hcd pata_acpi pata_jmicron ata_piix libata scsi_mod ehci_hcd usbcore usb_common
[ 4448.055471] CPU 1 
[ 4448.055476] Pid: 3063, comm: pool Tainted: P      D    O 3.6.6-1-ARCH #1 Gigabyte Technology Co., Ltd. EP45-DS3/EP45-DS3
[ 4448.055479] RIP: 0010:[<ffffffff81195843>]  [<ffffffff81195843>] __d_rehash+0x83/0xf0
[ 4448.055488] RSP: 0000:ffff88003a059b88  EFLAGS: 00010286
[ 4448.055491] RAX: 000000000004ad5b RBX: ffff880040ff7a1c RCX: 0000000000000013
[ 4448.055494] RDX: ffffc90000002000 RSI: ffffc90000258ad8 RDI: ffff880040ff79c0
[ 4448.055496] RBP: ffff88003a059ba8 R08: 000000000001b2c0 R09: ffff8800bfc9b2c0
[ 4448.055499] R10: ffff8800a751ae60 R11: 0000000000000000 R12: ffff880040ff79c0
[ 4448.055501] R13: 0000000000000000 R14: 00000000fffffffe R15: 0000000000000110
[ 4448.055505] FS:  00007fb768b3b700(0000) GS:ffff8800bfc80000(0000) knlGS:0000000000000000
[ 4448.055507] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 4448.055510] CR2: 00007f8507000000 CR3: 000000003cb77000 CR4: 00000000000007e0
[ 4448.055513] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4448.055515] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 4448.055518] Process pool (pid: 3063, threadinfo ffff88003a058000, task ffff8800638fc890)
[ 4448.055520] Stack:
[ 4448.055522]  ffff8800ae280200 0000000000000000 ffff880040ff7a1c ffff880040ff79c0
[ 4448.055527]  ffff88003a059bb8 ffffffff811958e6 ffff88003a059bd8 ffffffff8119591c
[ 4448.055531]  0000000000000000 ffff8800956d5cc0 ffff88003a059c38 ffffffffa0e6c973
[ 4448.055536] Call Trace:
[ 4448.055542]  [<ffffffff811958e6>] _d_rehash+0x36/0x40
[ 4448.055546]  [<ffffffff8119591c>] d_rehash+0x2c/0x40
[ 4448.055556]  [<ffffffffa0e6c973>] cifs_lookup+0x263/0x360 [cifs]
[ 4448.055564]  [<ffffffffa0e6cab2>] cifs_atomic_open+0x42/0x230 [cifs]
[ 4448.055568]  [<ffffffff81197fa5>] ? d_lookup+0x35/0x60
[ 4448.055572]  [<ffffffff8118eadf>] do_last+0x56f/0xea0
[ 4448.055577]  [<ffffffff8118f4ca>] path_openat+0xba/0x520
[ 4448.055582]  [<ffffffff8118fc91>] do_filp_open+0x41/0xa0
[ 4448.055586]  [<ffffffff8119c766>] ? alloc_fd+0xd6/0x120
[ 4448.055591]  [<ffffffff8117e9d6>] do_sys_open+0xf6/0x1e0
[ 4448.055595]  [<ffffffff8117eae1>] sys_open+0x21/0x30
[ 4448.055600]  [<ffffffff81499f2d>] system_call_fastpath+0x1a/0x1f
[ 4448.055602] Code: 48 89 16 0f ba 36 00 65 48 8b 04 25 f0 c6 00 00 83 a8 44 e0 ff ff 01 48 8b 80 38 e0 ff ff a8 08 75 0b 48 83 c4 10 5b 41 5c 5d c3 <0f> 0b e8 96 c2 2f 00 eb ee 49 89 c4 48 89 c3 41 83 ac 24 44 e0 
[ 4448.055649] RIP  [<ffffffff81195843>] __d_rehash+0x83/0xf0
[ 4448.055653]  RSP <ffff88003a059b88>
[ 4448.055666] ---[ end trace 822cd52e99a52b52 ]---
[ 4448.055670] note: pool[3063] exited with preempt_count 1

Not sure what to make of it though other than it's something CIFS related, but whether CIFS itself is the problem I'm unsure. I just installed the samba daemon as suggested above though and will see how we go.

EDIT: The pid it's referring to in the stacktrace is a process which I noticed appears as a zombie after the problem occurs. The process is "gvfs-udisks2-vo".

Last edited by ElderSnake (2012-11-23 23:41:44)


Arch Linux - Intel E5200 Desktop (MATE GTK3)  | Fedora 25 - ASUS Core-i7 Optimus Laptop

Offline

Board footer

Powered by FluxBB