WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TCL crashes after mounting CIFS share  (Read 13361 times)

Offline nim108

  • Full Member
  • ***
  • Posts: 107
TCL crashes after mounting CIFS share
« on: November 17, 2011, 05:18:03 PM »
I am running into a strange issue that could be related to filesystems-3.0.3-tinycore.tcz and/or dependency mtd-3.0.3-tinycore.tcz in regards to mounting a smb/cifs share.

At first, I thought smbmount was a command included in the samba3.tcz package, so I did not add any additional extensions, but upon realizing it was not, I got the extensions mentioned above and used mount -t cifs to mount the Windows share (also realized that mount -t smbfs was now deprecated). Mounting was fine, I could read / write to the filesystem. However, TCL crashes after a few minutes of mounting a CIFS share by printing a stack trace. I know this is related to mounting because if I don't mount anything CIFS related, TCL stays up just fine. I've also tried different shares on different laptops and I get the same behavior so I'm thinking it must be something with the extension? I don't need the cifs-utils package, do I? If anyone else is running into this issue, I'd love to hear about it because the stack trace tells me nothing to diagnose the problem.
« Last Edit: November 17, 2011, 05:24:27 PM by nim108 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TCL crashes after mounting CIFS share
« Reply #1 on: November 17, 2011, 10:36:35 PM »
Hi nim108
The samba package does come with  mount.cifs, however, if you are not looking to run a server
you don't need it, cifs-utils.tcz should be all you need to connect to a share.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: TCL crashes after mounting CIFS share
« Reply #2 on: November 18, 2011, 12:28:15 AM »
Sounds like a bug in the kernel's cifs module. There have been some 5 commits in the 3.0.x series to cifs, perhaps you could try 3.0.9?
The only barriers that can stop you are the ones you create yourself.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: TCL crashes after mounting CIFS share
« Reply #3 on: November 18, 2011, 07:10:26 AM »
Sounds like a bug in the kernel's cifs module. There have been some 5 commits in the 3.0.x series to cifs, perhaps you could try 3.0.9?
Could you link me to this? Are you saying there is an updated filesystems / mtd extension in the TC repo here: http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/ because I don't see it. Please clarify, thanks. Again, at the moment, I am not using the cifs-utils extension but only the ones mentioned above since I only need to mount a Windows share in TCL and not run a server.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: TCL crashes after mounting CIFS share
« Reply #4 on: November 18, 2011, 07:17:16 AM »
I mean the upstream linux kernel 3.0.9, from kernel.org.
The only barriers that can stop you are the ones you create yourself.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: TCL crashes after mounting CIFS share
« Reply #5 on: November 18, 2011, 07:19:21 AM »
I mean the upstream linux kernel 3.0.9, from kernel.org.
Hate to sound like a noob, but I will have to rebuild it for compatibility for TCL then? It can't be as easy as swapping out the vmlinuz file or is it?

http://wiki.tinycorelinux.net/wiki:custom_kernel <-- guess I am following this guide?
« Last Edit: November 18, 2011, 07:22:58 AM by nim108 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: TCL crashes after mounting CIFS share
« Reply #6 on: November 18, 2011, 07:25:32 AM »
Yes, you'd need to build it. The wiki page looks ok.
The only barriers that can stop you are the ones you create yourself.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: TCL crashes after mounting CIFS share
« Reply #7 on: November 18, 2011, 08:03:29 AM »
Going to be a challenge for me, but I'll give it a shot. Any plans to upgrade the kernel in TCL anytime soon? This is not a total emergency, I can always wait it out, I am just kinda curious if it will fix CIFS crashes (or if the kernel is even the cause of it). Thanks.
« Last Edit: November 18, 2011, 08:15:01 AM by nim108 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: TCL crashes after mounting CIFS share
« Reply #8 on: November 18, 2011, 11:53:40 AM »
Quote
Any plans to upgrade the kernel in TCL anytime soon?

Not in this cycle, no.
The only barriers that can stop you are the ones you create yourself.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: TCL crashes after mounting CIFS share
« Reply #9 on: November 18, 2011, 02:16:07 PM »
Fair enough, and no other alternatives to mount Windows shares besides "mount -t cifs" with filesystems and mtd extensions correct? If so, I will try to compile TC for 3.0.9 this weekend and see how it goes.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: TCL crashes after mounting CIFS share
« Reply #10 on: November 18, 2011, 11:42:33 PM »
Yes, things will go through the kernel even with cifsutils/samba.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TCL crashes after mounting CIFS share
« Reply #11 on: November 19, 2011, 06:25:43 AM »
Hi nim108
Try removing the samba package and installing cifs-utils instead. Then mount using
sudo mount.cifs //IP_Address/dir /mnt/mountpoint
I just went to the 4.0 repository and looked at the samba3.tcz.list file and mount.cifs is NOT listed
in there so maybe the busybox mount is handling it and doing something weird.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: TCL crashes after mounting CIFS share
« Reply #12 on: November 20, 2011, 07:25:06 AM »
Rich, will do, but according to curaga, either one will go through the kernel so that seems to be a moot point (though I will certainly try it). Also, I need the samba3 extension for the rpcclient command to remote reboot the Windows client after I'm done modifying some files on it, which was to be done through the CIFS share. If there's any other way to remote reboot it, I'm all ears because the samba3 package alone is 30 MB which totally bloats my customized initrd. I can try adding the cifs-utils extension on top though and use the mount.cifs command (I was trying to avoid using this extension since it depends on so many other packages). Are you saying mount.cifs is not the same as mount -t cifs? Also, if neither of these suggestions work, I will try downgrading to TCL 3.8.4 (which uses the 2.6.33 kernel IIRC) just to confirm it is a kernel issue.
« Last Edit: November 20, 2011, 07:26:57 AM by nim108 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TCL crashes after mounting CIFS share
« Reply #13 on: November 20, 2011, 08:28:57 AM »
Hi nim108
Quote
Also, I need the samba3 extension for the rpcclient command to remote reboot the Windows client
Once your mount problems are resolved, you can grab rpcclient, libtalloc, libtdb,and libwbclient from
the samba package. The remaining libs that rpcclient relies on may already be on your system but
heres a list anyway.
Code: [Select]
tc@BitBucket:~$ ldd /usr/local/bin/rpcclient
        linux-gate.so.1 =>  (0xb7f0c000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb7b3b000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7b25000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7b21000)
        libpopt.so.0 => /usr/local/lib/libpopt.so.0 (0xb7b17000)
        libtalloc.so.1 => /usr/local/lib/libtalloc.so.1 (0xb7b11000)
        libtdb.so.1 => /usr/local/lib/libtdb.so.1 (0xb7b06000)
        libwbclient.so.0 => /usr/local/lib/libwbclient.so.0 (0xb7afa000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7ae6000)
        libc.so.6 => /lib/libc.so.6 (0xb79ad000)
        /lib/ld-linux.so.2 (0xb7f0d000)
That should get you down to about 4Meg.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: TCL crashes after mounting CIFS share
« Reply #14 on: November 20, 2011, 08:43:05 AM »
^ Awesome, thanks! The support here is great and definitely appreciated. I will try out all the suggestions and report back. Worst case I will just go back to TCL 3.8.4 if it turns out to be a kernel bug with CIFS with TCL 4.x.