Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2012 17:19:48 +0100
From:      Mike Clarke <jmc-freebsd2@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Gimp - problem opening images using URI's
Message-ID:  <201210231719.48155.jmc-freebsd2@milibyte.co.uk>
In-Reply-To: <CAEMZj==JM051FR60xvGEshn_RCNdSh5EAp=A_D-LMCCOWFzzLw@mail.gmail.com>
References:  <201210222056.12232.jmc-freebsd2@milibyte.co.uk> <CAEMZj==JM051FR60xvGEshn_RCNdSh5EAp=A_D-LMCCOWFzzLw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 23 October 2012 03:11:06 Alexandr Alexeev wrote:

> Could you trace gimp using truss utility and upload an output somewhere?

The output file is more than 90 thousand lines long, if anyone would like to 
see the whole file then I could upload it somewhere but in the meantime 
here's an extract from the vicinity of the error:

---------------------------------------------------------------------------

stat("/etc/nsswitch.conf",{ 
mode=-rw-r--r-- ,inode=11094,size=323,blksize=4096 }) = 0 (0x0)
geteuid()                    = 1001 (0x3e9)
open("/etc/pwd.db",O_RDONLY,00)          = 7 (0x7)
fcntl(7,F_SETFD,FD_CLOEXEC)          = 0 (0x0)
fstat(7,{ mode=-rw-r--r-- ,inode=138,size=40960,blksize=40960 }) = 0 (0x0)
read(7,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104)
pread(0x7,0x808c62000,0x1000,0x6000,0x1,0x0)     = 4096 (0x1000)
pread(0x7,0x808c63000,0x1000,0x4000,0x1,0x0)     = 4096 (0x1000)
pread(0x7,0x808c64000,0x1000,0x5000,0x1,0x0)     = 4096 (0x1000)
pread(0x7,0x808c65000,0x1000,0x7000,0x1,0x0)     = 4096 (0x1000)
pread(0x7,0x808c66000,0x1000,0x8000,0x1,0x0)     = 4096 (0x1000)
pread(0x7,0x808c67000,0x1000,0x1000,0x1,0x0)     = 4096 (0x1000)
pread(0x7,0x808c68000,0x1000,0x2000,0x1,0x0)     = 4096 (0x1000)
pread(0x7,0x808c69000,0x1000,0x3000,0x1,0x0)     = 4096 (0x1000)
close(7)                     = 0 (0x0)
socket(PF_LOCAL,SOCK_STREAM,0)           = 7 (0x7)
stat("/tmp/fam-mike",0x7fffffffc900)         ERR#2 'No such file or directory'
connect(7,{ AF_UNIX "/tmp/fam-mike/fam-" },106)  ERR#2 'No such file or 
directory'
close(7)                     = 0 (0x0)
access("/usr/local/libexec/gam_server",5)    = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|
SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|
SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|
SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
fork()                       = 3667 (0xe53)
sigprocmask(SIG_SETMASK,0x0,0x0)         = 0 (0x0)
wait4(0xe53,0x7fffffffc4a4,0x0,0x0,0xffff80080ad06860,0x0) = 3667 (0xe53)
socket(PF_LOCAL,SOCK_STREAM,0)           = 7 (0x7)
stat("/tmp/fam-mike",0x7fffffffc900)         ERR#2 'No such file or directory'
connect(7,{ AF_UNIX "/tmp/fam-mike/fam-" },106)  ERR#2 'No such file or 
directory'
close(7)                     = 0 (0x0)
nanosleep({0.050000000 })            = 0 (0x0)
socket(PF_LOCAL,SOCK_STREAM,0)           = 7 (0x7)
stat("/tmp/fam-mike",0x7fffffffc900)         ERR#2 'No such file or directory'
connect(7,{ AF_UNIX "/tmp/fam-mike/fam-" },106)  ERR#2 'No such file or 
directory'
close(7)                     = 0 (0x0)


[snip 22 similar 'No such file or directory' blocks]


nanosleep({0.050000000 })            = 0 (0x0)
socket(PF_LOCAL,SOCK_STREAM,0)           = 7 (0x7)
stat("/tmp/fam-mike",0x7fffffffc900)         ERR#2 'No such file or directory'
connect(7,{ AF_UNIX "/tmp/fam-mike/fam-" },106)  ERR#2 'No such file or 
directory'
Failed to connect to socket /tmp/fam-mike/fam-
write(2,"Failed to connect to socket /tmp"...,47) = 47 (0x2f)
close(7)                     = 0 (0x0)
getpid()                     = 3661 (0xe4d)

(gimp:3661): GLib-GIO-WARNING **: FAMOpen failed, FAMErrno=3

write(2,"\n(gimp:3661): GLib-GIO-WARNING "...,63) = 63 (0x3f)

---------------------------------------------------------------------------

It looks like the problem lies inside gam_api.c in devel/gamin. If I've 
interpreted things correctly gamin_get_socket_path() 
returns /tmp/fam-mike/fam- though I'm wondering it it should have 
returned /tmp/fam-mike/fam-<fam_client_id>. Then gamin_connect_unix_socket() 
invokes gamin_fork_server() and tries to connect to it but gives up after 
MAX_RETRIES (=25) failed attempts to connect.

Well, that's what I think is happening but working out why it's happening is 
beyond my skill level so I'd welcome any advice.

In case it's any use here's the output with GAM_DEBUG set:

---------------------------------------------------------------------------
curlew:/home/mike% setenv GAM_DEBUG
curlew:/home/mike% gimp -c http://www.freebsd.org/layout/images/beastie.png
FAMOpen2()
FAMOpen()
Error getting GAM_CLIENT_ID
Reusing socket directory /tmp/fam-mike
Asking to launch /usr/local/libexec/gam_server with client id
Reusing socket directory /tmp/fam-mike
Reusing socket directory /tmp/fam-mike
Connected to socket /tmp/fam-mike/fam- : 7
Wrote credential bytes to socket 7
Activating thread safety
FAMPending(fd = 7)
Checking data available on 7
Client need auth 7
read credentials byte
Credentials: s_uid 1001, c_uid 1001, c_gid 1001, c_pid 67468
Checking data available on 7
FAMMonitorFile(/home/mike/.local/share/recently-used.xbel)
Wrote 52 bytes to socket 7
gamin_send_request 1 for socket 7
FAMPending(fd = 7)
Checking data available on 7
read 104 bytes from server
accepted event: seq 1, type 8
FAMNextEvent(fd = 7)
FAMNextEvent : Exists : /home/mike/.local/share/recently-used.xbel
FAMPending(fd = 7)
accepted event: seq 1, type 9
FAMNextEvent(fd = 7)
FAMNextEvent : EndExist : /home/mike/.local/share/recently-used.xbel
FAMPending(fd = 7)
Checking data available on 7
GIMP-Error: Opening 'http://www.freebsd.org/layout/images/beastie.png' failed: 
Could not open 'http://www.freebsd.org/layout/images/beastie.png' for 
reading: No such file or directory
---------------------------------------------------------------------------

-- 
Mike Clarke



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210231719.48155.jmc-freebsd2>