On Wed, Dec 06, 2006 at 03:45:19PM -0300, Alvaro Herrera wrote:
> Gerrit Pape wrote:
> > On Wed, Dec 06, 2006 at 09:18:38AM -0300, Alvaro Herrera wrote:
> 
> > > Yes.  The configuration is the default, I think, and certainly the
> > > startup script is.  (It was started by "aptitude" or dpkg).
> > 
> > Ok, that's good.  Can you please strace the complete command chain?
> > Please change the final line in /var/service/twoftpd/run to
> > 
> >  ...
> >      strace -f -o/tmp/trace twoftpd-auth cvm-unix twoftpd-xfer
> 
> Wow, interesting.  Now the server fails in a completely different way --
> on the client I get "530 Authentication failed."  On the strace output I
> see this:
> 
> 14242 mmap(NULL, 2344904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
> 0) = -1 ENOMEM (Cannot allocate memory)
> 14242 close(3)                          = 0
> 14242 writev(2, [{"cvm-unix", 8}, {": ", 2}, {"error while loading shared 
> libra"..., 36}, {": ", 2}, {"libc.so.6", 9}, {": "
> , 2}, {"failed to map segment from share"..., 40}, {": ", 2}, {"Cannot 
> allocate memory", 22}, {"\n", 1}], 10) = 124
> 
> On the log file I get that mesage:
> 
> @4000000045770e2f0c79ee7c cvm-unix: error while loading shared libraries: 
> libc.so.6: failed to map segment from shared object: Cannot allocate memory

This is due to the memory limitation, there's a limit imposed on the
twoftpd service, so that it doesn't steal all system ressources in case
of a memory leak or exploit.  Now that strace is in the process chain,
more memory is required.

You can upper the limit temporarily, edit /var/service/twoftpd/run, and
change
 chpst -m3000000
to
 chpst -m30000000

This means 30MB memory limit instead of 3MB.  The service and the strace
should then run fine.

Thanks for your help, Gerrit.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to