Port-atari archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RE: Samba and low memory on NetBSD/atari



 
Ok, I actually had 256MB of memory in the system for a while and these binaries 
still wouldn't start due to this memory issue.  (Had to go back to 16MB due to 
hardware issues with the memory board)
 
I also did compile the latest Samba with -Os and I still get the memory 
allocation issue:
 
tt030: {8} ktrace -id /usr/pkg/sbin/winbindd
ktrace: exec of '/usr/pkg/sbin/winbindd' failed: Cannot allocate memory

I didn't go as far as increasing my swap space, but I think the increase from 
16MB to 256MB shows that it's likely not a lack of memory in the system.  It's 
as if the OS is just looking at this binary and deciding it's too big to load.  
In fact that kind of makes sense because these binaries are the largest on the 
system.  Could it be that there's some hardcoded limit on the size of binaries 
that the Atari kernel will load?
 
Being that it won't even start up under ktrace, are there any other options I 
may have for debugging?
 
David Ross
dross%pobox.com@localhost


----------------------------------------
> From: dross%pobox.com@localhost
> To: abs%absd.org@localhost
> CC: port-atari%netbsd.org@localhost
> Subject: RE: Samba and low memory on NetBSD/atari
> Date: Fri, 18 Feb 2011 13:21:24 -0800
>
>
> sh doesn't seem to have any limits.
>
> If I just try to start the binary directly without having it in a shell 
> script, I get:
> /usr/pkg/sbin/smbd: Cannot allocate memory.
>
> (This is after running unlimit in my current shell, tcsh)
>
> But now it's looking like the binary itself is just so large it just never 
> even starts...
>
> Attempting to start it with ktrace:
> atari: {12} ktrace -id /usr/pkg/sbin/smbd
> ktrace: exec of '/usr/pkg/sbin/smbd' failed: Cannot allocate memory
>
> Looking in /usr/pkg/sbin, both smbd and winbindd seem to be the most massive 
> binaries, by far. (10MB and 8MB respectively) I only have 16MB of physical 
> memory in the machine...
>
> I guess the thing to do would be to recompile with -Os. It would seem 
> sensible that you can't load a NetBSD binary that's so large it won't fit in 
> available physical memory. =) Though if there's a way around that, let me 
> know!
>
> David Ross
> dross%pobox.com@localhost
>
>
>
> ----------------------------------------
> > Date: Fri, 18 Feb 2011 18:08:34 +0000
> > Subject: Re: Samba and low memory on NetBSD/atari
> > From: abs%absd.org@localhost
> > To: dross%pobox.com@localhost
> > CC: port-atari%netbsd.org@localhost
> >
> > On 16 Feb 2011 06:53, "David Ross" wrote:
> >
> > > I recently got up and running with Samba 3.5.6. (Previously I had been 
> > > using 3.0) Unfortunately on 3.5.6, both smbd and winbindd fail to start:
> > >
> > > eval: /usr/pkg/sbin/smbd: not enough memory
> > > eval: /usr/pkg/sbin/winbindd: not enough memory
> > >
> > > I have 16MB of physical memory and 256MB of swap. Anyone know an easy way 
> > > to determine if the issue with Samba might be resolved simply by 
> > > increasing available swap space? I imagine this may not be the case if 
> > > the allocation that is failing really wants a large chunk of contiguous 
> > > and/or physical memory. Any other tips that may help smbd/winbindd load?
> > >
> > > Next time I do an install I'll try increasing swap and perhaps building 
> > > everything with -Os rather than -O2.
> > >
> >
> > Have you run unlimit, or your shell's equivalent?
> >
> > If that is not the issue a quick way to add 256m swap could be to run
> > dd if=/dev/zero of=/var/swap bs=1m count=256 progress=1
> > Then chmod it 600, add it to fstab & swapctl to add it (or reboot).
> >
> > Alternatively could it be that samba need shared memory & that is failing?
> > If you ktrace -id samba & then kdump the generated files you should be
> > able to see what system call failed (close to the end :)                    
> >                   


Home | Main Index | Thread Index | Old Index