Welcome, Guest. Please login or register.

Author Topic: How to stop SMBFS from crashing  (Read 9582 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
How to stop SMBFS from crashing
« on: January 01, 2008, 08:44:54 PM »
I'm trying to create an LHA backup of my machine. I've got an SMB share mounted and working fine, but when I start creating the archive the whole machine crashes a few megs in to creating it. I've got StackAttack running in startup-sequence, and the shell script (launched from the dock) which runs SMBFS has a command at the beginning to increase the stack by 20,000. Is there anything else I can do to improve the stability of SMBFS? Alternatively, is there a more stable way to mount a volume on a remote machine?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Online Thomas

Re: How to stop SMBFS from crashing
« Reply #1 on: January 01, 2008, 10:42:57 PM »

Use a stack of 100,000. 20,000 is a joke for Unix programs.

I'd rather create the archives on the Amiga and then use FTP to transfer them to a storage server. SMB is not a good choice when working with big files.

Also I'd avaoid to create one big archive by all means. No matter which program you use, there is always the chance that an archive gets corrupted and then all files are lost. I'd rather create smaller topic-related archives, for example one for music files, one for graphics files, one for text files, one for program sources, one for key files, one for settings, etc.
Do not let archives grow bigger than 10 or 20 MB.

Bye,
Thomas

Offline Fab12

  • Newbie
  • *
  • Join Date: Sep 2006
  • Posts: 37
    • Show only replies by Fab12
Re: How to stop SMBFS from crashing
« Reply #2 on: January 02, 2008, 12:45:21 AM »
I wonder why most users think increasing stack is some kind of magical cure to all crashing programs. There are so many other possible causes... smbfs may just break for a completely different reason (it could also be the underlying tcp stack, especially if it's miami).

About the magical "let's increase stack" reflex, it's partly the fault of quick'n'dirty ports (some are even commercial) authors who don't set the stack themselves (there was stackswap for os3.x, there's a "stack cookie" in os4, there's __stack global var and/or ppcstackswap in morphos, so no excuse).

User really shouldn't have to know how much stack a random program needs.
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: How to stop SMBFS from crashing
« Reply #3 on: January 02, 2008, 09:25:42 AM »
@Thomas
Thanks for your suggestions. I will bear them in mind when making my backup.

@Fab12
Low stack is a well known cause of instabilities in SMBFS which is why I stated that I had increased the stack.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: How to stop SMBFS from crashing
« Reply #4 on: January 02, 2008, 09:53:52 AM »
Quote
Thomas wrote:
I'd rather create the archives on the Amiga and then use FTP to transfer them to a storage server. SMB is not a good choice when working with big files.

The problem is that I'm having issues with my SFS partitions which is why I'm backing up and re-formatting. Because of the issues with the partitions I don't want to create the archive on that partition, but rather I want to create them somewhere else to avoid them becoming corrupt on the SFS partition. That is why I wanted to use SMB. Any alternative suggestions would be welcome. E.g. is FTPMount a good choice for doing this?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: How to stop SMBFS from crashing
« Reply #5 on: January 02, 2008, 09:56:19 AM »
I have no problems reading/writing gigabytes of data thru smbfs.

I have stack set to 32768.
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: How to stop SMBFS from crashing
« Reply #6 on: January 02, 2008, 10:05:29 AM »
Thanks Piru. Will try increasing the stack. BTW do you just put a stack command before the SMBFS command?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline HammerD

Re: How to stop SMBFS from crashing
« Reply #7 on: January 02, 2008, 10:06:14 AM »
@Piru

Have you tried reading and writing to a Windows Vista share? I can' t get it to work.

I can read the directory and list the files, but I cannot copy or write a file.  XP works ok. I've tried adjusting the security on Vista but that didn't work.
AmigaOS 4.x Beta Tester - Classic Amiga enthusiast - http://www.hd-zone.com is my Amiga Blog, check it out!
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: How to stop SMBFS from crashing
« Reply #8 on: January 02, 2008, 10:12:41 AM »
Quote
BTW do you just put a stack command before the SMBFS command?

No, I use STACK option of the MorphOS run command (which is basically based on my earlier run44 work).
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: How to stop SMBFS from crashing
« Reply #9 on: January 02, 2008, 10:15:07 AM »
@HammerD

Quote
Have you tried reading and writing to a Windows Vista share?

No. The share is on linux boxen.

Sounds like m$ did the usual trick and changed the protocol. It likely won't work unless if someone updates smbfs.
 

Offline Framiga

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 4096
    • Show only replies by Framiga
Re: How to stop SMBFS from crashing
« Reply #10 on: January 02, 2008, 10:24:57 AM »
personally i use FTP (the faster) or AmigaExplorer between AmigaOS4/MOS for PowerUP and winxp home.

ATC on Amiga and XLight FTP server on pc
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: How to stop SMBFS from crashing
« Reply #11 on: January 02, 2008, 10:42:46 AM »
Quote
Piru wrote:
Quote
BTW do you just put a stack command before the SMBFS command?
No, I use STACK option of the MorphOS run command (which is basically based on my earlier run44 work).

Would putting "stack 200000" before the SMBFS command work just as well?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: How to stop SMBFS from crashing
« Reply #12 on: January 02, 2008, 11:43:12 AM »
Well, IMO playing with stack command is slightly stupid because the stacksize is remembered. So if you for example put it to a script, everything executed after this script will use 200000 byte stack, too.

Unless of course you do something like:

stack 200000
whatever
stack 4096
 

Offline LoadWB

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show only replies by LoadWB
Re: How to stop SMBFS from crashing
« Reply #13 on: January 02, 2008, 12:09:13 PM »
Quote
HammerD wrote:
@Piru

Have you tried reading and writing to a Windows Vista share? I can' t get it to work.

I can read the directory and list the files, but I cannot copy or write a file.  XP works ok. I've tried adjusting the security on Vista but that didn't work.


Vista uses a newer version of the SMB protocol.  The old protocol can be reenabled in local security policies, AFAIK.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: How to stop SMBFS from crashing
« Reply #14 on: January 02, 2008, 12:18:24 PM »
@LoadWB
Quote
The old protocol can be reenabled in local security policies, AFAIK.

I bet HammerD would love to know how exactly you can do that.