Nicholas Burlett wrote:
> On Apr 22, 2013, at 10:09 AM, Ben Franksen <ben.franksen-
bgeptl67xyczqb+pc5n...@public.gmane.org> wrote:
> 
>> Ben Franksen wrote:
>>> Ben Franksen wrote:
>>>> So you try to allocate a ridiculous amount of memory which fails of 
>>> course.
>>> ... The problem 
>>> is that the call to pathconf returns 2147483647.
>> 
>> I looked up pathconf in the man pages ('man pathconf') and see:
>> 
>>       Some returned values may be huge; they are not suitable for
>>       allocating memory.
>> 
> 
> That's really interesting… what version of libc are you using? And on what 
host OS? 

Nothing special (I think!):

ben@sarun[1]: ~ > uname -a
Linux sarun 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux

ben@sarun[1]: ~/tmp > dpkg -s libc6:amd64 
Package: libc6
Status: install ok installed
Priority: required
Section: libs
Installed-Size: 9517
Maintainer: GNU Libc Maintainers <debian-gl...@lists.debian.org>
Architecture: amd64
Multi-Arch: same
Source: eglibc
Version: 2.13-38
Replaces: libc6-amd64
Provides: glibc-2.13-1
Depends: libc-bin (= 2.13-38), libgcc1
Suggests: glibc-doc, debconf | debconf-2.0, locales
Breaks: locales (<< 2.13), locales-all (<< 2.13), lsb-core (<= 3.2-27), nscd 
(<< 2.13)
Conflicts: prelink (<= 0.0.20090311-1), tzdata (<< 2007k-1), tzdata-etch
Conffiles:
 /etc/ld.so.conf.d/x86_64-linux-gnu.conf 593ad12389ab2b6f952e7ede67b8fbbf

I wrote a little test program that returns the value returned by pathconf 
for a given start path, which is enlightening:

ben@sarun[1]: ~/tmp > cat test-unistd.c          
#include <unistd.h>
#include <stdio.h>

int main (int argc, char **argv)
{
    printf("pathconf(\"%s\", _PC_NAME_MAX)=%ld\n", argv[1], 
pathconf(argv[1], _PC_NAME_MAX));
    return 0;
}
ben@sarun[1]: ~/tmp > ./a.out /home/ben          
pathconf("/home/ben", _PC_NAME_MAX)=255
ben@sarun[1]: ~/tmp > ./a.out /home/ben/ctl      
pathconf("/home/ben/ctl", _PC_NAME_MAX)=2147483647

Note that /home/ben/ctl is a symlink into my sshfs-mounted remote 
filesystem.

So, it appears that the locals fs (ext4) has a sane limit but sshfs does 
not. BTW, I mounted the sshfs with afuse; this is my setup:

ben@sarun[1]: ~/tmp > pgrep -lf afuse
7611 afuse /home/ben/sshfs -o mount_template=sshfs %r:/ %m -o 
idmap=file\,uidfile=/home/ben/.ssh/uid-aragon\,gidfile=/home/ben/.ssh/gid-
aragon\,nomap=ignore\,reconnect -o unmount_template=fusermount -u -z %m
7799 sshfs frank...@aragon.acc.bessy.de:/ /tmp/afuse-
f3tZoi/frank...@aragon.acc.bessy.de -o 
idmap=file,uidfile=/home/ben/.ssh/uid-aragon,gidfile=/home/ben/.ssh/gid-
aragon,nomap=ignore,reconnect


Cheers
-- 
Ben Franksen
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachm€nts


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to